HomeAssitant MySensors plugin Roadmap



  • Hello,

    I'm long time user of Domoticz and MySensors (❤).

    Domoticz is robust, work really fine, scriptable ... but the UI is old web style, and the python plugin interface not really used (probably about to difficulty to not use async libraries)

    I have discover HASS recently, i'm surprised by all the plugins and the simplicity to install/configure it. It use modern web interface, and the new LoveLace UI seen to be awesome.

    But (there are always a but 🙂 ),

    The support of MySensors is limited: if i have good understand, i have the obligation of take all my sketch and add the code to send all sensors values at the beginning of the loop (just one time) and the code to confirm the value in the receive() ; but MySensors implement the ack and since i save the status of the sensors in the eeprom, the controller can do the same.

    First, have i really good understand ? and if yes, do you plan to implement more the MySensors functions ? (i have tried to read plugin code, but i m not au good python programmer, so i can't help)

    Thank you.

    Ps: sorry to writing English like a french cow 😉


  • Plugin Developer

    Doesn't Home Assistant lack a WYSIWYG of settings things up? That's what kept me from switching away from Domoticz.



  • @alowhum said in HomeAssitant MySensors plugin Roadmap:

    Doesn't Home Assistant lack a WYSIWYG of settings things up? That's what kept me from switching away from Domoticz.

    Yes you must do settings in yaml format, but it's good documented.



  • I am migrating step by step from pimatic to Hass. I still think pimatic is a lot easier to setup and to make rules, etc.. But the community behind hass is big and the ammount of items which can be controlled is huge. The mysensor part is not optimal I am using the MQTT gateway and hope some further development is made.



  • HASS support for MySensors seems adequate.
    Of course, the sensor will not appear on the dashboard until it sends some data. That seems quite logical, as otherwise there would be nothing to display.
    Actuators must report back their real status because receiving a command and successfully executing it can be different things.
    Also, the only way to discover a MySensors node existance is receiving data from it, so the actuators should send some initial state in order to be added into HASS or you can manually edit the mysensors.json file to add the missing nodes by hand but it is not well documented.

    What are the functions you are missing in HASS that exist elsewhere?



  • What would be useful is a function that gets called (if it exists) between presentation and loop. Home Assistant requires that some sort of initial value be sent so that it can learn that the device exists. Obviously, these initial values have to be sent after presentation to the gateway.

    What people end up doing is something like this:

    void loop() 
    {
      if (!initialValuesSent) 
      {
        //send initial values
        initialValuesSent = true;
      }
      //rest of loop function
    } 
    

    That if-statement is executed in each iteration of loop() even though it only matters once. It looks ugly, but more importantly, it consumes unnecessary resources.



  • Of course it's ugly. The correct way for this is to move the initial readings posting to the setup function:

    void sendSensorData()
    {
      // Collect, process and send the sensors data here
      send(msgSample.set(42, 1));
    }
    
    void presentation()
    {
      // Send the sketch version information to the gateway
      sendSketchInfo("Gen", "1.0");
      present(CHILD_ID_SAMPLE, S_LIGHT_LEVEL, "L");
    }
    
    
    void setup()
    {
      // Code to initialize the sensors and stuff.
      sendSensorData();
      timer.every(UPDATE_INTERVAL, sendSensorData);
    }
    
    
    void loop()
    {
      // Only timer update and possibly OTA checks go into the loop itself. 
      // All the other operations are called by the timer.
      timer.update();
    }
    


  • First of all, congratulations on being a long-time user of Domoticz and MySensors. Having used both of them, I have seen all the things you've pointed out in your comment, and the only thing I can say about it is that when you compare two parts of the same coin, you will always end up having cons and pros of using either of them.


  • Plugin Developer

    I've also used them both. Now I'm a very happy Webthings Gateway user. Try it!

    [edit by nca78] fixed link, should be without www.


Log in to reply
 

Suggested Topics

  • 1
  • 3
  • 5
  • 2
  • 3
  • 5

65
Online

11.4k
Users

11.1k
Topics

112.7k
Posts