Mysensors configuration cannot get it to work (ver 0.66 / 0.67)

Hello,
I have issues to get Mysensor working, is there any one of you that can see what I made wrong?

I decided to upgrade from 0.53.1 but failed so due to python upgrading
so I made a new 0.66.0 install and later upgraded to 0.67.0 but on both of the later installs I cannot get Mysensors running.
I do have a WiFi mysensors ver 2.0 gateway running, it currently works with the old HA installation as well as a domoticz installation.

I can ping the Mysensors gateway from HA 0.67.0 so it is reachble

I disconnected the old installation to test if the gateway could not support multiple session, but got same issue

my configuration.yaml looks like this:

mysensors:
gateways:
- device: ‘192.168.80.204’

persistence_file: ‘/config/mysensors1.pickle’

tcp_port: 5003

optimistic: false

persistence: true

retain: true

version: 2.0

commented are default so removed during testing.

the errors I get is:

Tue Apr 17 2018 18:44:30 GMT+0200 (CEST)

Error during setup of component mysensors
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/config_validation.py”, line 94, in isdevice
os.stat(value)
FileNotFoundError: [Errno 2] No such file or directory: ‘192.168.80.204’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/components/mysensors.py”, line 315, in setup_gateway
is_serial_port(device)
File “/usr/lib/python3.6/site-packages/homeassistant/components/mysensors.py”, line 120, in is_serial_port
return cv.isdevice(value)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/config_validation.py”, line 97, in isdevice
raise vol.Invalid(‘No device at {} found’.format(value))
voluptuous.error.Invalid: No device at 192.168.80.204 found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/setup.py”, line 145, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/mysensors.py”, line 363, in setup
out_prefix)
File “/usr/lib/python3.6/site-packages/homeassistant/components/mysensors.py”, line 327, in setup_gateway
protocol_version=version, port=tcp_port)
File “/usr/lib/python3.6/site-packages/mysensors/gateway_tcp.py”, line 25, in init
persistence_file, protocol_version)
File “/usr/lib/python3.6/site-packages/mysensors/init.py”, line 65, in init
self._safe_load_sensors()
File “/usr/lib/python3.6/site-packages/mysensors/init.py”, line 275, in _safe_load_sensors
loaded = self._load_sensors()
File “/usr/lib/python3.6/site-packages/mysensors/init.py”, line 266, in _load_sensors
self._perform_file_action(path, ‘load’)
File “/usr/lib/python3.6/site-packages/mysensors/init.py”, line 300, in _perform_file_action
func(filename)
File “/usr/lib/python3.6/site-packages/mysensors/init.py”, line 223, in _load_pickle
self.sensors.update(pickle.load(file_handle))
_pickle.UnpicklingError: invalid load key, ‘{’.

Regards Stefan

My config for comparizon. I’m runnin the dev branch ethernet gateway from mysensors.

mysensors:
  gateways:
    - device: '127.0.0.1'
      persistence_file: '/home/homeassistant/.homeassistant/mysensors.json'
      tcp_port: 5003
  optimistic: false
  persistence: true
  version: '2.0'

I stayed at the HA version 0.65.6 as something was causin newer version to crash every now and then.

Thank you taikapanu,
I changed version: 2.0 to version: ‘2.0’
but get the same result

Regards Stefan

Did you try my ip? It points to device itself. I’m not sure if you need to make some rules etc. with yours…
You said you made a new (hassbian) intallation? Did you enable SPI? Can you run the mysensors gateway and the only problem is ha accessing it?

taikapanu,
No my mysensors gateway is external accessable via WiFi so I use the Correct IP adress, it works with the old HA installation as well as with domoticz.
So it is only the new hassbian installation that does not work

Regards Stefan

There might be something wrong with your persistence pickle file, looking at the last error in your log. I’d try moving that file to a backup place and then restart so that home assistant creates a new file. I also recommend using a json persistence file instead of pickle so that you can inspect the file easily.

Thank You MartinHjelmare,
that is correct, I removed the pickle file, and also removed the pointer to it in config.yaml, and after a restart the first sensor showed up(energy monitor) the others I needed to restart to get the to present themselves.
next step will be to reenter the pointer to the json file and have it be created.

Thank you very much for your support.

1 Like