Is it possible to add custom component like ZiGate to Hassio?
I have not tested it but it should be since you can have access to the /config/ folder through samba or ssh (plugins)
When more advanced, I will ask for inclusion in HASS, but it may take some time (depending on free time available as it does require some work )
Thanks! I’ve followed your tips and it’s working!
So it’s working on Hassio?
Try it ! (as I wrote : no reason for it not to work, but I didin’t setup a hassio system so couldn’t check)
Definitely! Once I will get back from the business trip
Hello guys, first post here, thanks for all the great contribution in this thread.
I ordered a Zigate, which arrived yesterday and I started playing with the steps described for Windows. I could connect to it, enable permit join and see messages sent and received by my IKEA Tradfri remote.
Then I downloaded the three directories under the conf directory on my RPi3, added zigate: to the configuration.yaml file, inserted the Zigate, but could not get it working.
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
pi@raspberrypi:~ $ tail -f /var/log/syslog
Jan 30 20:16:24 raspberrypi kernel: [81788.286910] usb 1-1.5: new full-speed USB device number 7 using dwc_otg
Jan 30 20:16:24 raspberrypi kernel: [81788.419159] usb 1-1.5: New USB device found, idVendor=067b, idProduct=2303
Jan 30 20:16:24 raspberrypi kernel: [81788.419172] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 30 20:16:24 raspberrypi kernel: [81788.419181] usb 1-1.5: Product: USB-Serial Controller
Jan 30 20:16:24 raspberrypi kernel: [81788.419189] usb 1-1.5: Manufacturer: Prolific Technology Inc.
Jan 30 20:16:24 raspberrypi kernel: [81788.420255] pl2303 1-1.5:1.0: pl2303 converter detected
Jan 30 20:16:24 raspberrypi kernel: [81788.424237] usb 1-1.5: pl2303 converter now attached to ttyUSB0
Jan 30 20:16:24 raspberrypi mtp-probe: checking bus 1, device 7: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5"
Jan 30 20:16:24 raspberrypi mtp-probe: bus: 1, device: 7 was not an MTP device
Restart my Home Assistant (0.60.0) and see this:
-- Logs begin at Thu 2016-11-03 17:16:42 UTC. --
Jan 30 20:24:14 raspberrypi hass[9999]: self._loop.call_soon(callback, self)
Jan 30 20:24:14 raspberrypi hass[9999]: File "/usr/lib/python3.5/asyncio/base_events.py", line 572, in call_soon
Jan 30 20:24:14 raspberrypi hass[9999]: self._check_closed()
Jan 30 20:24:14 raspberrypi hass[9999]: File "/usr/lib/python3.5/asyncio/base_events.py", line 357, in _check_closed
Jan 30 20:24:14 raspberrypi hass[9999]: raise RuntimeError('Event loop is closed')
Jan 30 20:24:14 raspberrypi hass[9999]: RuntimeError: Event loop is closed
Jan 30 20:24:14 raspberrypi hass[9999]: 2018-01-30 20:24:14 WARNING (Dummy-22) [root] Observation deleted without explicit cancellation
Jan 30 20:24:14 raspberrypi hass[9999]: 2018-01-30 20:24:14 WARNING (Dummy-22) [root] Observation deleted without explicit cancellation
Jan 30 20:24:15 raspberrypi systemd[1]: Stopped Home Assistant.
Jan 30 20:24:15 raspberrypi systemd[1]: Started Home Assistant.
[...]
Jan 30 20:24:23 raspberrypi hass[10068]: 2018-01-30 20:24:23 INFO (MainThread) [homeassistant.setup] Setting up logger
Jan 30 20:24:25 raspberrypi hass[10068]: 2018-01-30 20:24:25 ERROR (MainThread) [homeassistant.loader] Unable to find component zigate
Jan 30 20:24:25 raspberrypi hass[10068]: 2018-01-30 20:24:25 ERROR (MainThread) [homeassistant.setup] Setup failed for zigate: Component not found.
Then Home Assistant starts but without the Zigate component.
Any ideas what could be wrong?
Thanks!
The 3 folders must be under config/custom_components/
did you put them just under config/ ? (config/ is the folder where configuration.yaml is)
Issue solved, thanks! By accident I copied custom_components with the three directories under /home/homeassistant/conf where my appdaemon config files were. Now they are at the proper location, but I faced a permission error:
Jan 30 22:06:14 raspberrypi hass[10690]: 2018-01-30 22:06:14 DEBUG (MainThread) [custom_components.zigate] ZIGATE : Starting
Jan 30 22:06:14 raspberrypi hass[10690]: 2018-01-30 22:06:14 ERROR (MainThread) [concurrent.futures] exception calling callback for <Future at 0x6b5802d0 state=fini shed raised SerialException>
Jan 30 22:06:14 raspberrypi hass[10690]: Traceback (most recent call last):
Jan 30 22:06:14 raspberrypi hass[10690]: File "/srv/homeassistant/lib/python3.5/site-packages/serial/serialposix.py", line 265, in open
Jan 30 22:06:14 raspberrypi hass[10690]: self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
Jan 30 22:06:14 raspberrypi hass[10690]: PermissionError: [Errno 13] Permission denied: '/dev/ttyUSB0'
Checked the device:
$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Jan 30 20:16 /dev/ttyUSB0
Added user homeassistant to group dialout:
$ sudo adduser homeassistant dialout
Adding user homeassistant to group dialout
Done.
Reboot aaaand:
Jan 30 22:20:17 raspberrypi hass[324]: 2018-01-30 22:20:17 DEBUG (MainThread) [custom_components.zigate] ZIGATE : Starting
Jan 30 22:20:17 raspberrypi hass[324]: 2018-01-30 22:20:17 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE : Transport initialized : SerialTransport(<_UnixSelectorEventLoop running=True closed=False debug=False>, <custom_components.zigate.zigate2hass.ZiGateProtocol object at 0x6a415e10>, Serial<id=0x6bcae710, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))
Thanks again!
Hello,
Do you know when it will be possible to see zigbee signal strength on Hass ?
Thanks.
Edit : I experiencing some strange issues.
1/ my magnet sensor stopped working I need to reset and re-add it in order to see it working in Hass
2/ I see “Zigate Breaking news : new device 50a501” it’s really strange because this device is already in my configuration
Signal strength has been requested as a Zigate firmware update, so it will certainly be possible in the future
I had sometimes some strange behaviours but they stopped …
For the notifications … try to dismiss … and tell me if it happens again
Hello,
According the French forum of domoticz the get devices list return the signal strength :
" Bonjour à tous,
J’ai corrigé et mis à jour le firmware de la ZiGate. 3.0b
- J’ai poussé au max la capacité de la ZiGate : 80 modules en tout. 50 en connexion directe avec la ZiGate et 30 de plus connectés à d’autres routeurs connectés à la ZiGate
- J’ai rajouté aussi une commande pour les développeurs permettant de récupérer la liste de tous les modules connectés avec : short address, IEEE address, power source, et qualité de réception.
A bientôt !"
: )
Hi,
when HA starts, is there a way to make it poll every registered sensors ?
Sensors don’t talk quite often if there’s no significant changes, I guess I could restore states from before but I’d prefer to poll them instead.
Is that possible ?
Hey there! I did not have the time yet to look into my Philips Hue DimmerSwitch yet, but I received today the three Xiaomi devices I ordered . Thus, I wanted to thank you for the job you made here @eLRIC (once again) as it worked out of the box without any struggle (except for the switch I had to retrieve older message to found how to configure it ).
Everything works well with my Xiaomi sensors and my Xiaomi Switch, you did a great job there!
The service “zigate.raw_command” allow you to sen arbitrary commands through the ZiGate. If you know the attributes you want to retrieve, it should be possible to use it to get the device to send back attributes you’re looking for.
Can you open an issue on the github ? it will help remebering to have a look at it
I’m glad it worked. Akila did a fantastic job with the ZiGate, and people are providing test data, even providing code so it helps a lot (as I don’t own all zigbee devices available on the market )
Hello ElRIC,
I’m don’t understand how switch works in home-assistant ^^
My Switch.yaml :
- platform: zigate
name: 'Fenêtre Salle de Bain'
address: 707401
default_state: 'event'
inverted: 'yes'
With that configuration i have a new switch appear in my home. But the switch does not respond to the opening of the window…
In the log everything seems fine :
2018-02-03 17:15:13 INFO (MainThread) [zigate] * General: On/Off
2018-02-03 17:15:13 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE SIGNAL :
2018-02-03 17:15:13 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Signal : zgt_signal_update_707401
2018-02-03 17:15:13 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Property : state
2018-02-03 17:15:13 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Data : off-release
2018-02-03 17:15:13 INFO (MainThread) [zigate] * Open/Release button
2018-02-03 17:15:13 INFO (MainThread) [zigate] FROM ADDRESS : b'7074'
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] - Source EndPoint : b'01'
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] - Cluster ID : b'0006'
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] - Attribute ID : b'0000'
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] - Attribute type : b'10'
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] - Attribute size : 1
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] - Attribute data : b'01'
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] # encoded : b'018102120210021ef1147074021102100216021002100210100210021102117b03'
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] # decoded : 0181 02 00 0E F1 14 70 74 01 00 06 00 00 00 10 00 01 01 7B03
2018-02-03 17:15:13 DEBUG (MainThread) [zigate] (@timestamp : 17:15:13)
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] --------------------------------------
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] RESPONSE 8102 : Attribute Report / Response
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE SIGNAL :
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Signal : zgt_signal_update_707401
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Property : last seen
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Data : 2018-02-03 17:15:45
2018-02-03 17:15:45 INFO (MainThread) [zigate] * General: On/Off
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] ZIGATE SIGNAL :
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Signal : zgt_signal_update_707401
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Property : state
2018-02-03 17:15:45 DEBUG (MainThread) [custom_components.zigate.zigate2hass] - Data : on-press
2018-02-03 17:15:45 INFO (MainThread) [zigate] * Closed/Taken off/Press
2018-02-03 17:15:45 INFO (MainThread) [zigate] FROM ADDRESS : b'7074'
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] - Source EndPoint : b'01'
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] - Cluster ID : b'0006'
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] - Attribute ID : b'0000'
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] - Attribute type : b'10'
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] - Attribute size : 1
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] - Attribute data : b'00'
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] # encoded : b'018102120210021ef4157074021102100216021002100210100210021102107e03'
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] # decoded : 0181 02 00 0E F4 15 70 74 01 00 06 00 00 00 10 00 01 00 7E03
2018-02-03 17:15:45 DEBUG (MainThread) [zigate] (@timestamp : 17:15:45)
Do you have any idea ?
PS :
I tried to add binarySensor like this :
- platform: template
sensors:
windows_sdb:
device_class: window
value_template: "{{ is_state('switch.fenetre_salle_de_bain', 'on-press') }}"
Does not work ^^
Thanks.
- platform: zigate
name: 'Fenêtre Salle de Bain'
address: 707401
default_state: 'state'
inverted: 'yes'
should work better
Do you typically configure the door/window sensors as switch or as sensor? I see above max5962 configured it as switch. I have currently configured mine as a sensor and works with one exception: if I restart home assistant, the sensor stays in ‘unknown’ state until the door is opened, when the sensor sends an update. I’ve been trying to find a solution, but no success so far.
So I created a template sensor that goes into off state if the door is open and to on state if closed or unknown. This is OK for now (unless HA is restarted when the door is open), but would be nice to find a proper solution.
In my opinion this is a pretty basic function so I must be screwing up something.
I configure them as switch (as I wanted a switch representation). As far as I know, sensor do not have a default state so your solution is the best I can think of.
As @lolorc stated, a request on state could be a solution (get state when you start HASS), but it is not implemented yet