[Perl-workflow-devel] Using Workflow for managing home automation
Brought to you by:
jonasbn
From: Sebastian S. <seb...@go...> - 2012-04-15 09:56:07
|
Hello folks, I hope it is ok to post to this list. If not, please tell me. I am trying to utilize the workflow framework that you guys have created and I am fascinated about the possibilities and the way it is so generic and configurable. However, there is one thing I am not sure if it is achievable. I have defined a workflow with a bunch of states and I use this to control a computer. This may sound weird. This "computer" can have several states: On, Off, Booting, Halting, Unknown. Now, a user requests this computer to be just on. The user does not care about the current state. The damn thing shall be on as quickly as possible. But if the computer is currently in the off state, it cannot be on directly from there. It has to move through the booting-state and only if the booting succeeds it will be on. I have actions defined how to move from off to booting ( i just have a radio controlled socket to switch it on, but it could also be wake on lan, etc.) and I have an action to move from booting to on (some tests have to perform ok). I am looking for a way of "path-finding" from the actual state to a desired state like I can do this for example with the Graph CPAN module which can find the shortest path between two nodes. Is there any way to achieve this or do you think my whole idea is crap? :) Thanks for your thoughts! Regards Sebastian |