Interface to Comfort

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
John_Paul_128
Member
Posts: 15
Joined: Tue Apr 15, 2003 9:33 am

Interface to Comfort

Post by John_Paul_128 »

Hi, I'm trying to take the ascii output of Comfort into Housebot, but am stumbling on the escape character and how to strip out the ascii following this character.



Does anyone have any ability to assist?



thanks, John



BTW, Scott...excellent application...thanks
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

John,



I presume you are using the Generic Serial Interface and Device to handle this?



I can't think of any easy way to do this. The hard way would be to create a Script Device that can strip the escape character and do any data massaging that you need.



You have to jump through a few hoops but you should be able to do this:
  • 1. Add a new Alpha Property to the Generic Serial Device (something like 'Processed Data').
    2. Create a new Script Device and script file.
    3. Create a Task that has a condition to monitor the 'Received Data' Property of the Generic Serial Device. To get it to trigger, you will have to do something odd like set the condition for the Received Data Property to 'not equal' something that it would never actually equal (like != a593ld!). This will cause the Task to trigger whenever the Received Data Property Value changes.
    4. Add a single action to the Task to start the script.
    5. Have the script take the Received Data Property and remove the escape sequence. It can then set the new 'Processed Data' Property from the Script.
Good luck,

Scott
Post Reply