Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. erangaj
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by erangaj

    • erangaj

      Pro Mini 3.3v does not receive messages
      Troubleshooting • • erangaj  

      9
      0
      Votes
      9
      Posts
      1671
      Views

      sundberg84

      @erangaj - good! I hope you find the cause of this - let me know if I can do anything else.
    • erangaj

      Frequent !TSF:MSG:SIGN FAIL issues
      Troubleshooting • • erangaj  

      6
      0
      Votes
      6
      Posts
      2146
      Views

      Anticimex

      @erangaj
    • erangaj

      Home Assistant does not recognise the switch
      Home Assistant • • erangaj  

      8
      0
      Votes
      8
      Posts
      4720
      Views

      martinhjelmare

      @Efflon It can't be done during presentation cause the node isn't registered yet at the gateway at that time. Default settings in mysensors requires nodes to be registered before the gateway allows them to send in values. In mysensors 2.1.x setup is called after registration, so it is possible to use that for sending values, but I would still recommend to do it in the loop. Reason is, in some cases you want to resend the initial values, and then setup is not suitable as it's only called once. Eg if your're using the ethernet gateway and have local sensors on the gateway, when home assistant connects to the gateway, the gateway will re-run presentation and continue with the loop. But setup will not be called again, as it already has been called when the gateway was first started. So if you would send initial values of sensors in setup on a gateway, the sensors wouldn't show in home assistant, cause the initial values would already be sent by the time home assistant connects to the gateway. Best way, I think, is to use an if block in the loop where you send the values and then request them from home assistant. You use a boolean variable, that you can turn on/off, that decides if the if block should be entered. You have the boolean True by default, and then set it to False when you have received the initial values back from home assistant in receive. This is described in the example sketch here: https://home-assistant.io/components/mysensors/#presentation