Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 6 made on Friday June 10, 2022 at 23:49
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Several questions - You said you were using RFX9600 for serial. In your startup script is it only 1-way serial or do you need 2 way?

I see what you are trying to do. You are needing a way to convert asynchronous activities into a set of sequential tasks that will drive your UI.

To do something like this, you can use concepts such as task queues or finite state machines. You break out major items (turn on projector, set preamp input, etc) into tasks (functions) that can be called once the previous one completes.

The "state" is a variable that keeps track of all the permutations possible in your code. For example, once preamp input is set, the state variable changes from awaiting preamp input set -> preamp input set -> do next task.

So you then use scheduleAfter and an array of objects that serve as your task queue.


Next question - Do you have any raspberry pi's in your setup?

The reason I ask the 2nd question as I have nodejs code that emulates an RFX9600 but does not do IR. It runs as a service on a pi within my home. The emulator has software serial ports and software relays/inputs.

The serial ports will echo (loopback) whatever is sent to them and the relay state is passed along to the corresponding input. I use this capabilty in my ActionLists by sending 1-way serial actions to the Pi RFX9600. Then, on my progress page, I'm constantly polling (reading) the response from the serial port that received message during execution of the action list.

Your setup is not as simple as mine in that you need to send HTTP stuff to homeseer. Either way, I'm sure we can find a happy medium but you will need to get past "procedural" models of coding and move into asynchronous models of coding.

If you are in the US or have Facetime/whatsapp, I'd be happy to discuss maybe on Monday/Tuesday of next week.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse