If you reinstall / upgrade now, be careful as config has to be updated Device addresses are now on 6 bytes : 4 for short address (i.e. 34bc) & 2 for endpoint (i.e.01)
so in config.yaml if short address is 34bc and endpoint is 01, device address must be defined as 34bc01
@touliloup : this should help with your wall switch
I was almost starting a pyzigate project… and then I realized that somebody beat me to it.
Very nice! Congratulations for the library and the custom component. Are you planning to upload the pyzigate project to the Python Package Index? It will be easier to integrate with the custom component.
Do you need something? I am a Python developer, own a ZiGate and have Aqara devices… unfortunately, I have just finished moving places, so my HA environment is “WIP” right now
Any help is welcome (corrections, enhancements, tests, whatever ). You can propose patches anytime.
Indeed, we are currently improving the code in order to publish a pypi package. As it’s a first for me, I’m learning at the same time. Hopefully, it should be done this WE.
I bought my ZiGate device the other day, I hope it will arrive soon . I already have a Philips Hue Bridge with some Hue Lights, I’ll give it a test (and see how to unpair the lights and the bridge ) . I think I might also buy some Xiaomi sensors to check if it works well with your code .
I’m willing to give you some help and some feedbacks on this, I think this project is really great!
At leat, pyzigate library published under pypi
pyserial or asyncio / serial_asyncio required
use of the library through HASS coming soon (will bring battery level for some xiaomi sensors)
Unzip it in your <conf_folder>/custom_components/
(you should put all the zigate, sensor & switches folders right under custom_components)
Adapt your <conf_folder>/configuration.yaml
done !
(It handles the download of the pizygate and asyncio-serial libraries as per homeassistant standard behavior)
NB1 : should work, but if you encounter problems, just ask here …
NB2 : configuration documentation still needs to be updated with the information available in this thread
I’m sorry i’m really a newbie
i download the release and put everything in my config folde :
ls /home/docker/hass/custom_components
LICENSE README.md sensor switch zigate
At the restart i have in logs :
Traceback (most recent call last):
File “/usr/src/app/homeassistant/setup.py”, line 196, in _async_setup_component
result = yield from component.async_setup(hass, processed_config)
File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 212, in coro
res = func(*args, **kw)
File “/config/custom_components/zigate/init.py”, line 43, in async_setup
from .zigate2hass import ZiGateProtocol, ZiGate2HASS
File “/config/custom_components/zigate/zigate2hass.py”, line 9, in
from pyzigate.zgt_parameters import *
I was way too impatient and started the setup. The steps you specified for the installation made it really easy. I wanted to thank you for these.
From there I wanted to pair it with one of my Philips Hue to dive a bit in it and see how it works. I read that you only have to call the service zigate.permit_join in HA and then the device should show up on the Welcome Screen. The issue here is that there are no push buttons on the Philips Hue to start pairing. The Philips Hue light does not show up on the Welcome Screen and it doesn’t feel like it has been paired. The Philips Hue App is able to tell that the light is available for pairing.
Yep, I do speak French. This article helped, and actually it seems that removing the lights from the Philips Hue App does the trick to unpair it, however I am still unable to pair with zigate.
As I did not know if it came from my setup or from anything else, I tried to setup this on a docker on my laptop. Everything was setup properly and I followed (once again) the steps to install your components in the config directory under custom_components, but still unable to pair the device.
I read from the site of Zigate the following statement:
Attention ! la plupart du temps vous observerez que le endpoint 0x01 est quasiment toujours utilisé mais certains constructeurs jouent avec cet adressage pour rendre plus propriétaire leur objet. (ex : Philips HUE utilise le endpoint 0x0B)
I did not have the time yet to dive into your code and check how it works and what it does, but I was wondering if it was possible in anyway that it could be one of the reasons it does not work?
(edit : this is an answer to bdr’s question)
Hello,
Should work (I just re-tested it to be sure) …
Just a question : are you long pressing the small side button (not the big front one), as in : https://youtu.be/QkTx2mqsItw?t=1m14s ?
Pairing is before identifying the endpoints, so that should not interfere
In the link I posted, I was specifically thinking about that part :
Personnellement j’utilise la télécommande de Philips Hue :
Voici ma méthode pour remettre à Zéro, appairer et associer une ampoule :
On appuie sur ON + OFF ( 1 + 0) simultanément pendant 5 secondes à 50 cm de l’ampoule (sous tension bien entendu)
On ouvre le réseau ZigBee de votre coordinateur (ZiGate par exemple)
On éteint puis on remet sous tension l’ampoule qui s’appaire au coordinateur
Pendant que le réseau est ouvert, on retourne la télécommande et à l’aide d’un trombone, on appuie sur le bouton setup pendant 5-10 secondes. La télécommande joint à son tour le réseau ZigBee
Si on le souhaite, on peut associer la télécommande et l’ampoule en maintenant le bouton ON (1) pendant 5 secondes à 50 cm de l’ampoule (toujours sous tension).
Is it this process that is not working in your case ?
For your first reply, yes I’ve tested this part. Nothing changed, even when I try the part on resetting the Dimmer Switch, I was unable to pair it with the Zigate.
Thanks for the help concerning the logs, I was ashamed not to be able to provide something as I only the service being called and executed. I’ll try this tomorrow, I’ll post the output in this thread. I also bought some Xiaomi / Aqara devices in order to check if I have any issue with this also and maybe this would help identify the problem as it seems that it’s working properly with you guys. Door and temperature sensor and Light Switch will be on their way soon. Hope the issue will only concern the Philips equipments
@eLRIC Yes, I’ve tried both.
I retested this morning. I’ve put the zigate in join mode, then I put the device in discover mode (using the liitle button on the edge - the blue led blinked once)
I have enabled all debug logs according to your last comment and here is the content of it :
Even before pressing the little button …
I’ll try to guess what can prevent ZiGate’s return code from happening. What config are you running : hass.io, dockerized, python venv ?
NB : For the process in itself once solved, you may try to push the little button longer ? something like > 6 secs (the led normally blinks several times)