Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. gw.send( ) and transmission errors (revisited)

gw.send( ) and transmission errors (revisited)

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 802 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • coffeeaddictC Offline
    coffeeaddictC Offline
    coffeeaddict
    wrote on last edited by
    #1

    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?

    coffeeaddictC 1 Reply Last reply
    0
    • coffeeaddictC coffeeaddict

      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?

      coffeeaddictC Offline
      coffeeaddictC Offline
      coffeeaddict
      wrote on last edited by
      #2

      No response - I feel like Jeb Bush when he said "clap please" :)

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #3

        Seems a bit complicated, and as you say, will increase radio traffic.

        But do whatever works for you. The project is called MySensors for a reason ;)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        10

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular