HA not receiving data passed through non-registered repeaters



  • I am on the process of migrating from Vera to HA and have encountered problems with data sent from HA recognized (not sure of the proper term) sensors to the GW through repeaters. If the data is sent directly to my ethernet gateway, HA updates the sensors appropriately. If the data is routed through one of my repeating nodes (which are not yet recognized by HA, more on this below), HA does not update the sensor. I can verify that the data is arriving at the GW by MYSController (and Vera still updates the sensor). If I power down my repeaters, the sensors send the messages directly to the GW and HA resumes updating the sensors.

    Most of my nodes are still on MyS 1.4 and many of the repeaters are installed in hard to reach areas (e.g. inside of walls) so updating their sketches is difficult. To properly present these repeaters (which are all mains powered actuators) to HA, apparently an initial-state message needs to be sent at presentation for HA to recognize them and that would require updating their sketches (~Catch 22).

    Has anyone encountered anything similar with HA and MyS repeaters? I am trying to decide on path forward...


  • Plugin Developer

    @Dwalt

    Hi!

    HA is only aware of the message coming from the gateway via the serial API. HA is not aware of how the message has been routed on its way to the gateway. As long as the serial API message sent by the gateway to HA doesn't change, it should not matter if the message has passed repeaters or not.

    Can you open a serial monitor to your gateway and log both messages coming via repeaters and messages coming directly from sensor nodes, and post it here. Also capture the log from HA at the same time, debug level, and post that too.



  • @martinhjelmare

    Thank you for responding to this. I finally had time to look at the HA log and found a number of other issues. I think I had a conflict with HA Bridge (originally setup to work with Vera) so I shut down that device but I am still seeing errors in the HA log but cannot identify the source.

    Here is the current home-assistant.log output:

    17-02-17 15:56:56 homeassistant.core: Error doing job: Future exception was never retrieved
    Traceback (most recent call last):
      File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/notify/__init__.py", line 149, in platform_discovered
        setup_notify_platform(platform, discovery_info=info)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/notify/__init__.py", line 89, in setup_notify_platform
        hass, p_config, discovery_info)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/notify/mysensors.py", line 25, in get_service
        pres.S_INFO: [set_req.V_TEXT],
      File "/usr/lib/python3.4/enum.py", line 255, in __getattr__
        raise AttributeError(name) from None
    AttributeError: V_TEXT
    17-02-17 15:57:25 homeassistant.core: Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
      File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
        result = coro.throw(exc)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 387, in _update_entity_states
        yield from update_coro
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 216, in async_update_ha_state
        yield from self.hass.loop.run_in_executor(None, self.update)
      File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
        yield self  # This tells Task to wait for completion.
      File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
        value = future.result()
      File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
        raise self._exception
      File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/hue.py", line 397, in update
        self.update_lights(no_throttle=True)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
        result = method(*args, **kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
        result = method(*args, **kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/hue.py", line 207, in update_lights
        lightgroups[lightgroup_id].schedule_update_ha_state()
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 290, in schedule_update_ha_state
        self.hass.add_job(self.async_update_ha_state(force_refresh))
    AttributeError: 'NoneType' object has no attribute 'add_job'
    17-02-17 15:57:56 homeassistant.core: Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
      File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
        result = coro.throw(exc)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 387, in _update_entity_states
        yield from update_coro
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 216, in async_update_ha_state
        yield from self.hass.loop.run_in_executor(None, self.update)
      File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
        yield self  # This tells Task to wait for completion.
      File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
        value = future.result()
      File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
        raise self._exception
      File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/hue.py", line 397, in update
        self.update_lights(no_throttle=True)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
        result = method(*args, **kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
        result = method(*args, **kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/hue.py", line 207, in update_lights
        lightgroups[lightgroup_id].schedule_update_ha_state()
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 290, in schedule_update_ha_state
        self.hass.add_job(self.async_update_ha_state(force_refresh))
    AttributeError: 'NoneType' object has no attribute 'add_job'
    17-02-17 15:58:27 homeassistant.core: Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
      File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
        result = coro.throw(exc)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 387, in _update_entity_states
        yield from update_coro
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 216, in async_update_ha_state
        yield from self.hass.loop.run_in_executor(None, self.update)
      File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
        yield self  # This tells Task to wait for completion.
      File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
        value = future.result()
      File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
        raise self._exception
      File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/hue.py", line 397, in update
        self.update_lights(no_throttle=True)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
        result = method(*args, **kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 296, in wrapper
        result = method(*args, **kwargs)
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/hue.py", line 207, in update_lights
        lightgroups[lightgroup_id].schedule_update_ha_state()
      File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 290, in schedule_update_ha_state
        self.hass.add_job(self.async_update_ha_state(force_refresh))
    AttributeError: 'NoneType' object has no attribute 'add_job'
    

    The second error repeats every 31 seconds. If you know of any solutions for these errors, I would appreciate any help.

    As for the issue with MySensors nodes, I was wrong about the repeaters in that they are not the source of my problems, I think my GW is causing HA to lock up the MySensors component of HA. Whenever a node is restarted, repeater or non-repeater, my GW restarts (see below) and for some reason this freezes the MyS component in HA. I never noticed it before with Vera because these restarts doesn't appear to affect the stability of Vera plugin.

    This is from MYSController logging GW traffic:

    [2017-02-17 16:04:39.953 Info] RX	4;1;1;0;0;74.6
     [2017-02-17 16:04:40.041 Info] RX	4;2;1;0;1;29
     [2017-02-17 16:05:21.964 Info] RX	2;1;1;0;0;74.9
     [2017-02-17 16:05:38.689 Info] RX	2;1;1;0;0;74.8
     [2017-02-17 16:05:43.434 Info] RX	4;1;1;0;0;74.6
     [2017-02-17 16:05:43.534 Info] RX	4;2;1;0;1;29
     [2017-02-17 16:06:23.535 Info] RX	2;2;1;0;16;1
     [2017-02-17 16:06:24.462 Info] RX	2;1;1;0;0;74.9
     [2017-02-17 16:06:27.717 Info] RX	7;3;1;0;16;1
     [2017-02-17 16:06:41.173 Info] RX	2;1;1;0;0;74.8
     [2017-02-17 16:06:46.863 Info] RX	4;255;3;0;0;69
     [2017-02-17 16:06:47.032 Info] RX	4;1;1;0;0;74.6
     [2017-02-17 16:06:47.147 Info] RX	4;2;1;0;1;29
     [2017-02-17 16:06:53.637 Info] RX	2;2;1;0;16;0
     [2017-02-17 16:06:55.238 Info] CHILD	New child discovered, node id=6, child id=internal
     [2017-02-17 16:06:55.269 Info] RX	6;255;3;0;0;96
     [2017-02-17 16:06:57.727 Info] RX	6;3;1;0;16;1
     [2017-02-17 16:06:58.478 Info] RX	7;4;1;0;23;4
     [2017-02-17 16:06:58.493 Info] RX	7;3;1;0;16;0
     [2017-02-17 16:07:01.595 Info] DEBUG	Update child id=255, type=ARDUINO_NODE
     [2017-02-17 16:07:01.632 Info] RX	5;255;0;0;17;1.4
     [2017-02-17 16:07:01.632 Info] TX	5;255;3;0;6;
     [2017-02-17 16:07:01.663 Info] RX	5;255;3;0;6;0
     [2017-02-17 16:07:01.670 Info] RX	0;0;3;0;14;Gateway startup complete.
     [2017-02-17 16:07:02.682 Info] RX	0;0;3;0;14;Gateway startup complete.
     [2017-02-17 16:07:03.617 Info] DEBUG	Update child id=0, type=DIMMER
     [2017-02-17 16:07:03.655 Info] RX	5;0;0;0;4;1.4
     [2017-02-17 16:07:03.655 Info] RX	5;255;3;0;11;DimmableLED
     [2017-02-17 16:07:03.671 Info] RX	5;255;3;0;12;1.1
     [2017-02-17 16:07:03.702 Info] RX	5;0;2;0;3;1.1
     [2017-02-17 16:07:13.318 Info] RX	2;2;1;0;16;1
     [2017-02-17 16:07:14.272 Info] RX	2;1;1;0;0;74.9
     [2017-02-17 16:07:17.043 Info] RX	7;3;1;0;16;1
     [2017-02-17 16:07:29.377 Info] RX	6;3;1;0;16;0
     [2017-02-17 16:07:43.381 Info] RX	2;2;1;0;16;0
     [2017-02-17 16:07:47.838 Info] RX	7;3;1;0;16;0
    

    At 16:06:55, node 6 sent battery info for the first time and this did not upset the MYS component. At 16:07:01, I powered up a repeater node (node 5), it starts to present itself (sketch info, etc) and then suddenly it throws "0;0;3;0;14;Gateway startup complete", which I interpret as the GW resetting or re-initializing?!? This is also when HA stops updating MYS data, regardless of whether I restart a repeater node or normal node.

    My GW is somewhat inaccessible for direct serial connection so I have been monitoring it with MYSController which shows message traffic but not verbose debug info. I will try this weekend to hook up serial directly. To reestablish MySensors updating in HA, I have to restart HA. The repeaters are all actuators and do not transmit an initial state value to HA and thus are not discovered and never show up in HA. I assume I need to update their sketches for them to work with HA.

    Any thoughts on this problem? My gateway is MYS 1.4 (or 1.4.1) and MYS 2.0 may be more stable so perhaps it is time to upgrade. The GW has been working undisturbed for over two years with zero issues before this.


  • Plugin Developer

    The AttributeError: V_TEXT error is solved in HA version 0.38.3:
    https://github.com/home-assistant/home-assistant/pull/5942

    The other error seem to be from a hue device and this issue has a similar stack trace:
    https://github.com/home-assistant/home-assistant/issues/4994

    Cleaning the hue bridge seems to be the solution.

    Regarding HA stopping to update mysensors after a restart of the ethernet gateway, this should be the same as this issue:
    https://github.com/home-assistant/home-assistant/issues/4891

    We now have a fix for this in pymysensors:
    https://github.com/theolind/pymysensors/pull/67

    HA is not updated to use this fix yet, but I'll try to do that asap. I'll update the issue and this thread when that is done.

    Regarding your gateway restarting when you restart a node or repeater, that sounds weird and not good. Could be a power issue at the gateway?


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.