Another component for ZiGate

@biau Here is what i have when doing the services. I tried to put the bulb as close as i could from the zigate. I even switched the bulb for a new one not yet added on the network: Same result.

Edit: It worked when i switched mannually on & off the device. I really didn’t know what happened… But at least i have a light bulb working now…

Is there a way to delete properly a added device from the zigate ? I tried to remove by doing zigate.remove_device but it doesn’t seems to remove it from HA…

You should remove it from hass in configuration > entity registry

Hello @doudz,

I’m trying to install your component. Thanks for your job !
I’m on a RPI 3B+ on Raspbian with home assistant via docker.

The component can’t setup…

Is anyone can help me ?

2019-06-18 15:15:38 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for zigate which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-06-18 15:15:41 DEBUG (SyncWorker_14) [custom_components.zigate] Port : None
2019-06-18 15:15:41 DEBUG (SyncWorker_14) [custom_components.zigate] Host : None
2019-06-18 15:15:41 DEBUG (SyncWorker_14) [custom_components.zigate] GPIO : True
2019-06-18 15:15:41 DEBUG (SyncWorker_14) [custom_components.zigate] Led : True
2019-06-18 15:15:41 DEBUG (SyncWorker_14) [custom_components.zigate] Channel : None
2019-06-18 15:15:42 ERROR (MainThread) [homeassistant.setup] Error during setup of component zigate
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 156, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/zigate/init.py”, line 248, in setup
gpio=gpio
File “/usr/local/lib/python3.7/site-packages/zigate/init.py”, line 51, in connect
channel=channel)
File “/usr/local/lib/python3.7/site-packages/zigate/core.py”, line 2097, in init
GPIO.setup(27, GPIO.OUT) # GPIO2
RuntimeError: No access to /dev/mem. Try running as root!

I finally solved my problem…
Need privileged: true in my docker-compose.yml

My PiZigate is working. Let’s try and learn how it works in hass :slight_smile:

@etguerin perfect ! :+1:
another solution could be running docker like this :
sudo docker run --device /dev/gpiomem

Second time in two days that my zigate completely stop listening to devices.
I can still command device for one command like turn off the light but hass never update light state. And then I can’t turn it off.
I have to restart hass to solve the issue.

