Another component for ZiGate

yes for sure. I’ll do it when I’ll find some times to do it :slight_smile:

I don’t say it but everything is on https://github.com/doudz/homeassistant-zigate

1 Like

Excellent news, any idea when you’ll release 0.28.2 ?
A quick test yesterday wit hdev branch shows me that my map looks really better but I prefer to use official release.

already out

Oh sorry, I was waiting for release on github.

So now build_network_map output values looks really better for me, I still have on remaining bulb with 2 childs not linked to zigate:

graph zigate_network {
node [shape=box]
0000 [label=“ZiGate (0000)” shape=doubleoctagon]
“1fab” [label=“LUMI lumi.ctrl_ln2.aq1 (1fab) 00158d00023b1c38”]
“77ed” [label=“LUMI lumi.ctrl_ln2.aq1 (77ed) 00158d00023b1d16”]
ec60 [label=“LUMI lumi.ctrl_ln2.aq1 (ec60) 00158d000232294f”]
ed3b [label=“LUMI lumi.ctrl_ln2.aq1 (ed3b) 00158d00023229d6”]
0590 [label=“IKEA of Sweden TRADFRI bulb E27 W opal 1000lm (0590) 000b57fffe920536”]
b64c [label=“OSRAM Plug 01 (b64c) 7cb03eaa00b19eef”]
a3df [label=“OSRAM Plug 01 (a3df) 7cb03eaa00b1ab2f”]
c27e [label=“Device lumi.sensor_86sw2 (c27e) 00158d0001f480c8”]
9480 [label=“IKEA of Sweden TRADFRI bulb E27 W opal 1000lm (9480) 000b57fffe8b190a”]
cfcc [label=“Device lumi.sensor_motion (cfcc) 00158d0001a8d55a”]
a066 [label=“LUMI lumi.sensor_motion.aq2 (a066) 00158d0002758879”]
“8f41” [label=“IKEA of Sweden TRADFRI bulb E27 W opal 1000lm (8f41) 000b57fffec03264”]
“1abc” [label=“Device lumi.sensor_motion (1abc) 00158d0001aa807c”]
“953f” [label=“LUMI lumi.weather (953f) 00158d0002772e82”]
“1b08” [label=“LUMI lumi.weather (1b08) 00158d00022fcd3e”]
adca [label=“LUMI lumi.weather (adca) 00158d0002348752”]
“69df” [label=“LUMI lumi.weather (69df) 00158d0002478293”]
e496 [label=“LUMI lumi.weather (e496) 00158d00023cfc25”]
“2d96” [label=“LUMI lumi.weather (2d96) 00158d00023cfb7a”]
c142 [label=“LUMI lumi.weather (c142) 00158d000245f051”]
“453d” [label=“LUMI lumi.sensor_cube.aqgl01 (453d) 00158d000279775d”]
4188 [label=“OSRAM Plug 01 (4188) 7cb03eaa00b1b9da”]
“82a9” [label=“LUMI lumi.sensor_cube.aqgl01 (82a9) 00158d00028794e5”]
aa2c [label=“OSRAM Plug 01 (aa2c) 7cb03eaa00b1a4a8”]
0000 – “69df” [label=58]
0000 – “1abc” [label=67]
0000 – “2d96” [label=198]
0000 – cfcc [label=131]
0000 – a066 [label=143]
0000 – c142 [label=99]
0000 – 9480 [label=101]
0000 – 0000 [label=169]
0000 – 0000 [label=62]
0000 – “1fab” [label=123]
“1fab” – “953f” [label=123]
0000 – 0000 [label=76]
0000 – “77ed” [label=82]
“1fab” – a3df [label=66]
0000 – ec60 [label=93]
ec60 – c27e [label=116]
“77ed” – ed3b [label=132]
ed3b – e496 [label=124]
b64c – “1b08” [label=32]
b64c – “82a9” [label=68]
0590 – adca [label=255]
0590 – “453d” [label=255]
0000 – “77ed” [label=90]
0000 – aa2c [label=92]
0000 – ed3b [label=55]
0000 – b64c [label=71]
0000 – ec60 [label=95]
0000 – 4188 [label=78]
0000 – “1fab” [label=129]
0000 – “8f41” [label=39]
}

The pannel load fine and display entities but not links:

And If I run the service to rebuild network map I receive this error at the end:

2019-02-26 13:22:43 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140641528114200] Error handling message: {‘type’: ‘call_service’, ‘domain’: ‘zigate’, ‘service’: ‘build_network_map’, ‘service_data’: {}, ‘id’: 24}
Traceback (most recent call last):
File “/config/deps/lib/python3.7/site-packages/graphviz/backend.py”, line 147, in run
proc = subprocess.Popen(cmd, startupinfo=get_startupinfo(), **kwargs)
File “/usr/local/lib/python3.7/subprocess.py”, line 775, in init
restore_signals, start_new_session)
File “/usr/local/lib/python3.7/subprocess.py”, line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘fdp’: ‘fdp’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/app/homeassistant/components/websocket_api/decorators.py”, line 17, in _handle_async_response
await func(hass, connection, msg)
File “/usr/src/app/homeassistant/components/websocket_api/commands.py”, line 147, in handle_call_service
connection.context(msg))
File “/usr/src/app/homeassistant/core.py”, line 1133, in async_call
self._execute_service(handler, service_call))
File “/usr/src/app/homeassistant/core.py”, line 1157, in _execute_service
await self._hass.async_add_executor_job(handler.func, service_call)
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 424, in build_network_map
myzigate.build_network_map(hass.config.config_dir)
File “/config/deps/lib/python3.7/site-packages/zigate/core.py”, line 1142, in build_network_map
dot.render(‘zigate_network’, cleanup=True)
File “/config/deps/lib/python3.7/site-packages/graphviz/files.py”, line 188, in render
rendered = backend.render(self._engine, format, filepath, renderer, formatter)
File “/config/deps/lib/python3.7/site-packages/graphviz/backend.py”, line 183, in render
run(cmd, capture_output=True, check=True, quiet=quiet)
File “/config/deps/lib/python3.7/site-packages/graphviz/backend.py”, line 150, in run
raise ExecutableNotFound(cmd)

Sorry , I forgot to say, to use the new panel, call the service zigate.build_neighbours_table to populate the links table
it’s a work in progress

No need to apologies here I completely understand that it’s wip. I’m just trying to help your users (including myself)

Service does not exists

oops maybe zigate.build_network_table

I have tried this one it runs fine but nothing in zigate.zigate entity attributes:
image

https://termbin.com/4nvl

Strange, it’s works on mine, maybe try to refresh your browser ?

Peek%2027-02-2019%2011-07

1 Like

Looks like this line does nothing on my setup:
https://github.com/doudz/homeassistant-zigate/blob/d07a2daa18938485a966b572555ac54193105eca/zigate/init.py#L421

I’ve add the debug output here
https://github.com/doudz/homeassistant-zigate/blob/d07a2daa18938485a966b572555ac54193105eca/zigate/init.py#L481
and now I can see the graph.

oops, fixed, I’ve renamed _netwok_table to netwok_table but not pushed it on github

When I saw it I was wondering this is a special declaration method in python. I should really read python 101.

Works fine now!
Just for fun I try to play with the panel to display more info using genereic_type but it’s not always populated. So I need to use type which is really hardware specific and make my code reeeeally ugly

It’s beautiful !
generic_type need to be improve you’re right. It’s only filled for device with template

There’s a strange link between “Interr double salon haut” , “Inter double SDJ” and zigate
Probably one doesn’t exist

That’s the reason why I was waiting for this feature to understand what happens on my network.
It looks like sometimes I have device forgetting the intermediate routeur and try to send direct message to zigate.

It’s curious I’ve reconnected a smart plug (prise lampe dorian) and now I’ve a tradfri bulb not mapped to zigate anymore.

Is there any way to force the link between two devices ?

No the network route cannot be force.
Every device should be powered when building the map