Another component for ZiGate

So to do this you have to edit the file entity_registry.yaml to change the entity_id
for example:

binary_sensor.zigate_bd3b_onoff_2:
  config_entry_id:
  name:
  platform: zigate
  unique_id: 00158d0001de743c-1-6-0

become

binary_sensor.main_door:
  config_entry_id:
  name:
  platform: zigate
  unique_id: 00158d0001de743c-1-6-0

After editing you have to restart HA

Does this project support :

  • RSSI or LQI in attribute
  • Battery information
  • Illumination information
  • restore previous stats ( across restarts )

thanks

  • RSSI or LQI in attribute : Yes RSSI
  • Battery information : Yes, battery voltage (and tries to convert it to level percent)
  • Illumination information : Yes
  • restore previous stats ( across restarts ) : Yes (it use a persistent file called zigate.json)
1 Like

Small breaking changes : now use a stronger unique_id, this means you have to update your entity_registry.yaml
Sorry for inconvenience

does it support osram smart+ plug ? does it configure the plug to send back its state when changed from the plug ?
I’ve moved to zigbee2mqtt, still have my zigate tho, are the json messages identical between the 2 projects, or are their structures entirely different ?

Yes

Be aware that this component doesn’t use mqtt, json is only use to store all informations in a persistent file

ok, thanks for your answer.
I thought this was about https://github.com/doudz/zigate
so is it basically a fork of https://github.com/elric91/homeassistant_zigate ?
Does it support reconnecting to the serial device or to the zigate wifi when the connectionre is lost or does it require a restart of HASS ?

edit: could you point me to the code for the config of osram plug reporting please ?

https://github.com/doudz/zigate is the python library used. For information this library is used on the zigate plugin for Jeedom too.

No, this project is not a fork of the elric91’s work, it’s a new, different one

Automatic reconnection is supported for both serial (USB) and wifi ZiGate.
BUT the zigate wifi module is buggy https://github.com/fairecasoimeme/ZiGate/issues/45
So I recommend not using it.

reporting is done by calling bind and set_report

1 Like

For information this library is used on the zigate plugin for Jeedom too.

Wich plugin ? Abeille or official Zigate plugin ?

And thanks for all previous answers :slight_smile:

EDIT : how to run command on the zigate with your plugin ?

The ZiGate plugin, not Abeille.
By the way, it’s not the official zigate plugin for Jeedom, since I’m not working for Jeedom or for ZiGate :wink: But I use the official name and logo in agreement to the zigate creator.

To run raw command, you could use the service zigate.raw_command with data like {“cmd”:78,“data”:“7daf00”}
cmd is the command number in integer form, example the command 0x0010 would be 16
data is a optionnal payload string in hex form

So example, you want to call permit_join 0x0049 for 30 sec
{“cmd”:73, “data”:“FFFC1E00”}

Some commands a directly available as service, example zigate.permit_join

Thanks it works, I’ve completely delete entries in my entity_registry file and update the code to latest version (because I had a lot of entities from testing in my file so I wanted to start from a clean file)
Now I can rename my entities following your instructions.
But now I have one of my wall switch with message saying I need to refresh it, does not appear in the switches and refresh have no effect:

Here’s the refresh debug log: http://termbin.com/jqe4

https://github.com/doudz/homeassistant-zigate/issues/1

Hi, if you need some information about sensors from Xiaomi (Aquara and Mijia door sensor, Aqara PIR, Mijia button) and the one from Heiman please contact me, I would gladly help :wink:

A little request:

Can you please rename battery to battery_voltage?
There is a very nice auto-battery-sensor-creator plugin (https://raw.githubusercontent.com/notoriousbdg/Home-AssistantConfig/master/packages/battery_alert.yaml)

that will create alerts and sensors automagically, but it give priority to battery instead of battery_level.
I think that battery is just too generic.

battery 3.005
battery level 39

Will become -->
image

Sure I could rename it, it makes sense

Thanks for your help.
Any devices is supposed to be supported out of the box.
So just try and if there’s problem contact me :slight_smile:

1 Like

Awesome contribution to the community @doudz

1 Like

Yes, I binded:

  • smart aqara button
  • lot of aqara door sensors
  • a mijia door sensor
  • a lot of aqara pir sensor
  • heiman smoke sensor

Apart from the heiman (I posted some info on GitHub, ask if it was not enough), everything just works, and the smart button even get a secondary sensor for multiclic. Nice done, much better than previous custom component.

Thanks for the answers !
I’m using set2net on the server my usb zigate is connected to, and I’ve configured it as a wifi zigate (with ip+port) with homeassistant.
Very good thing that it supports reconnection !

Ok finally I’ve run permit join and resync the switch.
Now he works fine but with a new addr.

Concerning magic cub actually it still tells me that device need some refresh.
I have 3 sensors, one for movement and 2 rotation


It lloks like he can detect shake, rotation and slide but it looks like only movement sensor is updated.

But I’ve seen that your lib is update in 0.18 for a better support for that specific device so maybe it’ll solve my issues here.

How to migrate from the old component ?
All joined devices in the zigate will auto add or i need to re-joined them ?
thanks