2019-06-27 23:15:46 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (6)
2019-06-27 23:15:46 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b’\x02\xec\x01\x01\x00\x06\x00\x00\x00\x00\x02\x00\x00\xf0\x00' 2019-06-27 23:15:46 DEBUG (SyncWorker_16) [zigate] Msg to send b'010000106b02ec600101000600000000020000f000' 2019-06-27 23:15:46 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'01021102100210106b0212ec6002110211021002160210021002100210021202100210f0021003' 2019-06-27 23:15:46 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100 2019-06-27 23:15:49 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (7) 2019-06-27 23:15:49 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b'\x02\xec\x01\x01\x00\x04\x00\x00\x00\x00\x01\x00\x00’
2019-06-27 23:15:49 DEBUG (SyncWorker_16) [zigate] Msg to send b’0100000e8402ec600101000400000000010000’
2019-06-27 23:15:49 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b’01021102100210021e840212ec600211021102100214021002100210021002110210021003’
2019-06-27 23:15:49 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100
2019-06-27 23:15:52 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (8)
2019-06-27 23:15:52 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b’\x02\xec\x01\x01\x00\x03\x00\x00\x00\x00\x01\x00\x00' 2019-06-27 23:15:52 DEBUG (SyncWorker_16) [zigate] Msg to send b'0100000e8302ec600101000300000000010000' 2019-06-27 23:15:52 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'01021102100210021e830212ec600211021102100213021002100210021002110210021003' 2019-06-27 23:15:52 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100 2019-06-27 23:15:55 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (9) 2019-06-27 23:15:55 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b'\x02\xec\x01\x01\x00\x05\x00\x00\x00\x00\x06\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05’
2019-06-27 23:15:55 DEBUG (SyncWorker_16) [zigate] Msg to send b’010000189502ec60010100050000000006000000010002000300040005’
2019-06-27 23:15:55 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b’0102110210021018950212ec6002110211021002150210021002100210021602100210021002110210021202100213021002140210021503’
2019-06-27 23:15:55 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100
2019-06-27 23:15:58 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (10)
2019-06-27 23:15:58 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b’\x02\xec\x01\x01\x00\x01\x00\x00\x00\x00\x01\x00\x00' 2019-06-27 23:15:58 DEBUG (SyncWorker_16) [zigate] Msg to send b'0100000e8102ec600101000100000000010000' 2019-06-27 23:15:58 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'01021102100210021e810212ec600211021102100211021002100210021002110210021003' 2019-06-27 23:15:58 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100 2019-06-27 23:16:01 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (11) 2019-06-27 23:16:01 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b'\x02\xec\x01\x02\x00\x06\x00\x00\x00\x00\x02\x00\x00\xf0\x00’
2019-06-27 23:16:01 DEBUG (SyncWorker_16) [zigate] Msg to send b’010000106802ec600102000600000000020000f000’
2019-06-27 23:16:01 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b’0102110210021010680212ec6002110212021002160210021002100210021202100210f0021003’
2019-06-27 23:16:01 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100
2019-06-27 23:16:04 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (12)
2019-06-27 23:16:04 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b’\x02\xec\x01\x03\x00\x0c\x00\x00\x00\x00\x06\x00U\x00Q\x00o\x01\x00\x01\x05\x01\x06' 2019-06-27 23:16:04 DEBUG (SyncWorker_16) [zigate] Msg to send b'01000018f602ec600103000c000000000600550051006f010001050106' 2019-06-27 23:16:04 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'0102110210021018f60212ec60021102130210021c0210021002100210021602105502105102106f02110210021102150211021603' 2019-06-27 23:16:04 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100 2019-06-27 23:16:07 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (13) 2019-06-27 23:16:07 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b'\x02\xec\x01\x04\x00\x0c\x00\x00\x00\x00\x06\x00U\x00Q\x00o\x01\x00\x01\x05\x01\x06’
2019-06-27 23:16:07 DEBUG (SyncWorker_16) [zigate] Msg to send b’01000018f102ec600104000c000000000600550051006f010001050106’
2019-06-27 23:16:07 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b’0102110210021018f10212ec60021102140210021c0210021002100210021602105502105102106f02110210021102150211021603’
2019-06-27 23:16:07 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100
2019-06-27 23:16:10 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (14)
2019-06-27 23:16:10 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b’\x02\xec\x01\x05\x00\x12\x00\x00\x00\x00\x04\x00U\x00J\x00Q\x00o' 2019-06-27 23:16:10 DEBUG (SyncWorker_16) [zigate] Msg to send b'01000014a802ec600105001200000000040055004a0051006f' 2019-06-27 23:16:10 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'0102110210021014a80212ec60021102150210120210021002100210021402105502104a02105102106f03' 2019-06-27 23:16:10 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100 2019-06-27 23:16:13 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (15) 2019-06-27 23:16:13 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b'\x02\xec\x01\x06\x00\x12\x00\x00\x00\x00\x04\x00U\x00J\x00Q\x00o’
2019-06-27 23:16:13 DEBUG (SyncWorker_16) [zigate] Msg to send b’01000014ab02ec600106001200000000040055004a0051006f’
2019-06-27 23:16:13 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b’0102110210021014ab0212ec60021102160210120210021002100210021402105502104a02105102106f03’
2019-06-27 23:16:13 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100
2019-06-27 23:16:16 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (16)
2019-06-27 23:16:16 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0100 b’\x02\xec\x01\x07\x00\x12\x00\x00\x00\x00\x04\x00U\x00J\x00Q\x00o' 2019-06-27 23:16:16 DEBUG (SyncWorker_16) [zigate] Msg to send b'01000014aa02ec600107001200000000040055004a0051006f' 2019-06-27 23:16:16 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'0102110210021014aa0212ec60021102170210120210021002100210021402105502104a02105102106f03' 2019-06-27 23:16:16 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0100 2019-06-27 23:16:19 WARNING (SyncWorker_16) [zigate] No response after command 0x0100 (17) 2019-06-27 23:16:57 DEBUG (SyncWorker_1) [zigate] REQUEST : 0x0092 b'\x02\xec\x01\x02\x01’
2019-06-27 23:16:57 DEBUG (SyncWorker_1) [zigate] Msg to send b’009200061802ec60010201’
2019-06-27 23:16:57 DEBUG (SyncWorker_1) [zigate] Encoded Msg to send b’0102109202100216180212ec6002110212021103’
2019-06-27 23:16:57 DEBUG (SyncWorker_1) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:16:59 DEBUG (SyncWorker_2) [zigate] REQUEST : 0x0092 b’\x02\xec\x01\x02\x01' 2019-06-27 23:16:59 DEBUG (SyncWorker_2) [zigate] Msg to send b'009200061802ec60010201' 2019-06-27 23:16:59 DEBUG (SyncWorker_2) [zigate] Encoded Msg to send b'0102109202100216180212ec6002110212021103' 2019-06-27 23:16:59 DEBUG (SyncWorker_2) [zigate] Waiting for status message for command 0x0092 2019-06-27 23:17:00 DEBUG (SyncWorker_11) [zigate] REQUEST : 0x0092 b'\x02\xec\x01\x01\x01’
2019-06-27 23:17:00 DEBUG (SyncWorker_11) [zigate] Msg to send b’009200061b02ec60010101’
2019-06-27 23:17:00 DEBUG (SyncWorker_11) [zigate] Encoded Msg to send b’01021092021002161b0212ec6002110211021103’
2019-06-27 23:17:00 DEBUG (SyncWorker_11) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:17:00 WARNING (SyncWorker_1) [zigate] No response after command 0x0092 (18)
2019-06-27 23:17:01 DEBUG (SyncWorker_5) [zigate] REQUEST : 0x0092 b’\x02\xec\x01\x01\x01' 2019-06-27 23:17:01 DEBUG (SyncWorker_5) [zigate] Msg to send b'009200061b02ec60010101' 2019-06-27 23:17:01 DEBUG (SyncWorker_5) [zigate] Encoded Msg to send b'01021092021002161b0212ec6002110211021103' 2019-06-27 23:17:01 DEBUG (SyncWorker_5) [zigate] Waiting for status message for command 0x0092 2019-06-27 23:17:01 DEBUG (SyncWorker_4) [zigate] REQUEST : 0x0092 b'\x02\xec\x01\x01\x01’
2019-06-27 23:17:01 DEBUG (SyncWorker_4) [zigate] Msg to send b’009200061b02ec60010101’
2019-06-27 23:17:01 DEBUG (SyncWorker_4) [zigate] Encoded Msg to send b’01021092021002161b0212ec6002110211021103’
2019-06-27 23:17:01 DEBUG (SyncWorker_4) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:17:02 WARNING (SyncWorker_2) [zigate] No response after command 0x0092 (19)
2019-06-27 23:17:03 WARNING (SyncWorker_11) [zigate] No response after command 0x0092 (20)
2019-06-27 23:17:04 WARNING (SyncWorker_5) [zigate] No response after command 0x0092 (21)
2019-06-27 23:17:04 WARNING (SyncWorker_4) [zigate] No response after command 0x0092 (22)
2019-06-27 23:17:36 DEBUG (SyncWorker_11) [zigate] REQUEST : 0x0011
2019-06-27 23:17:36 DEBUG (SyncWorker_11) [zigate] Msg to send b’0011000011’
2019-06-27 23:17:36 DEBUG (SyncWorker_11) [zigate] Encoded Msg to send b’01021011021002101103’
2019-06-27 23:17:55 DEBUG (SyncWorker_3) [zigate] REQUEST : 0x0092 b’\x02\xec\x01\x02\x01' 2019-06-27 23:17:55 DEBUG (SyncWorker_3) [zigate] Msg to send b'009200061802ec60010201' 2019-06-27 23:17:55 DEBUG (SyncWorker_3) [zigate] Encoded Msg to send b'0102109202100216180212ec6002110212021103' 2019-06-27 23:17:55 DEBUG (SyncWorker_3) [zigate] Waiting for status message for command 0x0092 2019-06-27 23:17:56 DEBUG (SyncWorker_19) [zigate] REQUEST : 0x0092 b'\x02\xec\x01\x02\x01’
2019-06-27 23:17:56 DEBUG (SyncWorker_19) [zigate] Msg to send b’009200061802ec60010201’
2019-06-27 23:17:56 DEBUG (SyncWorker_19) [zigate] Encoded Msg to send b’0102109202100216180212ec6002110212021103’
2019-06-27 23:17:56 DEBUG (SyncWorker_19) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:17:57 DEBUG (SyncWorker_2) [zigate] REQUEST : 0x0092 b’\x02\xec\x01\x02\x01' 2019-06-27 23:17:57 DEBUG (SyncWorker_2) [zigate] Msg to send b'009200061802ec60010201' 2019-06-27 23:17:57 DEBUG (SyncWorker_2) [zigate] Encoded Msg to send b'0102109202100216180212ec6002110212021103' 2019-06-27 23:17:57 DEBUG (SyncWorker_2) [zigate] Waiting for status message for command 0x0092 2019-06-27 23:17:57 DEBUG (SyncWorker_15) [zigate] REQUEST : 0x0092 b'\x02\xec\x01\x02\x01’
2019-06-27 23:17:57 DEBUG (SyncWorker_15) [zigate] Msg to send b’009200061802ec60010201’
2019-06-27 23:17:57 DEBUG (SyncWorker_15) [zigate] Encoded Msg to send b’0102109202100216180212ec6002110212021103’
2019-06-27 23:17:57 DEBUG (SyncWorker_15) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:17:58 DEBUG (SyncWorker_5) [zigate] REQUEST : 0x0092 b’\x02w\xed\x01\x02\x01’
2019-06-27 23:17:58 DEBUG (SyncWorker_5) [zigate] Msg to send b’009200060e0277ed010201’
2019-06-27 23:17:58 DEBUG (SyncWorker_5) [zigate] Encoded Msg to send b’0102109202100216021e021277ed02110212021103’
2019-06-27 23:17:58 DEBUG (SyncWorker_5) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:17:58 WARNING (SyncWorker_3) [zigate] No response after command 0x0092 (23)
2019-06-27 23:17:59 DEBUG (SyncWorker_11) [zigate] REQUEST : 0x0092 b’\x02w\xed\x01\x02\x01’
2019-06-27 23:17:59 DEBUG (SyncWorker_11) [zigate] Msg to send b’009200060e0277ed010201’
2019-06-27 23:17:59 DEBUG (SyncWorker_11) [zigate] Encoded Msg to send b’0102109202100216021e021277ed02110212021103’
2019-06-27 23:17:59 DEBUG (SyncWorker_11) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:17:59 WARNING (SyncWorker_19) [zigate] No response after command 0x0092 (24)
2019-06-27 23:17:59 DEBUG (SyncWorker_6) [zigate] REQUEST : 0x0092 b’\x02w\xed\x01\x02\x01’
2019-06-27 23:17:59 DEBUG (SyncWorker_6) [zigate] Msg to send b’009200060e0277ed010201’
2019-06-27 23:17:59 DEBUG (SyncWorker_6) [zigate] Encoded Msg to send b’0102109202100216021e021277ed02110212021103’
2019-06-27 23:17:59 DEBUG (SyncWorker_6) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:18:00 WARNING (SyncWorker_2) [zigate] No response after command 0x0092 (25)
2019-06-27 23:18:00 WARNING (SyncWorker_15) [zigate] No response after command 0x0092 (26)
2019-06-27 23:18:00 DEBUG (SyncWorker_4) [zigate] REQUEST : 0x0092 b’\x02w\xed\x01\x01\x01’
2019-06-27 23:18:00 DEBUG (SyncWorker_4) [zigate] Msg to send b’009200060d0277ed010101’
2019-06-27 23:18:00 DEBUG (SyncWorker_4) [zigate] Encoded Msg to send b’0102109202100216021d021277ed02110211021103’
2019-06-27 23:18:00 DEBUG (SyncWorker_4) [zigate] Waiting for status message for command 0x0092
2019-06-27 23:18:01 WARNING (SyncWorker_5) [zigate] No response after command 0x0092 (27)
2019-06-27 23:18:02 WARNING (SyncWorker_11) [zigate] No response after command 0x0092 (28)
2019-06-27 23:18:02 WARNING (SyncWorker_6) [zigate] No response after command 0x0092 (29)
2019-06-27 23:18:03 WARNING (SyncWorker_4) [zigate] No response after command 0x0092 (30)

