Devices that only reply with an ACK?
vegastech
Posts: 369
What can I do to provide feedback for a device that only replies with an ACK when a command is received? I haven't dealt with 232 devices like that (usually denon receivers that reply with the string sent, so far). I was thinking about a variable, but should it be something like when I send a string, place it into a buffer, and when an ACK is received, pull the data from the buffer to populate feedback? I'm at a bit of a loss.
0
Comments
I've always thought the choice of the term 'ACK' was a bit of a problem. I know it means 'ACKNOWLEDGE' and all that. But, to me it sounds to much like something choking.
By the way, I"m with Dave. If it doesn't send me real feedback, it's an IR device in my mind.
--John
I have found that most devices that only have a ACK respsonse to an action have a dedicated status command, so it tends to work in most cases.
But add me to voice of dissent for protocol writers that can not be "bothered" it seems to flesh out a proper protocol. Maybe they should be made to implement their own protocols and see how they like it
But when asking for lamp or inputs status, it replies with '0', '1' or something else.
I can imagine this is also true for the device vegastech is controlling, but i could be wrong
Usually for those, I use a timeline, to poll once for all the possible things that I am tracking.
data_event[dvDevice]
{
string:
{
select
{
active(find_string(data.text,"'Ack'",1)):
{
timeline_create(TL,TLarray,length_array(tlarray),timeline_absolute,timeline_once)
}
}
}
}
timeline_event[TL]
{
switch(timeline.sequence)
case 1:
{
send_string dvDevice,"'query1',13"
}
Case 2:
{
send_string dvDevice,"'query2',13"
}
}
This way everytime you are getting an ACK back from a device you time the controller to go out and check to see what has changed.