Open irekzielinski opened 5 months ago
Same here in Germany. The stock Nissan app works, though.
Nissan changed the base URL, the new one can be found here:
Nissan changed the base URL, the new one can be found here:
Great find! Indeed, this modification fixes the script:
Thank you @irekzielinski @Ez2517-Git , in my local HAOS I have just updated the BASE_URL:
I have also crafted #47 which updates the BASE_URL configuration and was able to validate that everything works fine by using this PR on my HA instance.
i am supprised that an external leaf app continues working. Checking the opensource discover that the endpoint on that app was changed 9 months ago. It seams the author of that app was informed earlier and didn't have to wait and discover the api's don't work anymore.
the app i am reffering to: "my leaf".
For anyone who needs access to lower level SSH on a local install check this out: https://developers.home-assistant.io/docs/operating-system/debugging/#generating-ssh-keys Then you can connect and run the commands from this post https://github.com/filcole/pycarwings2/issues/46#issuecomment-2118851968
I apologise if this is a stupid question - but after i edit the file how do i save changes? When i restart home assistant the api link I've edited reverts back.
I apologise if this is a stupid question - but after i edit the file how do i save changes? When i restart home assistant the api link I've edited reverts back.
Press escape key, then write: :wq
I apologise if this is a stupid question - but after i edit the file how do i save changes? When i restart home assistant the api link I've edited reverts back.
Press escape key, then write: :wq
or: ESC, then ZZ
Nissan Leaf N-Connecta 2023 working again in Italy, thank you so much for the update
2023 Leafs do not use Carwings any more, afaik...
Am 20. Mai 2024 00:34:37 MESZ schrieb ik3huk @.***>:
Nissan Leaf N-Connecta 2023 working again in Italy, thank you so much for the update
-- Reply to this email directly or view it on GitHub: https://github.com/filcole/pycarwings2/issues/46#issuecomment-2119380972 You are receiving this because you were mentioned.
Message ID: @.***> -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
Thank you @irekzielinski @Ez2517-Git , in my local HAOS I have just updated the BASE_URL:
- SSH to HAOS
- docker exec -it homeassistant bash
- sed -i 's/apiv210707/apiv230317/g' /usr/local/lib/python3.12/site-packages/pycarwings2/pycarwings2.py
- I restarted HAOS (I do not know if it is mandatory) and it is working again.
I have replaced the step 3, if anybody don't know how to use 'vi command'
I can confirm this also fixes the problem for me (I'm in Ireland).
Thank you for the update. It works again on my Nissan Leaf 2018.
I'm afraid this isn't gonna work for homeassistant-core.
I'm afraid this isn't gonna work for homeassistant-core.
I have literally no idea of what to do here! Should I just wait for an HA update? How long might that take please?
First you have to install a ssh terminal in HA: https://www.youtube.com/watch?v=dAmGYrKDpZE and then you can execuse line 2,3 of the solutions.
First you have to install a ssh terminal in HA: https://www.youtube.com/watch?v=dAmGYrKDpZE and then you can execuse line 2,3 of the solutions.
Thanks for this. Have just followed it and it works perfectly!
Works for me too now. I already had ssh and terminal installed. But not the advanced version. The non-advanced version obviously hasn't docker available. After installing the advanced version and following the instructions my Nissan is available.
Thanks!
Works for me, (once I realised I needed the advanced ssh addon). Thank you
Works for me, (once I realised I needed the advanced ssh addon). Thank you
Same here. Thank you very much.
I'm afraid this isn't gonna work for homeassistant-core.
Any ideas how to solve it for core?
I'm afraid this isn't gonna work for homeassistant-core.
Any ideas how to solve it for core?
Yes, just follow the instructions above. Bu sure to install the advanced ssh (also if you already installed the basic ssh)
1:
First you have to install a ssh terminal in HA: https://www.youtube.com/watch?v=dAmGYrKDpZE
2: During installation you selected to add terminal to your menu. And in the configuration: unset protectionmodus. Open terminal and perform the steps below beginning with step 2. (You can skip step 1, step 1 is done by opening terminal.
Thank you @irekzielinski @Ez2517-Git , in my local HAOS I have just updated the BASE_URL:
- SSH to HAOS
- docker exec -it homeassistant bash
- sed -i 's/apiv210707/apiv230317/g' /usr/local/lib/python3.12/site-packages/pycarwings2/pycarwings2.py
- I restarted HAOS (I do not know if it is mandatory) and it is working again.
In case you make any typo's on step 3 (i did on my mobile phone :-(, in the second part of the replacement apparently): You can also edit the pycarwings2.py using vi. It is not difficult to find the api url. Correct the typo and you're done.
TBH, I didn't know what I was doing, but doing this
SSH to HAOS docker exec -it homeassistant bash sed -i 's/apiv210707/apiv230317/g' /usr/local/lib/python3.12/site-packages/pycarwings2/pycarwings2.py
magically worked!. I also restarted my HA. My HA is running as a VM on ESXi 6.7.
Thank you so much @irekzielinski @Ez2517-Git
Not sure if I'm doing something wrong, or if HA changed their folder structure. But it looks like this fix is not working anymore with HA 2024.6.x release. When navigating to /usr/ there is no local folder.
Using HA OS, running as a VM
@TyzzyT
Not sure if I'm doing something wrong, or if HA changed their folder structure. But it looks like this fix is not working anymore with HA 2024.6.x release. When navigating to /usr/ there is no local folder.
Using HA OS, running as a VM
As mentioned above: use advanced ssh. I ran into the same problem by using the standard ssh.
I'm using the VM console, which worked a few weeks ago with the HA 2024.5 release. I'll check the advanced SSH add-on.
I'm using the VM console, which worked a few weeks ago with the HA 2024.5 release. I'll check the advanced SSH add-on.
Advanced ssh worked fine Yesterday for me, as for the previous realeses of HA.
I'm using the VM console, which worked a few weeks ago with the HA 2024.5 release. I'll check the advanced SSH add-on.
Advanced ssh worked fine Yesterday for me, as for the previous realeses of HA.
Advanced SSH add-on is working, thanks!
No solution for the pycarwings2 issue yet? Or we need to continue to push this patch after each update of HA?
Thanks to everyone who provided info for this issue. I finally got the original integration working again by editing the pycarwings2.py file via the Advanced SSH Terminal. I initially struggled to get the Advanced SSH addon to run until I realised that the standard SSH addon was using port 22. You either have to Stop that addon, or change the port that the Advanced SSH addon uses from 22 to something else. e.g. 23.
When can I expect that a solution makes it into the official Home assistant? So without HACS or workaround.
Thanks for the support on this to everyone who is contributing.
Im in the UK and noticed API stopped working (Nissan app works OK). This line of code fails:
Logged the error message:
`ERROR:pycarwings2.pycarwings2:Invalid JSON returned: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> \
Not Found
The requested URL /api_v210707_NE/gdc/InitialApp_v2.php was not found on this server.
Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/pycarwings2/pycarwings2.py", line 160, in _request j = json.loads(response.text) File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ` Anyone else seeing this? Thanks!