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. Controllers
  3. Home Assistant
  4. Adding a sensor to the configuration file

Adding a sensor to the configuration file

Scheduled Pinned Locked Moved Home Assistant
15 Posts 3 Posters 3.5k Views 3 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.
  • martinhjelmareM Offline
    martinhjelmareM Offline
    martinhjelmare
    Plugin Developer
    wrote on last edited by
    #2

    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.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kobipes
      wrote on last edited by kobipes
      #3

      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 ?

      1 Reply Last reply
      0
      • gohanG Offline
        gohanG Offline
        gohan
        Mod
        wrote on last edited by
        #4

        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.

        K 1 Reply Last reply
        1
        • gohanG gohan

          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.

          K Offline
          K Offline
          kobipes
          wrote on last edited by kobipes
          #5

          @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 ?

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #6

            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

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kobipes
              wrote on last edited by kobipes
              #7

              @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 ?

              gohanG martinhjelmareM 2 Replies Last reply
              0
              • K kobipes

                @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 ?

                gohanG Offline
                gohanG Offline
                gohan
                Mod
                wrote on last edited by
                #8

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

                K 1 Reply Last reply
                0
                • gohanG gohan

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

                  K Offline
                  K Offline
                  kobipes
                  wrote on last edited by
                  #9

                  @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 ...

                  1 Reply Last reply
                  0
                  • gohanG Offline
                    gohanG Offline
                    gohan
                    Mod
                    wrote on last edited by
                    #10

                    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

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kobipes
                      wrote on last edited by kobipes
                      #11

                      @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 ?

                      1 Reply Last reply
                      0
                      • gohanG Offline
                        gohanG Offline
                        gohan
                        Mod
                        wrote on last edited by
                        #12

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

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

                        1 Reply Last reply
                        0
                        • K kobipes

                          @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 ?

                          martinhjelmareM Offline
                          martinhjelmareM Offline
                          martinhjelmare
                          Plugin Developer
                          wrote on last edited by
                          #13

                          @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.

                          K 1 Reply Last reply
                          0
                          • martinhjelmareM martinhjelmare

                            @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.

                            K Offline
                            K Offline
                            kobipes
                            wrote on last edited by
                            #14

                            @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 ?

                            martinhjelmareM 1 Reply Last reply
                            0
                            • K kobipes

                              @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 ?

                              martinhjelmareM Offline
                              martinhjelmareM Offline
                              martinhjelmare
                              Plugin Developer
                              wrote on last edited by
                              #15

                              @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.

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


                              20

                              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