After 2 hass restart and 2 serveur restart I have decided to open the zigate case.
Now it’s working again…
Look’s like my zigate does not support 30°C in the room. :pensive:
The fact is that both time I was using my video projector located just below the zigate (zigate is on the top of the closet and the VP is inside the closet fixed on the top) so the temperature could have raise of some degrees but not a lot…

Not sure it’s a temp problem, but looks like the same problem as https://github.com/Jeedom-Zigate/jeedom-plugin-zigate/issues/188

My zigate is working good in high temperature… :smile:
image

I found a possible hang, fixed in 0.30.1, could you try ?

Ok lib updated I’ll keep you posted.
Fast reaction as usual :slight_smile:

edit: is that normal that zigate generate a ton of debug logs every 30 seconds now ? Did you implement state polling ?

By default now we use Home Assistant state polling, yes
So I suggest to use debug only when needed

OK it’s absolutely not going better. I’m wondering if I did not update the component 2 days ago just before the first time I had the issue. I need to review logs when I get back home.
as I can see in logs polling state is running for 10 second every 30 seconds so 1/3 of time.
This could not be a good behavior.
I’ll try to rollback component to see if it’s better before your update.

Ok I can confirm that this is not the state polling the issue, but it looks like this new feature accelerate the appearance of the bug.
First time I had the issue I was on 0.29.11.

