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. MySensors --> MQTT --X Home Assistant

MySensors --> MQTT --X Home Assistant

Scheduled Pinned Locked Moved Home Assistant
5 Posts 2 Posters 59 Views 2 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.
  • OldSurferDudeO Offline
    OldSurferDudeO Offline
    OldSurferDude
    wrote on last edited by OldSurferDude
    #1
    • The source of the data is a PVPowered Inverter
    • The PVM1010 MODULE in the inverter can send the data as UDP datagrams.
    • A TP-link micro router connects the module to a network
    • The network router provides module with an IP address via DHCP
    • An Arduino Uno with an W5100 ethernet shield and nRF24 Radio with MySensors and custom software acts as a go-between to an MQTT broker on the network.
    • Once the data is on the MQTT broker, Home Assistant picks up the data

    It is this last step that is not working. HA is just not seeing the new sensors, like they are not there. Has anyone else seen this? How do I get HA to see the new sensors?

    (Yes, this seems to be an HA issue, and I have the question asked there. I am in hopes that someone that has experienced this problem came up with a solution.)

    electrikE 1 Reply Last reply
    0
    • OldSurferDudeO OldSurferDude
      • The source of the data is a PVPowered Inverter
      • The PVM1010 MODULE in the inverter can send the data as UDP datagrams.
      • A TP-link micro router connects the module to a network
      • The network router provides module with an IP address via DHCP
      • An Arduino Uno with an W5100 ethernet shield and nRF24 Radio with MySensors and custom software acts as a go-between to an MQTT broker on the network.
      • Once the data is on the MQTT broker, Home Assistant picks up the data

      It is this last step that is not working. HA is just not seeing the new sensors, like they are not there. Has anyone else seen this? How do I get HA to see the new sensors?

      (Yes, this seems to be an HA issue, and I have the question asked there. I am in hopes that someone that has experienced this problem came up with a solution.)

      electrikE Offline
      electrikE Offline
      electrik
      wrote on last edited by
      #2

      @OldSurferDude can you post your sketch?
      Did you follow the presentation and first time sending procedure? https://www.home-assistant.io/integrations/mysensors/

      OldSurferDudeO 2 Replies Last reply
      0
      • electrikE electrik

        @OldSurferDude can you post your sketch?
        Did you follow the presentation and first time sending procedure? https://www.home-assistant.io/integrations/mysensors/

        OldSurferDudeO Offline
        OldSurferDudeO Offline
        OldSurferDude
        wrote on last edited by
        #3

        @electrik

        Yes, I did. The data has been sent many times.

        I did think of something. This Arduino Uno formerly was another sensor and did connect to HA. I will try changing the node number by writing a different number in the first memory location of the Uno's EEPROM.

        Meanwhile:

        Here is my presentation code:

        void presentation()
        {
          char VERstr[10];
          dtostrf(VER,9,2,VERstr);
          // Send the sketch version information to the gateway and Controller
          sendSketchInfo("Solar Monitor", VERstr);
        
          // Register this device as Water flow sensor
          present(CHILD_ID, S_POWER);
        }
        

        This partial image of MQTT Explorer shows that the data did arrive on the broker
        Image of MQTT explorer showing solar monitor data on the MQTT broker

        Your link suggest to turn on the debug logger.

        "
        If you experience dropped messages or that a device is not added to Home Assistant, please turn on debug logging for the mysensors integration and the mysensors package. This will help you see what is going on. Make sure you use these logging settings to collect a log sample if you report an issue about the mysensors integration in our GitHub issue tracker.

        logger:
          default: info
          logs:
            homeassistant.components.mysensors: debug
            mysensors: debug
        

        "

        I find this typical of HA, in its assumption that everyone knows everything about HA. I know very little of the in's and out's of HA. Where do I find this file that needs to be modified? Does HA have to be rebooted once the file is modified? Once the code is operational, where do I find the log file that will be generated when these commands are invoked? How do I get to the github issue tracker to report the issue?

        Thanks for the help!

        OSD

        1 Reply Last reply
        0
        • electrikE electrik

          @OldSurferDude can you post your sketch?
          Did you follow the presentation and first time sending procedure? https://www.home-assistant.io/integrations/mysensors/

          OldSurferDudeO Offline
          OldSurferDudeO Offline
          OldSurferDude
          wrote on last edited by
          #4

          @electrik

          Changing the node number did it!

          New question! ;) How do I remove a used node number from HA? (seriously!)

          OSD

          Code used to change node number:

          #define Ver 1.0
          
          #include <EEPROM.h>
          char inChar;
          
          
          // ------------------------------------------------------------------------------------clearSerialBuffer
          void clearSerialBuffer(){
            while(Serial.available()){
              Serial.read();
              delay(200);
            }
          }
          // ------------------------------------------------------------------------------------expressChar
          void expressChar(){
            Serial.print(inChar); Serial.print(F("'("));Serial.print(uint8_t(inChar));Serial.println(F(")"));
          }
          
          // ------------------------------------------------------------------------------------header
          void header(){
            inChar = EEPROM.read(0);
            Serial.print(F("Current character at address (0) is '"));
            expressChar();
            clearSerialBuffer();
            Serial.print("Enter a character: ");
          }
          
          // ------------------------------------------------------------------------------------setup
          void setup() {
            Serial.begin(115200); Serial.print("\n\rAddress As Character ver "); Serial.println(Ver);
            header();
          }
          // ------------------------------------------------------------------------------------loop
          void loop() {
            
            if (Serial.available()){
              inChar = Serial.read();
              if (inChar <= 32 || inChar >=127){
                Serial.print(F("I don't like '"));
                expressChar();
              }
              else {
                EEPROM.write(0,uint8_t(inChar));
              }
              header();
            }
          }
          
          1 Reply Last reply
          0
          • electrikE Offline
            electrikE Offline
            electrik
            wrote on last edited by
            #5

            great it works!
            Here the steps to delete a node are described:
            https://forum.mysensors.org/topic/10898/can-t-remove-unused-sensors-from-ha/7

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


            23

            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