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. fail presentation

fail presentation

Scheduled Pinned Locked Moved Home Assistant
presentationhumidityhome-assistant
7 Posts 4 Posters 2.8k Views 4 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.
  • Luc3asL Offline
    Luc3asL Offline
    Luc3as
    wrote on last edited by
    #1

    hello I am using latest Home Assistant with mysensors installed and I am getting this strange error in log after connecting humidity sensor node

     INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.10
    Apr 17 21:46:51 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
    Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=11,pt=0,l=8,sg=0:Humidity
    Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=0,c=0,t=7,pt=0,l=0,sg=0:
    Apr 17 21:47:00 luc3as-ha hass[11884]: Exception in thread Thread-2:
    Apr 17 21:47:00 luc3as-ha hass[11884]: Traceback (most recent call last):
    Apr 17 21:47:00 luc3as-ha hass[11884]: File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    Apr 17 21:47:00 luc3as-ha hass[11884]: self.run()
    Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 328, in run
    Apr 17 21:47:00 luc3as-ha hass[11884]: response = self.handle_queue()
    Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 233, in handle_queue
    Apr 17 21:47:00 luc3as-ha hass[11884]: reply = func(*args, **kwargs)
    Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 115, in logic
    Apr 17 21:47:00 luc3as-ha hass[11884]: self._handle_presentation(msg)
    Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 49, in _handle_presentation
    Apr 17 21:47:00 luc3as-ha hass[11884]: self.sensors[msg.node_id].add_child_sensor(msg.child_id,
    Apr 17 21:47:00 luc3as-ha hass[11884]: KeyError: 25
    Apr 17 21:47:00 luc3as-ha hass[11884]: INFO:homeassistant.components.device_tracker.asuswrt:Checking ARP
    
    
    TheoLT martinhjelmareM 2 Replies Last reply
    0
    • Luc3asL Luc3as

      hello I am using latest Home Assistant with mysensors installed and I am getting this strange error in log after connecting humidity sensor node

       INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.10
      Apr 17 21:46:51 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
      Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=11,pt=0,l=8,sg=0:Humidity
      Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
      Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=0,c=0,t=7,pt=0,l=0,sg=0:
      Apr 17 21:47:00 luc3as-ha hass[11884]: Exception in thread Thread-2:
      Apr 17 21:47:00 luc3as-ha hass[11884]: Traceback (most recent call last):
      Apr 17 21:47:00 luc3as-ha hass[11884]: File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
      Apr 17 21:47:00 luc3as-ha hass[11884]: self.run()
      Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 328, in run
      Apr 17 21:47:00 luc3as-ha hass[11884]: response = self.handle_queue()
      Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 233, in handle_queue
      Apr 17 21:47:00 luc3as-ha hass[11884]: reply = func(*args, **kwargs)
      Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 115, in logic
      Apr 17 21:47:00 luc3as-ha hass[11884]: self._handle_presentation(msg)
      Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 49, in _handle_presentation
      Apr 17 21:47:00 luc3as-ha hass[11884]: self.sensors[msg.node_id].add_child_sensor(msg.child_id,
      Apr 17 21:47:00 luc3as-ha hass[11884]: KeyError: 25
      Apr 17 21:47:00 luc3as-ha hass[11884]: INFO:homeassistant.components.device_tracker.asuswrt:Checking ARP
      
      
      TheoLT Offline
      TheoLT Offline
      TheoL
      Contest Winner
      wrote on last edited by
      #2

      @Luc3as it seems that you have found a bug in Home Assistant. Haven't seen a Stack trace in a while. I think it would help the developers if you can post the log file including the stack trace.

      1 Reply Last reply
      1
      • Luc3asL Luc3as

        hello I am using latest Home Assistant with mysensors installed and I am getting this strange error in log after connecting humidity sensor node

         INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): 192.168.1.10
        Apr 17 21:46:51 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
        Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=11,pt=0,l=8,sg=0:Humidity
        Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
        Apr 17 21:46:54 luc3as-ha hass[11884]: INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 25-25-0 s=0,c=0,t=7,pt=0,l=0,sg=0:
        Apr 17 21:47:00 luc3as-ha hass[11884]: Exception in thread Thread-2:
        Apr 17 21:47:00 luc3as-ha hass[11884]: Traceback (most recent call last):
        Apr 17 21:47:00 luc3as-ha hass[11884]: File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
        Apr 17 21:47:00 luc3as-ha hass[11884]: self.run()
        Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 328, in run
        Apr 17 21:47:00 luc3as-ha hass[11884]: response = self.handle_queue()
        Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 233, in handle_queue
        Apr 17 21:47:00 luc3as-ha hass[11884]: reply = func(*args, **kwargs)
        Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 115, in logic
        Apr 17 21:47:00 luc3as-ha hass[11884]: self._handle_presentation(msg)
        Apr 17 21:47:00 luc3as-ha hass[11884]: File "/root/.homeassistant/lib/mysensors/mysensors.py", line 49, in _handle_presentation
        Apr 17 21:47:00 luc3as-ha hass[11884]: self.sensors[msg.node_id].add_child_sensor(msg.child_id,
        Apr 17 21:47:00 luc3as-ha hass[11884]: KeyError: 25
        Apr 17 21:47:00 luc3as-ha hass[11884]: INFO:homeassistant.components.device_tracker.asuswrt:Checking ARP
        
        
        martinhjelmareM Offline
        martinhjelmareM Offline
        martinhjelmare
        Plugin Developer
        wrote on last edited by martinhjelmare
        #3

        @Luc3as

        This is due to the node not being presented before any sensors are presented. That radio message was probably dropped.

        A fix for the error has been merged at pymysensors already, buy you still need to make sure the node is presented before sensors can be added.

        The node presentation message is sent automatically when gw.begin or similar in dev branch is called.

        You can resend the presentation with the present method. To present the node use child id 255 and sensor type 17 for regular node or 18 for repeater node.

        See
        https://github.com/theolind/pymysensors/pull/38

        and for discussion
        https://github.com/theolind/pymysensors/pull/37

        The fix will be included in the next release of home assistant.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kielnino
          wrote on last edited by kielnino
          #4

          Hi, I also struggle with the presentation of my sensors.

          I've installed HA 0.18.2 over pip. My config on a raspberry pi looks as follows:

          ...
          sensor:
            platform: mysensors
          
          mysensors:
            gateways:
              - device: '/dev/ttyUSB0'
                persistence_file: '/home/pi/.homeassistant/mysensors.json'
                baud_rate: 115200
            debug: true
            persistence: true
            version: '1.5'
            optimistic: false
          

          On HA startup I get:

          INFO:mysensors.mysensors:Trying to connect to /dev/ttyUSB0
          INFO:homeassistant.components.http:Starting web interface at http://0.0.0.0:8123
          INFO:homeassistant.core:Timer:starting
          INFO:mysensors.mysensors:/dev/ttyUSB0 is open...
          INFO:mysensors.mysensors:Connected to /dev/ttyUSB0
          INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
          INFO:netdisco.service:Scanning
          INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:gateway started, id=0, parent=0, distance=0
          

          I've set up a node with the orginal Binary-Sensor example from https://home-assistant.io/components/binary_sensor.mysensors/.
          If I power the node up, I get in the log:

          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0:1.5.4
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0:BinarySensor
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=0,t=0,pt=0,l=0,sg=0:
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0:0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          

          and if I push the button on the node I get:

          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0:1
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0:0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          INFO:homeassistant.components.mysensors:No sketch_name: node 0
          

          So for me it looks like everything is working, but the sensor dont show up on the web interface.

          What am I missing?

          martinhjelmareM 1 Reply Last reply
          0
          • K kielnino

            Hi, I also struggle with the presentation of my sensors.

            I've installed HA 0.18.2 over pip. My config on a raspberry pi looks as follows:

            ...
            sensor:
              platform: mysensors
            
            mysensors:
              gateways:
                - device: '/dev/ttyUSB0'
                  persistence_file: '/home/pi/.homeassistant/mysensors.json'
                  baud_rate: 115200
              debug: true
              persistence: true
              version: '1.5'
              optimistic: false
            

            On HA startup I get:

            INFO:mysensors.mysensors:Trying to connect to /dev/ttyUSB0
            INFO:homeassistant.components.http:Starting web interface at http://0.0.0.0:8123
            INFO:homeassistant.core:Timer:starting
            INFO:mysensors.mysensors:/dev/ttyUSB0 is open...
            INFO:mysensors.mysensors:Connected to /dev/ttyUSB0
            INFO:homeassistant.components.http:"GET /api/stream?api_password=no_password_set&restrict=state_changed,component_loaded,service_registered HTTP/1.1" 200 -
            INFO:netdisco.service:Scanning
            INFO:homeassistant.components.http:"GET /api/bootstrap HTTP/1.1" 200 -
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:gateway started, id=0, parent=0, distance=0
            

            I've set up a node with the orginal Binary-Sensor example from https://home-assistant.io/components/binary_sensor.mysensors/.
            If I power the node up, I get in the log:

            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0:0
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0:1.5.4
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0:BinarySensor
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=0,t=0,pt=0,l=0,sg=0:
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0:0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            

            and if I push the button on the node I get:

            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0:1
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:mysensors.mysensors:n:0 c:0 t:3 s:9 p:read: 0-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0:0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            INFO:homeassistant.components.mysensors:No sketch_name: node 0
            

            So for me it looks like everything is working, but the sensor dont show up on the web interface.

            What am I missing?

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

            @kielnino

            Hi!

            First you should remove:

            sensor:
              platform: mysensors
            

            Then your node has id 0, which is usually reserved for the gateway. So that is kinda strange. It shouldn't matter for the pymysensors API, though, I think. It seems as if the sketch name is not picked up by pymysensors/home-assistant for node 0 even though that message is received.

            Only dev branch is able to have sensors on gateway, and you're running version 1.5.4, and you said you connected a separate node with binary sensor.

            If you don't specify a node id in the begin method in the sketch and the node hasn't got a stored old node id in the eeprom, pymysensors will provide a node id, automatically. But the lowest automatic node id should be 1. So is it possible that you have a stored node id of 0 in the eeprom of your arduino node?

            You can try clearing the eeprom with the clear eeprom config sketch in the mysensors library.
            https://github.com/mysensors/Arduino/blob/1.5.4/libraries/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino

            K 2 Replies Last reply
            0
            • martinhjelmareM martinhjelmare

              @kielnino

              Hi!

              First you should remove:

              sensor:
                platform: mysensors
              

              Then your node has id 0, which is usually reserved for the gateway. So that is kinda strange. It shouldn't matter for the pymysensors API, though, I think. It seems as if the sketch name is not picked up by pymysensors/home-assistant for node 0 even though that message is received.

              Only dev branch is able to have sensors on gateway, and you're running version 1.5.4, and you said you connected a separate node with binary sensor.

              If you don't specify a node id in the begin method in the sketch and the node hasn't got a stored old node id in the eeprom, pymysensors will provide a node id, automatically. But the lowest automatic node id should be 1. So is it possible that you have a stored node id of 0 in the eeprom of your arduino node?

              You can try clearing the eeprom with the clear eeprom config sketch in the mysensors library.
              https://github.com/mysensors/Arduino/blob/1.5.4/libraries/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino

              K Offline
              K Offline
              kielnino
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • martinhjelmareM martinhjelmare

                @kielnino

                Hi!

                First you should remove:

                sensor:
                  platform: mysensors
                

                Then your node has id 0, which is usually reserved for the gateway. So that is kinda strange. It shouldn't matter for the pymysensors API, though, I think. It seems as if the sketch name is not picked up by pymysensors/home-assistant for node 0 even though that message is received.

                Only dev branch is able to have sensors on gateway, and you're running version 1.5.4, and you said you connected a separate node with binary sensor.

                If you don't specify a node id in the begin method in the sketch and the node hasn't got a stored old node id in the eeprom, pymysensors will provide a node id, automatically. But the lowest automatic node id should be 1. So is it possible that you have a stored node id of 0 in the eeprom of your arduino node?

                You can try clearing the eeprom with the clear eeprom config sketch in the mysensors library.
                https://github.com/mysensors/Arduino/blob/1.5.4/libraries/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino

                K Offline
                K Offline
                kielnino
                wrote on last edited by
                #7

                @martinhjelmare

                Wow thank you so much.

                I've cleared the eeprom and now it gets node id 1. After removing the persistence file the sensor now shows on the web interface.

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


                9

                Online

                11.7k

                Users

                11.2k

                Topics

                113.0k

                Posts


                Copyright 2019 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