Could you share le last “Raw received packet” from your log ?

Could you try to send a raw command 0x0011 to see if it’s working again ?

Sorry I had no time today for this.
I’ll retry the update tomorrow and see if the problem come back even with lower temperatures.
Zigate creator think this could comr from the USB adapter

Just tested latest version this morning and for me it’s not working.
Each time hass refresh all zigate devices I can’t send orders anymore and have to wait few seconds.

I have to control several lights together, and so far I tested:

  • I define a group in HA: it works but there is a delay between each light reaction,
  • I define a group in the Zigbee network using the service zigate.add_group: it works perfectly but I have no entity representing that group.

Is there a way to create a “light” entity representing the zigbee group in HA?

Why do you need that ?
If I’m correct now your light are in a group so if you turn one of them on, all of them turn on ?
So you only need to use the entity of one of these lights ?

Hmm no if I turn on one light only this light turns on. When I create the group I set a group addr (“0abc” for instance). Then I must use this addr in the Zigate services to control the group.

If I could have one light in HA representing this group I could use the HA light service directly. It’s not a big deal but I would like to use a Circadian light component on this group but as it’s not a “light” I cannot use it.

Oh great you still can control single light even if they are in a zigbee group.
It looks obvious now, you have two adresses one for group and one for light.
It could be trick to manage because you could have for example a group of 3 lights, you turn them on with the group adress then you turn them off one by one with the light adress.
So hass still think that the group is on but the tree lights are off.

That’s why I was expecting that group adresses where executed even if you command a single light of the group.