Good points. We should already be able to query home assistant when the value was last updated to get an idea of how stale the data is.
I think my instance is failing because it can’t get the py carwings library before home assistant gives up. It did that to me the first time, but after rebooting it worked. I was going to download and store it locally to see if that fixed it.
yes i did.
Have you complete guide how to use Nissan leaf custom component. maybe i am missing some thing. i am tried both to put my username and password in configuration.yaml file and in nissan_leaf.py, but same result.
I had some time to find out why my config is failing today.
If I understand the error correctly, it is failing while trying to install the pycryptodome requirement for pycarwings2.
2018-04-03 19:46:59 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package https://github.com/BenWoodford/pycarwings2/archive/master.zip#pycarwings: Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-w096xrm2/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-wcsca0p2-record/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-w096xrm2/pycryptodome/ 2018-04-03 19:46:59 ERROR (MainThread) [homeassistant.requirements] Not initializing nissan_leaf because could not install requirement https://github.com/BenWoodford/pycarwings2/archive/master.zip#pycarwings 2018-04-03 19:46:59 ERROR (MainThread) [homeassistant.setup] Setup failed for nissan_leaf: Could not install all requirements.
What is really odd is that it was working on my HASSIO installation.
I think one of the latest HASSIO updates may have caused the problem. I am also having problems with the fact that all of the historical data has disappeared. I plan to reflash my my Pi’s memory card and restore from backup to see if that fixes it.
It’s likely that HASS.io doesn’t like using direct git links for libraries, which I’ve had to use for now as the author of the library hasn’t pulled my changes in yet.
I run mine straight in docker without HASS.io so haven’t come across these issues.
~ install https://github.com/BenWoodford/pycarwings2.git
BusyBox v1.27.2 (2018-01-29 16:01:29 GMT) multi-call binary.
Usage: install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST
Copy files and set attributes
-c Just copy (default)
-d Create directories
-D Create leading target directories
-s Strip symbol table
-p Preserve date
-o USER Set ownership
-g GRP Set group ownership
-m MODE Set permissions
-t DIR Install to DIR
So everything started working for me again. I am pretty sure your right, Nissan changed something. The new Nissan App was not able to get my car’s location, but now it can. After I logged in with the official app again and then updated the location of the car everything started working again. There was also a reboot of my Pi during the time too.
Did you update something Ben in the last couple of days? Maybe something on Github that allowed my Pi to start getting the library correctly.
re[quote=“BenWoodford, post:54, topic:38663, full:true”]
Nissan appear to have changed something in their API so this is now broken
The other thing that I changed was upgrading my Apple Router to Google WiFi. Maybe that allowed the library to download before Home Assistant timed out? Maybe I should look at what has changed in Hass in the last couple of versions.
I think that this project is looking very exciting. I would love to add this to my hass.io based HA, but I am not going to play around until it is available as a normal addon - added to hass.io by adding the Git repository URL. Hass.io is (I believe) now the most popular way to install and run HA so until this add-on is available to add in a painless manner, many people who are not developers or especially skilled in coding will be missing out on something that looks really promising.
The Nissan Carwings web interface (I have a late 2014 Leaf using Carwings instead of Nissan Connect services) is AWFUL (Flash based, slow, many parts disfunctional) and the Android app (Nissan Connect EV will not even run on my fully up to date OnePlus phone. Anything that helps me to avoid using the terrible Nissan interface would be so welcome.
Thanks for you efforts so far - my mouth is watering for an add-on that I can use.