gw.send( ) and transmission errors (revisited)
-
Re: gw.send( ) and transmission errors,
@rickmontana83 suggests "...you might consider adding a "resync" timer that sends the current state regardless of changes every so often. So even if something is dropped you have a bounded amount of time where things are in the wrong state".
I like this idea but it got me thinking - instead of periodically resending current state of a sensor val, why not periodically do request(<childid>, <valuetype>) for that value instead and then in arduino receive() method check the returned value for difference from current local value. if diff, resend with send(). The particular sketch I'd do this for never turns off the radio so I should get most GW messages.
I realize you'd be more than doubling the number of messages between node and GW. Instead of a single send() you're doing request() followed by callback to receive() followed by send() if the values are different. The reason this is attractive to me is - I would only do a send() for a value change, either the original change or detection that send() of the original change was lost. This means I should always have the correct, or nearly correct, date stamp associated with the value in Vera so I get better status as to when a sensor value actually changed.
Any thoughts?
-
Re: gw.send( ) and transmission errors,
@rickmontana83 suggests "...you might consider adding a "resync" timer that sends the current state regardless of changes every so often. So even if something is dropped you have a bounded amount of time where things are in the wrong state".
I like this idea but it got me thinking - instead of periodically resending current state of a sensor val, why not periodically do request(<childid>, <valuetype>) for that value instead and then in arduino receive() method check the returned value for difference from current local value. if diff, resend with send(). The particular sketch I'd do this for never turns off the radio so I should get most GW messages.
I realize you'd be more than doubling the number of messages between node and GW. Instead of a single send() you're doing request() followed by callback to receive() followed by send() if the values are different. The reason this is attractive to me is - I would only do a send() for a value change, either the original change or detection that send() of the original change was lost. This means I should always have the correct, or nearly correct, date stamp associated with the value in Vera so I get better status as to when a sensor value actually changed.
Any thoughts?
No response - I feel like Jeb Bush when he said "clap please" :)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login