Feedback Response Terminator Questions...
Posted: Mon Nov 24, 2014 9:56 pm
I apologize if these questions have been answered already somewhere else, but after examining the Demopad manuals and Forums, I have been unable to find any relevant discussions...
I am using Demopad to control a Universal Devices ISY994. I have managed to successfully set it up to use subscription services such that the ISY will update Demopad with changes in status without requiring repetitive polling.
Unfortunately, the ISY API doesn't seem to provide the same Response Terminator for all feedback. In particular, the Feedback I am trying to solicit is either returned ending in "</S:Envelope>" or "</Event>" (translated to Hex of course). In neither case does it append these with either a \x0A or \x0D. This seems to mean that I require two sets of devices/feedback to correctly identify both sets of responses which could otherwise by accomplished using one Regex expression. I have tried just using the common ">" (\x3E) without success. I am guessing it is because the ">" is peppered throughout each line of all responses.
Several questions,
1. How exactly does Demopad use the Response Terminator? Does it use the Response Terminator to determine which lines to parse for Feedback or does it parse every line until it sees the first instance of the response terminator? Something else entirely?
2. Is there any way to use an OR function in specifying the Response Terminator on one device? i.e. - </s:Envelope> or </Event>? I know this is a long shot, but it would be nice to avoid having to define two separate devices and extensive sets of feedback for basically receiving the same data simply because ISY sends different device terminators for what is otherwise almost identical data.
3. Am I missing something? Can anyone offer any other advice or do I need to set up a different device for each different Response Terminator for which I desire feedback?
Thanks in advance for the assistance.
Andy
I am using Demopad to control a Universal Devices ISY994. I have managed to successfully set it up to use subscription services such that the ISY will update Demopad with changes in status without requiring repetitive polling.
Unfortunately, the ISY API doesn't seem to provide the same Response Terminator for all feedback. In particular, the Feedback I am trying to solicit is either returned ending in "</S:Envelope>" or "</Event>" (translated to Hex of course). In neither case does it append these with either a \x0A or \x0D. This seems to mean that I require two sets of devices/feedback to correctly identify both sets of responses which could otherwise by accomplished using one Regex expression. I have tried just using the common ">" (\x3E) without success. I am guessing it is because the ">" is peppered throughout each line of all responses.
Several questions,
1. How exactly does Demopad use the Response Terminator? Does it use the Response Terminator to determine which lines to parse for Feedback or does it parse every line until it sees the first instance of the response terminator? Something else entirely?
2. Is there any way to use an OR function in specifying the Response Terminator on one device? i.e. - </s:Envelope> or </Event>? I know this is a long shot, but it would be nice to avoid having to define two separate devices and extensive sets of feedback for basically receiving the same data simply because ISY sends different device terminators for what is otherwise almost identical data.
3. Am I missing something? Can anyone offer any other advice or do I need to set up a different device for each different Response Terminator for which I desire feedback?
Thanks in advance for the assistance.
Andy