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. Development
  3. Need advice for sync nodes

Need advice for sync nodes

Scheduled Pinned Locked Moved Development
1 Posts 1 Posters 802 Views 1 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.
  • scalzS Offline
    scalzS Offline
    scalz
    Hardware Contributor
    wrote on last edited by scalz
    #1

    Hi.
    I have some questions about syncing node. I would like to have sync nodes especially for button/switch node so it could be low power with sleeping and not miss msg.
    So to have a very basic proof of concept, and keep mysensors lib and GW like it is, I started to do things like this :

    • if controller (in my case jeedom) sent to my serial GW a V_LIGHT or V_DIMMER msg, the GW reroute it to the NodeSync.

    • NodeSync is a node which receives GW msg (only V_LIGHT, V_DIMMER) and stores them in a buffer. Every x seconds NodeSync sends sort of heartbeat in order to create a sync network. Furthermore, it sends the buffer every x ms to the switch nodes. Of course, it needs to care about timings (in NodeSync and others sync switch nodes) so it is always the same. Sleep/Wake up cycle are set in .h

    • Switch Node works like this : when powered up, it waits for example 2seconds to get the heartbeat. It sends ack so NodeSync calculates offset RX-TX in order to adjust timings if needed.
      Then the Switch Node wakes up every x ms (synchronized with NodeSync) so it can receives buffer sent by NodeSync if command available. Each x seconds it receives the heartbeat again and resync.
      So this node is in desynchronized (if I click button, it sends directly to GW) and synchronized (if controller send command, node receives it from nodesync).

    For now it is basic, I don't care of repeater case (moreover I will use rfm69 in near future so maybe I won't need repeater I hope). it works but I have just 3 nodes testing this actually.

    Questions :

    • in my case, I have two networks : one normal desynchronized and one synchronized by the NodeSync. I did this because I didn't want to overload the GW with syncing work and miss msg.
      But, if GW debug logs is enabled, I can see that if NodeSync sends to a sync Switch (node to node comm), GW does not do anything (it's ok) but it reads it. So I am thinking if I cound not have a problem here.
      What if my NodeSync is sending its buffer (with for examples 20 commands stored), and my GW at same time receives a doorlock messages or anything else from the desynchronized network? Should I have data collisions in my GW? should my GW be flooded and should I lost some comms?

    • If yes, I think I am not doing things in good way. So it would be better to sync all the network and the GW should be the synchronizer. Another idea is the controller takes care of the sync. Or maybe an intermediate controller like node-red for example.
      I am trying to keep Mysensors topology and add syncing options..Don't know if I am doing right. And you, what do you think about this? Is someone already syncing his Mysensors network?

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


    19

    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