Adding a sensor to the configuration file



  • Hello,

    I followed exactly these instructions :
    link text , also bought a RPI3 and installed Hassio + configurator adds on. The problem is that I can't figure out what to write in the configuration files in order to be able to view my motion sensor in the home assistant gui. I've got confused with this : link text
    Can anybody please guide me step by step ?

    Thanks a lot


  • Plugin Developer

    Have you read about the mysensors network?
    https://www.mysensors.org/about/network

    You need to have basic knowledge of the different parts of a mysensors network before you start configuring the controller.

    You should also read about the different gateway options.

    https://www.mysensors.org/build/select_gateway

    If you know the different parts of the network you will more easily understand how to configure the controller.



  • Hi martin,

    I've read before about my sensors network and read it now once again. Please correct me if I'm wrong (according to what I built link text), just want to arrange the mess in my mind from the 'labels' side (what is what) :

    1. Gateway (GW) - my 'gateway' is the Arduino nano which is connected to the nrf24 module which (the Arduino nano) communicate with it (with the nrf24) through the SPI protocol. The Arduino is connected serially to to the RPI3 via the USB connector.

    2. Sensor node (S)- the 'sensor' compromise of a motion sensor connected to an arduino and nrf24 (three things connected together called 'the sensor' )

    3. Home automation controller - The RPI3 + the 'Home assistant' sw

    the sensorId is the CHILD ID which equals to 1 (also in the example - the 'sketch')

    Am I right untill now ?

    About the second link : link text, I've got a little bit confused between the different types of GW.
    Does the "serial gateway" option stated in the link means that I need to connect the nrf24 (connected to the arduino ) to the RPI3 via its usb port ?


  • Mod

    with serial gateway you need to have the arduino connected to raspberry via USB port, the NRF24 module is wired on the arduino.
    There is also the raspberry gateway option where you can compile a gateway program running on raspberry that will use the NRF24 directly on the GPIO. As raspberry gateway you can compile it with the 3 options serial/ethernet/mqtt just as the arduino counterpart.



  • @gohan I connected the arduino to raspberry via USB port and wired the NRF24 module on the arduino, also uploaded the 'serial gateway' sketch from mysensors api v2.2 to the arduino . The problem is that I got an error in the configuration.yaml file (using home assistant) although I followed exactly instructions on : link text

    0_1524089982168_65d4ad54-8b36-45ed-a0c1-4787ff92cd6b-image.png

    and I confirmed the USB connection (RPI3 - arduino) by writing in the terminal :

    0_1524090045847_96c69ff1-853d-40c5-ab9c-6443e6ed57cb-image.png

    The error I get is :

    0_1524090082246_d73f942d-518d-4e03-8838-823b814f6e1e-image.png

    and the log file (via configurator adds on) :

    0_1524090215120_error log.png

    Can you please point me out on the problem and how to fix it ?


  • Mod

    Actually I can't help much on HA since I never used it, but I can tell you I personally prefer working with the ethernet gateway



  • @gohan In order to use the Ethernet gateway I need a Ethernet module and I I'll have to wait for a very long time 😕 What type of home automation controller are you using instead of the 'Home assistant' ?

    @martinhjelmare ? have a clue ? familiar with Home assistant first serial gateway configuration and can help me ?


  • Mod

    @kobipes you can wire the radio on the raspberry directly or use an esp8266



  • @gohan OK, after wiring the nrf24 directly to the Raspberry pi GPIO, what should I need to write in the configuration.yaml file to identify it ? No doubts that this type of wiring is also a serial gateway but I have no clue what to write in the configuration file ...


  • Mod

    Follow instructions for ethernet gateway software and how to compile it. About configuration in yaml file, I don't know, sorry... I don't use it



  • @gohan OK, I'll give the esp8266 a chance. If I got you right , what you suggest is to replace the Ethernet module suggested here : link text with the esp8266 ? Can you please reefer me to a tutorial or a link of how to connect and to configure ?


  • Mod

    https://www.mysensors.org/build/esp8266_gateway

    Always refer to the Connect the radio page on how to wire the nrf24 module


  • Plugin Developer

    @kobipes

    Are you using Hass.io?

    The config validation when using Hass.io doesn't seem reliable.

    I've never used Hass.io so I can't really help you better than this. You can try to search this forum and the home assistant forum for similar questions.



  • @martinhjelmare

    What are you using instead of hass.io ? maybe I'll consider using it too if it's working.

    Regarding my problem , I've got this message :
    "Invalid config for [mysensors]: not a valid value for dictionary value @ data['mysensors']['gateways'][0]['device']. Got /'dev/ttyUSB0'.

    I connected to the terminal through SSH are port 22 and typed : ls /dev , saw the tty folder but it was empty (expected USB0 to appear there). But when I typed dmesg | grep tty I see : "ch341-uart converter now attached to ttyUSB0". Really confused ! Though maybe I need to enable the USB0 port but didn't find any clue how to do it. In what forum can I ask for help for this kind of problem ?


  • Plugin Developer

    @kobipes

    I think you will get the best help regarding USB exposure in Hass.io in the Hass.io section of the home assistant community forum.

    I'm using hassbian.


 

355
Online

7.9k
Users

8.8k
Topics

94.2k
Posts