Home Assistant - Evok - extension xS10 ?



  • Re: Unipi neuron home assistant setup

    Hi all

    I succeeded in controlling my M205 unit with home assistant following the topic above, but I also have to address an extension module xS10.
    Am I right that the extension is also available through the modbus on localhost port 502 ?
    How can I address those other inputs/outputs ?

    Or do I have to find a way to add a second modbus definition ?

    Another thing: My first test seems that reading the inputs is not so fast, and I'm afraid that a toggle switch will not be detected by Home Assistant. Maybe I have to work with websockets ? Any idea how I can do that with HA+EVOK ?

    Our house is almost rebuilt; we have to move in in less than 2 weeks, and the lights aren't working yet !! :-). So it is quite an issue for me at the moment...

    Thanks for your answers!
    Steven


  • administrators

    Hello @stevenbrs,
    The ModbusTCP server on localhost:502 is only for communication with the inner hardware of the PLC, not with the extensions.
    The extensions are to be connected by RS485. In the OS, you have this HW serial port accessible as /dev/extcomm/0/xxx, depending on the order of the serial port on the PLC (RS485 1.1 is /dev/extcomm/0/0, RS485 2.1 is /dev/extcomm/0/1,...).

    With situation like this, you need to convince the Home Assistant to communicate by ModbusRTU protocol via mentioned serial port.

    The communication of the ModbusTCP server with the inner HW of the PLC is reasonably fast. The speed problem you are experiencing almost always lies in the software which communicates with the ModbusTCP server. We have seen it across all diferent kinds of applications even with our very own Mervis. Few weeks ago, we have discussed this on another thread: https://forum.unipi.technology/topic/694/unipi-neuron-home-assistant-setup/2

    Unfortunately we don't have any direct experience with the Home Assistant, so I am not able to give you any direct advice. Maybe @Martijn-Hemeryck could chip in:)?

    Best regards,
    Martin



  • Hi Martin,

    A late thank you for your answer !
    I found 2 different solutions for my problem, the second being the best:

    1. Running Home Assistant on the Unipi, creating 2 new Modbus drivers (only one is provided out of the box and not sufficient to both access the local TCP-Modbus and the RTU Modbus of the extension.
      Sadly this was not very stable and too slow to detect push-buttons

    2. I created a layer between EVOK Websockets and MQTT, which is a lot faster than when HA did the polling. You can find the project at https://github.com/StevenBrs/evok2mqtt. (first baby steps in Python, needs some improvements!)
      It probably is fairly similar to the one from Martijn you linked in your previous answer, only that my thing is running on Python, so does not need a lot more libraries than already available in the EVOK RPi image.

    I think it would be nice if Unipi had some more attention for Home Assistant, since it's a wide-spread and popular platform.

    I'm still a beginner with both Neuron and HA (and Python), but if I can be of any assistance I'd be glad to help you out !


  • administrators

    Hi Steven,
    thanks for sharing us your experience with UniPi and kudos on the EVOK-MQTT bridge! We definitely want to support some ready-to-use opensource home automation SW and Home Assistant is one of the candidates (alongside the openHAB). But we have no definite plans yet...

    Martin