Migrating from openHAB to Home Assistant



  • Hi,

    I am migrating from openHAB to Home Assistant to today I took the the first steps towards MySensors network. MySensors are running in TCP mode on Arduino since a long time. I think I have 2.1.1 of MySensors...it have been so stable and have not patched it for a very long time.

    So installed the add-on and configured it as:

    mysensors:
      gateways:
        - device: '192.168.1.11'
          persistence_file: './mysensors.json'
          tcp_port: 5003
      optimistic: false
      persistence: true
      retain: true
    

    Restarted one sensor to ensure presentation but the only thing I get in HA logs is

    Log Details (WARNING)
    Logger: mysensors
    Source: __main__.py:356
    First occurred: 5:32:30 PM (20 occurrences)
    Last logged: 5:35:29 PM
    
    Node 49 is unknown
    Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    Node 3 is unknown
    Node 4 is unknown
    

    Do you have any good hints/tips?



  • You could try to specify the protocol version in the hinge assistant configuration file.
    https://www.home-assistant.io/integrations/mysensors/#version



  • Tried to set

    mysensors:
      gateways:
        - device: '192.168.1.11'
          persistence_file: './mysensors.json'
          tcp_port: 5003
      optimistic: false
      persistence: true
      retain: true
      version: '2.1.1'
    

    But get in logs a lot of:

    2020-05-26 17:32:30 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:32:40 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:32:50 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:33:10 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:33:30 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:33:39 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:33:50 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:34:10 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:34:13 WARNING (MainThread) [mysensors] Node 3 is unknown
    2020-05-26 17:34:13 WARNING (MainThread) [mysensors] Node 3 is unknown
    2020-05-26 17:34:14 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:34:30 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:34:33 WARNING (MainThread) [mysensors] Node 4 is unknown
    2020-05-26 17:34:46 WARNING (MainThread) [mysensors] Node 3 is unknown
    2020-05-26 17:34:49 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:34:49 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:34:53 WARNING (MainThread) [mysensors] Node 4 is unknown
    2020-05-26 17:35:09 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:35:24 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:35:29 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:35:49 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:35:53 WARNING (MainThread) [mysensors] Node 3 is unknown
    

    But also

    Log Details (ERROR)
    Logger: homeassistant.components.sensor
    Source: components/mysensors/sensor.py:92
    Integration: Sensor (documentation, issues)
    First occurred: 6:46:09 PM (4 occurrences)
    Last logged: 6:46:50 PM
    
    Error while setting up mysensors platform for sensor
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
        await asyncio.gather(*pending)
      File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 295, in async_add_entities
        await asyncio.gather(*tasks)
      File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 446, in _async_add_entity
        entity.async_write_ha_state()
      File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 297, in async_write_ha_state
        self._async_write_ha_state()  # type: ignore
      File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 326, in _async_write_ha_state
        unit_of_measurement = self.unit_of_measurement
      File "/usr/src/homeassistant/homeassistant/components/mysensors/sensor.py", line 92, in unit_of_measurement
        float(self.gateway.protocol_version) >= 1.5
    ValueError: could not convert string to float: '2.1.1'
    


  • Hmmm, could it be a problem that my old openHAB installation still is active?
    Will MySensors Gateway handle different "consumers"?



  • @jocke4u said in Migrating from openHAB to Home Assistant:

    But get in logs a lot of:
    2020-05-26 17:32:30 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:32:40 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:32:50 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:33:10 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:33:30 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:33:39 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:33:50 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:34:10 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:34:13 WARNING (MainThread) [mysensors] Node 3 is unknown
    2020-05-26 17:34:13 WARNING (MainThread) [mysensors] Node 3 is unknown
    2020-05-26 17:34:14 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-26 17:34:30 WARNING (MainThread) [mysensors] Node 49 is unknown
    2020-05-26 17:34:33 WARNING (MainThread) [mysensors] Node 4 is unknown

    These are caused by the nodes not correctly being presented to home assistant.
    Check https://www.home-assistant.io/integrations/sensor.mysensors/ for some examples of what the sketch should do so it is recognised by home assistant.
    Mainly presenting the sensors and sending a value to the controller.



  • Thanks @electrik for the update 🙂
    I got it running.
    However I think I should make some work on the sensors.
    As it seems the Ethernet GW are running 2.1.1 but I think the sensors are running 1.5.x (seen in MysController)

    But I get plenty of :

    2020-05-28 19:29:47 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:30:22 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:30:57 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:31:32 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:32:07 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:33:17 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:33:51 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:34:26 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:35:01 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:35:36 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:36:11 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:36:46 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:37:21 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:38:31 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:39:06 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:39:41 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    2020-05-28 19:40:50 WARNING (MainThread) [mysensors] Not a valid message: value must be float between 0.0 and 100.0 for dictionary value @ data['payload']
    

    Trying to get my dev environment correct to be able to recompile.

    EDIT: Since it have been so stable for a long time I am not up to date with the Arduino environment. My experience from the past is not without issues


Log in to reply
 

Suggested Topics

  • 1
  • 8
  • 3
  • 1
  • 5
  • 3

11
Online

11.4k
Users

11.1k
Topics

112.7k
Posts