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. Help on ideias for code

Help on ideias for code

Scheduled Pinned Locked Moved Development
3 Posts 2 Posters 612 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.
  • SoloamS Offline
    SoloamS Offline
    Soloam
    Hardware Contributor
    wrote on last edited by
    #1

    Hello all, I'm now building my project to control my home, mainly I'm using my custom board that you can find on openhardware, here.

    The main feature of this board is the ability to control the lights from the controller (openhab) and a switch that I add directly connected to the node. My main idea is to keep the mechanic switches of my house and add it the stack of controlling by openhab. Now my main problem.

    If by some problem my gateway is down or my server with openhab is down, the node will not enter the loop part of the arduino code, and I will not be able to control my nodes.

    My idea is that the node boots without depending on the gateway, so that I can control it always, I know that there is a variable to declare that does this, can you tell me what it is?

    Now a question, lets assume that I boot my node and my gateway is down. And then the gateway comes back online, will I have to reboot all my nodes to they register on the gateway?

    Second problem, my gateway is a MQTT gateway, so allso, if my MQTT broker is down, the gateway will not boot. Can I bypass that and make it control only my nodes, without the MQTT? And what will happen when the MQTT broker comes back online?

    Thank You

    1 Reply Last reply
    1
    • rejoe2R Offline
      rejoe2R Offline
      rejoe2
      wrote on last edited by rejoe2
      #2

      Not sure about the MQTT thing, but in general, you may add a

      #define MY_TRANSPORT_WAIT_READY_MS 1
      

      to make nodes fully boot and enter the loop() without connection to the controller. As soon as the controller is available, the presentation() will be executed.

      There exists also a "light synchonising switch" example somewhere in the forum. As far as I remember, this code checks if connection to gw is available on a regular basis and keeps controller also updated in case it reapears after manual switches (in case connection is lost during normal operation). Should be not to hard to find...

      EDIT: This should be the mentionned thread.

      Controller: FHEM; MySensors: 2.3.1, RS485,nRF24,RFM69, serial Gateways

      1 Reply Last reply
      0
      • SoloamS Offline
        SoloamS Offline
        Soloam
        Hardware Contributor
        wrote on last edited by
        #3

        That is it! Thank you!

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


        25

        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