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. HA not seeing sensors.

HA not seeing sensors.

Scheduled Pinned Locked Moved Home Assistant
7 Posts 3 Posters 1.6k 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.
  • el tigroE Offline
    el tigroE Offline
    el tigro
    wrote on last edited by
    #1

    I'm going crazy, any help appreciated.

    My setup.
    Pi 3 controller on ethernet.
    HASSOS recently installed.
    MQTT.
    NodeMCU 09 wifi gateway.
    My sensors switch / lamp.

    Nodes and gateway talking fine. Controller and gateway register with MQTT server on HA (mosquitto).

    Nodes are registering with gateway but not getting 'initial value' back from HA and repeats request.

    This happened after I updated HA. Any help appreciated.

    monteM 1 Reply Last reply
    0
    • el tigroE el tigro

      I'm going crazy, any help appreciated.

      My setup.
      Pi 3 controller on ethernet.
      HASSOS recently installed.
      MQTT.
      NodeMCU 09 wifi gateway.
      My sensors switch / lamp.

      Nodes and gateway talking fine. Controller and gateway register with MQTT server on HA (mosquitto).

      Nodes are registering with gateway but not getting 'initial value' back from HA and repeats request.

      This happened after I updated HA. Any help appreciated.

      monteM Offline
      monteM Offline
      monte
      wrote on last edited by
      #2

      @el-tigro do you send initial values after presentation? HA won't recognize your sensor if it doesn't send values. You can check what exactly it needs to be sent here: https://www.home-assistant.io/components/mysensors/. There are separate pages for each sensor type with sketch examples.

      el tigroE 1 Reply Last reply
      0
      • monteM monte

        @el-tigro do you send initial values after presentation? HA won't recognize your sensor if it doesn't send values. You can check what exactly it needs to be sent here: https://www.home-assistant.io/components/mysensors/. There are separate pages for each sensor type with sketch examples.

        el tigroE Offline
        el tigroE Offline
        el tigro
        wrote on last edited by
        #3

        @monte
        Node debug. Appears to register but then no response to initial value request.
        0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
        3 TSM:INIT
        4 TSF:WUR:MS=0
        11 TSM:INIT:TSP OK
        12 TSM:INIT:STATID=66
        15 TSF:SID:OK,ID=66
        16 TSM:FPAR
        53 TSF:MSG:SEND,66-66-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
        192 TSF:MSG:READ,0-0-66,s=255,c=3,t=8,pt=1,l=1,sg=0:0
        197 TSF:MSG:FPAR OK,ID=0,D=1
        2060 TSM:FPAR:OK
        2061 TSM:ID
        2062 TSM:ID:OK
        2064 TSM:UPL
        2069 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
        2082 TSF:MSG:READ,0-0-66,s=255,c=3,t=25,pt=1,l=1,sg=0:1
        2086 TSF:MSG:PONG RECV,HP=1
        2089 TSM:UPL:OK
        2092 TSM:READY:ID=66,PAR=0,DIS=1
        2096 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
        2103 TSF:MSG:READ,0-0-66,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
        2110 TSF:MSG:SEND,66-66-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
        2118 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
        4127 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=11,pt=0,l=9,sg=0,ft=0,st=OK:Grey Lamp
        4135 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
        4144 TSF:MSG:SEND,66-66-0-0,s=2,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
        4150 MCO:REG:REQ
        4153 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
        4176 TSF:MSG:READ,0-0-66,s=255,c=3,t=27,pt=1,l=1,sg=0:1
        4182 MCO:PIM:NODE REG=1
        4184 MCO:BGN:STP
        4185 MCO:BGN:INIT OK,TSP=1
        Sending initial value
        4190 TSF:MSG:SEND,66-66-0-0,s=2,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=OK:0
        Requesting initial value from controller
        4198 TSF:MSG:SEND,66-66-0-0,s=2,c=2,t=2,pt=0,l=0,sg=0,ft=0,st=OK:
        Sending initial value
        6207 TSF:MSG:SEND,66-66-0-0,s=2,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=OK:0
        Requesting initial value from controller

        el tigroE 1 Reply Last reply
        0
        • el tigroE el tigro

          @monte
          Node debug. Appears to register but then no response to initial value request.
          0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
          3 TSM:INIT
          4 TSF:WUR:MS=0
          11 TSM:INIT:TSP OK
          12 TSM:INIT:STATID=66
          15 TSF:SID:OK,ID=66
          16 TSM:FPAR
          53 TSF:MSG:SEND,66-66-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
          192 TSF:MSG:READ,0-0-66,s=255,c=3,t=8,pt=1,l=1,sg=0:0
          197 TSF:MSG:FPAR OK,ID=0,D=1
          2060 TSM:FPAR:OK
          2061 TSM:ID
          2062 TSM:ID:OK
          2064 TSM:UPL
          2069 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
          2082 TSF:MSG:READ,0-0-66,s=255,c=3,t=25,pt=1,l=1,sg=0:1
          2086 TSF:MSG:PONG RECV,HP=1
          2089 TSM:UPL:OK
          2092 TSM:READY:ID=66,PAR=0,DIS=1
          2096 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
          2103 TSF:MSG:READ,0-0-66,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
          2110 TSF:MSG:SEND,66-66-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
          2118 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
          4127 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=11,pt=0,l=9,sg=0,ft=0,st=OK:Grey Lamp
          4135 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
          4144 TSF:MSG:SEND,66-66-0-0,s=2,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
          4150 MCO:REG:REQ
          4153 TSF:MSG:SEND,66-66-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
          4176 TSF:MSG:READ,0-0-66,s=255,c=3,t=27,pt=1,l=1,sg=0:1
          4182 MCO:PIM:NODE REG=1
          4184 MCO:BGN:STP
          4185 MCO:BGN:INIT OK,TSP=1
          Sending initial value
          4190 TSF:MSG:SEND,66-66-0-0,s=2,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=OK:0
          Requesting initial value from controller
          4198 TSF:MSG:SEND,66-66-0-0,s=2,c=2,t=2,pt=0,l=0,sg=0,ft=0,st=OK:
          Sending initial value
          6207 TSF:MSG:SEND,66-66-0-0,s=2,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=OK:0
          Requesting initial value from controller

          el tigroE Offline
          el tigroE Offline
          el tigro
          wrote on last edited by el tigro
          #4

          @el-tigro
          I have other nodes / devices and they all do the same.
          HA config

          mysensors:
          gateways:
          - device: '/dev/ttyUSB0'
          persistence_file: '/config/myhouse/mysensors.json'
          - device: mqtt
          persistence_file: '/config/myhouse/mysensors4.json'
          topic_in_prefix: 'mygateway1-out'
          topic_out_prefix: 'mygateway1-in'
          optimistic: false
          persistence: true
          retain: true
          version: '2.0'

          mqtt:
          broker: 192.168.1.***
          port: 1883
          client_id: home-assistant-1
          keepalive: 60

          Gateway code

          #define MY_DEBUG
          #define MY_BAUD_RATE 115200
          #define MY_RADIO_NRF24
          #define MY_GATEWAY_MQTT_CLIENT
          #define MY_GATEWAY_ESP8266
          #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
          #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
          #define MY_MQTT_CLIENT_ID "Gateway"
          #define MY_ESP8266_SSID "BTHub6-36PM"
          #define MY_ESP8266_PASSWORD "88888888"
          #define MY_ESP8266_HOSTNAME "Gateway node"
          #define MY_CONTROLLER_IP_ADDRESS 192, 168, 1,***
          #define MY_IP_GATEWAY_ADDRESS 192,168,1,***
          #define MY_IP_SUBNET_ADDRESS 255,255,255,0
          #define MY_PORT 1883
          #include <ESP8266WiFi.h>
          #include <MySensors.h>

          void setup() {
          }

          void presentation() {
          // Present locally attached sensors here
          }

          void loop() {
          // Send locally attech sensors data here
          }

          el tigroE 1 Reply Last reply
          0
          • el tigroE el tigro

            @el-tigro
            I have other nodes / devices and they all do the same.
            HA config

            mysensors:
            gateways:
            - device: '/dev/ttyUSB0'
            persistence_file: '/config/myhouse/mysensors.json'
            - device: mqtt
            persistence_file: '/config/myhouse/mysensors4.json'
            topic_in_prefix: 'mygateway1-out'
            topic_out_prefix: 'mygateway1-in'
            optimistic: false
            persistence: true
            retain: true
            version: '2.0'

            mqtt:
            broker: 192.168.1.***
            port: 1883
            client_id: home-assistant-1
            keepalive: 60

            Gateway code

            #define MY_DEBUG
            #define MY_BAUD_RATE 115200
            #define MY_RADIO_NRF24
            #define MY_GATEWAY_MQTT_CLIENT
            #define MY_GATEWAY_ESP8266
            #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
            #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
            #define MY_MQTT_CLIENT_ID "Gateway"
            #define MY_ESP8266_SSID "BTHub6-36PM"
            #define MY_ESP8266_PASSWORD "88888888"
            #define MY_ESP8266_HOSTNAME "Gateway node"
            #define MY_CONTROLLER_IP_ADDRESS 192, 168, 1,***
            #define MY_IP_GATEWAY_ADDRESS 192,168,1,***
            #define MY_IP_SUBNET_ADDRESS 255,255,255,0
            #define MY_PORT 1883
            #include <ESP8266WiFi.h>
            #include <MySensors.h>

            void setup() {
            }

            void presentation() {
            // Present locally attached sensors here
            }

            void loop() {
            // Send locally attech sensors data here
            }

            el tigroE Offline
            el tigroE Offline
            el tigro
            wrote on last edited by
            #5

            NODE CODE
            #define MY_DEBUG
            #define MY_RADIO_NRF24
            #define MY_NODE_ID 66
            #include <SPI.h>
            #include <MySensors.h>
            #include <Bounce2.h>
            #define RELAY_PIN 7
            #define BUTTON_PIN 6
            #define CHILD_ID 2
            #define RELAY_ON 1
            #define RELAY_OFF 0
            #include <SPI.h>
            #include <avr/wdt.h>
            #include <Wire.h>
            #define RESETWATCHDOG
            Bounce debouncer = Bounce();
            bool state = false;
            bool initialValueSent = false;

            MyMessage msg(CHILD_ID, V_STATUS);

            void setup()
            {
            Serial.begin(115200);
            pinMode(BUTTON_PIN, INPUT_PULLUP);
            debouncer.attach(BUTTON_PIN);
            debouncer.interval(10);
            digitalWrite(RELAY_PIN, RELAY_ON);
            pinMode(RELAY_PIN, OUTPUT);
            }

            void presentation() {
            sendSketchInfo("Grey Lamp", "1.0");
            present(CHILD_ID, S_BINARY);
            }

            void loop()
            {
            wdt_reset();
            if (!initialValueSent) {
            Serial.println("Sending initial value");
            send(msg.set(state ? RELAY_ON : RELAY_OFF));
            Serial.println("Requesting initial value from controller");
            request(CHILD_ID, V_STATUS);
            wait(2000, C_SET, V_STATUS);
            }

            if (debouncer.update()) {
            if (debouncer.read() == LOW) {
            state = !state;
            send(msg.set(state ? RELAY_ON : RELAY_OFF), true);
            }
            }

            }

            void receive(const MyMessage &message) {
            if (message.isAck()) {
            Serial.println("This is an ack from gateway");
            }

            if (message.type == V_STATUS) {
            if (!initialValueSent) {
            Serial.println("Receiving initial value from controller");
            initialValueSent = true;
            }
            state = (bool)message.getInt();
            digitalWrite(RELAY_PIN, !state ? RELAY_ON : RELAY_OFF);
            send(msg.set(state ? RELAY_ON : RELAY_OFF));
            }
            }

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Michał Szura
              wrote on last edited by
              #6

              Hi
              I have different question doesn't this line give you errors?
              persistence_file: '/config/myhouse/mysensors.json

              1 Reply Last reply
              0
              • el tigroE Offline
                el tigroE Offline
                el tigro
                wrote on last edited by
                #7

                SOLVED..... Such a mug, such a small error. One character missing in wireless key.

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


                17

                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