Another component for ZiGate

Hi,

Is there a way to start ZiGate on a specific channel instead of 11? I want to move it to channel 24 to make sure it doesn’t conflict with my wifi.

Thanks

Currently not, or using zigate.raw_command
But I’ll make some change to set channel in configuration.yml during next week

Well, I did it, but it’s untested

Happy to help by testing if you want. Just saw your commit. I’ll pull the changes and reconfigure.

Ok changes made and it acknowledges that started on channel 24. I’ll keep monitoring.

Need to repair the sensors to have them working other then that it is working fine.

You had to re-pair all devices ?

Yes. After that sensors started to report back to coordinator (ZiGate)

Ok not for me, I’ve 23 devices linked to the zigate !

Hi everyone and thanks @doudz for the incredible work!
I set up HA in a sinology NAS using docker, current version 0.84.6. I am trying to test 2 philips hue bulbs E27.
I put the code in /custom_components and start the docker. Everything work perfectly in the first run, awesome!!

Bulbs were detected and I could see the toggle buttons. Everything works fine but I have an uncommon behaviour. I set the bulbs off and when it passes some time, the bulbs are on again. The toggle buttons show as disable.

If I run the command zigate.refresh_devices, the states became again synced. Bulbs on and toggle buttons on.

Any ideas? did I miss something?

You never turn off main power for your hue bulbs?
What’s the rssi value for your zigate devices ?
On the synology there’s no software or hardware sleep timer ?

Ups! you are right, I have an scheduled reboot every night at 3:00am.
Then the systems starts docker. Shouldn’t it refresh/rescan all devices?

Yes but maybe usb is not ready when docker start ?

Seems that scheduled reboot was not the problem. This happend the same. Both bulbs were on but the toggle buttons were off, asynced.

Watching the logs I can see this:

2018-12-27 01:32:15 WARNING (MainThread) [homeassistant.components.remote] Updating harmony remote took longer than the scheduled update interval 0:00:05
2018-12-27 01:32:21 WARNING (MainThread) [homeassistant.components.remote] Updating harmony remote took longer than the scheduled update interval 0:00:05
2018-12-27 01:32:26 ERROR (MainThread) [homeassistant.core] Error doing job: Fatal error on transport TCPTransport (error status in uv_stream_t.read callback)
OSError: [Errno 113] No route to host
2018-12-27 01:32:26 ERROR (MainThread) [websockets.protocol] Error in data transfer
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 528, in transfer_data
    msg = yield from self.read_message()
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 580, in read_message
    frame = yield from self.read_data_frame(max_size=self.max_size)
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 645, in read_data_frame
    frame = yield from self.read_frame(max_size)
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 710, in read_frame
    extensions=self.extensions,
  File "/usr/local/lib/python3.6/site-packages/websockets/framing.py", line 100, in read
    data = yield from reader(2)
  File "/usr/local/lib/python3.6/asyncio/streams.py", line 674, in readexactly
    yield from self._wait_for_data('readexactly')
  File "/usr/local/lib/python3.6/asyncio/streams.py", line 464, in _wait_for_data
    yield from self._waiter
OSError: [Errno 113] No route to host
2018-12-27 01:32:26 ERROR (MainThread) [homeassistant.helpers.entity] Update for remote.harmony_hub fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 528, in transfer_data
    msg = yield from self.read_message()
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 580, in read_message
    frame = yield from self.read_data_frame(max_size=self.max_size)
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 645, in read_data_frame
    frame = yield from self.read_frame(max_size)
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 710, in read_frame
    extensions=self.extensions,
  File "/usr/local/lib/python3.6/site-packages/websockets/framing.py", line 100, in read
    data = yield from reader(2)
  File "/usr/local/lib/python3.6/asyncio/streams.py", line 674, in readexactly
    yield from self._wait_for_data('readexactly')
  File "/usr/local/lib/python3.6/asyncio/streams.py", line 464, in _wait_for_data
    yield from self._waiter
OSError: [Errno 113] No route to host

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/src/app/homeassistant/components/remote/harmony.py", line 205, in async_update
    activity_id = await self._client.get_current_activity()
  File "/usr/local/lib/python3.6/site-packages/pyharmony/client.py", line 234, in get_current_activity
    'vnd.logitech.harmony/vnd.logitech.harmony.engine'
  File "/usr/local/lib/python3.6/site-packages/pyharmony/client.py", line 184, in _send_request
    return await self._wait_response(msgid)
  File "/usr/local/lib/python3.6/site-packages/pyharmony/client.py", line 190, in _wait_response
    response_json = await self._websocket.recv()
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 350, in recv
    yield from self.ensure_open()
  File "/usr/local/lib/python3.6/site-packages/websockets/protocol.py", line 501, in ensure_open
    self.close_code, self.close_reason) from self.transfer_data_exc
websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 1006 (connection closed abnormally [internal]), no reason
2018-12-27 01:32:30 ERROR (MainThread) [homeassistant.helpers.entity] Update for remote.harmony_hub fails
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 347, in async_device_update
    await self.async_update()
  File "/usr/src/app/homeassistant/components/remote/harmony.py", line 205, in async_update
    activity_id = await self._client.get_current_activity()
  File "/usr/local/lib/python3.6/site-packages/pyharmony/client.py", line 234, in get_current_activity
    'vnd.logitech.harmony/vnd.logitech.harmony.engine'
  File "/usr/local/lib/python3.6/site-packages/pyharmony/client.py", line 158, in _send_request
    await self._perform_connect()
  File "/usr/local/lib/python3.6/site-packages/pyharmony/client.py", line 129, in _perform_connect
    self._ip_address, DEFAULT_HUB_PORT, self._remote_id
  File "/usr/local/lib/python3.6/site-packages/websockets/py35/client.py", line 12, in __await_impl__
    transport, protocol = await self._creating_connection
  File "uvloop/loop.pyx", line 1879, in create_connection
  File "uvloop/loop.pyx", line 1858, in uvloop.loop.Loop.create_connection
OSError: [Errno 113] No route to host

The last block repeats on and on during all night. Seems to be something about HA, could it be?
Thank in advance

Looks related to your harmony hub connectivity with hass, not the zigate.
So your bulb is on and in hass it switch off at some time?
Can you see in history when the state switch and then try to find the same timestamp in the logs.

@biau is right, the log you provide is about harmony not zigate, are you using zigate ?

Ok, I have changed a little bit my setup. I have connected the harmony hub to a plug with time schedule (hardware) so it goes on and off based on hours. Now I have changed it and is plugged directly to the a normal plug and it is going to be 24x7 hours. We are going to see if this was the fact that HA spit all that errors.

Regarding the lights, no clue on history. They are off until 2:13 when I did a refresh_devices, appeared as ON and I turn off them manually. An the happens the same at 9:03 when I found them phisically on and relaunch a refresh devices command, and turn them off again.

You’re using USB or wifi for zigate?

I am using USB

Maybe enable debug to see if you can find more info when bulb disconnect ?