Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates based on tests on RPI 1 #1

Closed
wants to merge 3 commits into from
Closed

Updates based on tests on RPI 1 #1

wants to merge 3 commits into from

Conversation

ciotlosm
Copy link

@ciotlosm ciotlosm commented May 10, 2018

Find some changes and hacks to make it work on RPI1

Things to do:

  • Allow mqtt host to be configurable to remove the need for "host_network": true
  • Make the db map to a folder that is sitting on the host (I think /data) to avoid losing all data on addon restart - maybe make it absolute path and add it as option
  • Expose permit_join to allow turning it off from the interface
  • Make proper use of the version to avoid "latest" version hack that causes stacktrace
  • Auto restart when addon stops because of zigbee-shepherd bug Error when paired device is not known zigbee2mqtt#29 ? Or maybe find a better way of error handling this inside the library to avoid a total crash of the process?
  • Allow device path /dev/ttyACM0 to be configurable - is the config: "devices": ["/dev/ttyACM0:/dev/ttyACM0:rwm"] needed ?

@@ -1,6 +1,6 @@
{
"name": "Zigbee2mqtt",
"version": "0.1",
"version": "latest",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a hack because it uses the version to fetch the image from docker hub based on a tag matching this version.
With latest the image is pulled, but there is a stacktrace on start:

18-05-10 17:50:25 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
    resp = await self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_app.py", line 322, in _handle
    resp = await handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 88, in impl
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/hassio/api/security.py", line 48, in token_validation
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/hassio/api/utils.py", line 33, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/hassio/addons/utils.py", line 33, in wrap_check
    return await method(addon, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 652, in start
    return await self.instance.run()
  File "/usr/lib/python3.6/site-packages/hassio/utils/__init__.py", line 25, in wrap_api
    return await method(api, *args, **kwargs)
  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/hassio/docker/addon.py", line 263, in _run
    self.image, self.version)
  File "/usr/lib/python3.6/site-packages/hassio/docker/addon.py", line 47, in version
    return super().version
  File "/usr/lib/python3.6/site-packages/hassio/docker/interface.py", line 45, in version
    if self._meta and LABEL_VERSION in self._meta['Config']['Labels']:
TypeError: argument of type 'NoneType' is not iterable
``

@@ -11,5 +11,13 @@
"armhf"
],
"boot": "auto",
"image": "koenkk/zigbee2mqtt-hassioaddon-{arch}"
"image": "koenkk/zigbee2mqtt-hassioaddon-{arch}",
"host_network": true,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is added until we can inject mqtt configuration

@ciotlosm
Copy link
Author

I will close this pull request for now because will use https://github.com/danielwelch/hassio-zigbee2mqtt for more development until a stable version is released.

@ciotlosm ciotlosm closed this May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant