Getting this error when trying to run from the shell:
(homeassistant) homeassistant@hassbian:~/.homeassistant $ ./bin/z-wave-graph.py --debug --config ~/.homeassistant/
Traceback (most recent call last):
File "./bin/z-wave-graph.py", line 323, in <module>
zwave = ZWave(config, args)
File "./bin/z-wave-graph.py", line 184, in __init__
m = self.request('')
File "./bin/z-wave-graph.py", line 200, in request
response = get(url, headers=headers)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 616, in send
adapter = self.get_adapter(url=request.url)
File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 707, in get_adapter
raise InvalidSchema("No connection adapters were found for '%s'" % url)
requests.exceptions.InvalidSchema: No connection adapters were found for 'axxxxxs.duckdns.org:8123/api'
(homeassistant) homeassistant@hassbian:~/.homeassistant $
I was playing with this last night and today. I finally got it running. I was having similar issues to each of you.
I can confirm it works fine on the latest version (.0.82.0). I am in fact still running an api password though. Can you:
look at your base url and make sure it is exacly what you use to log into Home Assistant.
check your permissions on /www/z-wave-graph.html
check your permissions on /bin/z-wave-graph.py
I changed my permissions on each to the Home Assistant user and group and did a chmod 755 to z-wave-graph.py. Neither change had a positive affect. Once I set my base url to exactly what I use to log into Home Assistant it worked.
Please try setting your base url first because if it works I would like to put my files back to how they were
If setting your base url first has no affect, please try permissions on z-wave-graph.html first and then z-wave-graph.py.
Error while executing automation automation.generate_z_wave_graph. Service not found for call_service at pos 1: (ServiceNotFound(ā¦), āService shell_command.z_wave_graph not foundā)
When I try to run the command in the CLI i get an error:
I suspect it has something to do with some assumptions the script makes about the state of the objects it gets back from HA. Can you run it from the command line? That might give you a full traceback which would make fixing the issue pretty straight forward.
EDIT: interestingly enough, I finally got around to some upgrades (tokens ONLY) and mine fails with the same error. Debugging now.
It took me a while, but I finally tracked down my problem. I had a file that was not readable by the Home Assistant user in /usr/local/lib/python3.7/dist-packages/ so I had to chmod -R a+rX /usr/local/lib/python3.7/dist-packages/* .
To find this I put the following in my configuration.yaml:
On first run from the command line it gave me the following error:
Error unable to import the module 'networkx', please pip install it from WITHIN your virtual environment.
After Installing ānetworkxā, I get the following:
pi@hassbian:~ $ /srv/homeassistant/bin/python3.7 /home/homeassistant/.homeassistant/python_scripts/z_wave_graph.py
Traceback (most recent call last):
File "/home/homeassistant/.homeassistant/python_scripts/z_wave_graph.py", line 325, in <module>
raise ValueError("Unable to automatically find configuration.yaml, you have to specify it with -c/--config")
ValueError: Unable to automatically find configuration.yaml, you have to specify it with -c/--config
The script walks through a list of directory paths where configuration.yaml often resides, but it looks like the script is not finding yours. You can edit the shell_commands/z-wave-graph.yaml file and add --config=/full/path/to/configuration.yaml . If you let me know what that path is I might add it to the default search list.
NEW RELEASE! I know, I canāt believe it either. I just pushed a new release that has a breaking change (requires a long lived token). Feel free to give it a spin, but make sure to read the next paragraph.
On a side note, I am pretty much deprecating this project. With the newest release, Home Assistant Community Z-Wave graph (without the python) has pretty much nailed it. Doing it without the Python makes integration significantly easier and is the route I should have taken from the beginning, but my JavaScript is weak and my Python is stronger.