Betatest - Renault ZE Services Binding

@NikM Thanks for the info. That is interesting. I think you are right the HVAC status is probably the issue. There is a disable HVAC flag if HttpStatus.NOT_IMPLEMENTED_501 is returned which handles this better. However maybe the 404 is also something to catch for the same situation…

Looking at the code I have tidied up the logging. This will help us debug your situation and handle it better. Please un-install the official binding (using the web UI) and copy this one to your addons folder to install this “experimental version”… The logs should help us pin point the problem and I can then create a push request for an improved version.

https://drive.google.com/file/d/1prvhxd9axVwB1bLsla1m_RuisMAHibGj/view?usp=sharing

Thanks for the help.

Thanks to you for your work.
Now it looks like this, I think its the hvac-status:

For our 2nd and older car, the Renault Zoe its working fine, without any warnings oder errors.
Think it depends on the car.

1 Like

Thanks for testing.

It would be great if you could test this version, It should work better for you and give you a better logging experience.
https://drive.google.com/file/d/1CfeRL1-yw9GuAXXh6k_yG81Ud_nsaqO0/view?usp=sharing

I think it will disable the HVAC updates on initialise after the first error and then not bother trying to update it.

So the binding works when configuring multiple cars in openHAB? (I have not tested this)

Does the HVAC status and pre-Heat function work for your Megane in the MyRenault App.? (Maybe the data is available in another interface…)

I’m happy to help and it helps me too.

Yes, I linked 2 cars with the binding and it works very well.
I have set a refresh intervall of 5 min for each car, I’m a little bit afraid to reach the poll-limit of the server, but it works so far.

Yes, the pre-conditioning works from the MYRenault app.
The app also has the function of locating the car. (with another button)

Works as expected! Great job!

If you want me to help with other testings, I’m happy to do so.

It would be great if the following timestamp was also available as a channel. As it is the time that is also displayed in the MyRenault app.

Thanks for the feedback and testing @NikM It helps me improve this binding for everyone.

I suspect the pre-conditioning will not work with openHAB now if the HVAC is disabled. It might work with the official binding version.

I will see if the python project has discovered a new service for the HVAC status… (maybe I can reverse engineer this.) If the data is available in the app it should be possible.

Just to confirm you would like the batterystatusupdated timestamp like the locationupdated timestamp channel? I can add this.

You mention there is a locate my car function in the app. You should get the location (GPS) of the car from the binding and be able to display it on a map in the web UI. I assume this is working for your new car too?

Yes I would like the batterystatusupdated timestamp. I think its usefull.

Another idea is to have a channel (for a switch for example) to make a poll to the MyRenault App from inside an openhab-rule. to promptly update the informations.
In my Usecase:
Now that we have 2 cars and only one wallbox, I’d like to know which of the car is plugged to the charger.
With the automated polling I will receive this information after at least 5 minutes (in my case), that could be to long.

I have a workaround for this, but its also a little complicated.
I disable the car Thing with an HttpPutRequest - wait for 1 second - and enable the car thing again with the HttpPutRequest.

So a Channel to poll the car and update the informations will be very usefull.
If my wallbox recognize a plugged car, I can poll the cars and receive the information which is plugged within a few seconds and dont have to wait until the next automatic poll is done.

Now to the locate function. Yes, you are right, thats a way and I receive the GPS data and are able to locate my car on a map.
But this “new” functionality is not to locate the car on a map. If this functionality is used, you can turn on the cars horn or light.

  • I think it’s there to find the car in a crowded parking spot.

If you need any help for testing, let me know.

Hi @NikM

Thanks for explaining your use case and your idea I think it is very good. Reducing the polling interval and adding a update now trigger will reduce the load on the Renault servers and reduce lockouts… while improving data usefulness when needed. I will implement this with the batterystatusupdated.

However I am not sure if it will work because getting the data from the Renault servers is not the same as getting the data from the car. However it is easy to implement this and trigger the same thing that you do with your dis-able and enable of the thing. We (you) will have to test it to see if the data it up to date.

Looking at this there is no information about HVAC services for new cars yet:
https://renault-api.readthedocs.io/en/latest/endpoints.html#hvac-status

Maybe if this becomes available (meaning someone with reverse engineering stills and a new car documents and contributes it) we can then implement it.

The function to locate your car is also not documented yet. I am not sure how useful it is for home automation. You would need a very large home and garage full of cars to “need” this I guess…

The car locking status might be useful for home security type openHAB integrations…???
https://renault-api.readthedocs.io/en/latest/endpoints.html#lock-status

Hey @Doug_Culnane
The thanks goes to you, for your effort and time.
→ I would really like to test that :smiley:

The function to locate your car is also not documented yet. I am not sure how useful it is for home automation. You would need a very large home and garage full of cars to “need” this I guess…

:joy: Maybe a usefull feature for the home automation of Jay Leno’s garage… :crazy_face:
But I usually don’t have to search long for the Megane in our garage… Thats true.

Indeed the locking status is very interesting. But I cannot view the information in the MyRenault app. So I’m not sure if Renault is giving the information out. But → I would really like to test that :wink:

Here is a new experimental version please test:
https://drive.google.com/file/d/1E32pyz8Lwl8B-wSlAtMSFte5LIo-rcth/view?usp=sharing

New Channels

Channel ID Type Description Read Only
batterystatusupdated DateTime Timestamp of the last battery status update Yes
lockstatus String Lock status of the car Yes
updatenow Switch Switch to force an immediate update of channels No

Lock status does not work on our Zoe. Maybe it works on other cars?

You have to re-create a thing to get the new channels…

1 Like

Seems like the lockstatus doesn’t work for other cars either.

batterystatusupdated is working for both, the Zoe and the Megane.

updatenow seems to work, but actually I have no connection to the cars. The cars status wouldn’t refresh in the MyRenault App. Sometimes the cars don’t have a cellular connection. I will test this in a few hours again.

I noticed that the status is not mapped. For example I receive an NOT_IN_CHARGE for the chargingstatus in the sitemap und UNPLUGGED for the plug state.
I’m really sure that there wasn’t the “raw” information in previous versions of the binding?!
Not a big thing, but i noticed it.

1 Like

Hi @Doug_Culnane ,

another short feedback from me. I tested the UpdateNow functionality with our Zoe and it works well.

I dont know why, but the Megane’s communication to the server is disrupted. It wont update the status of the plug.
But I think it will also work with the Megane if its communication to the server is back again.

Thanks to you! If there is any help needed for further tests, contact me.

I have “fixed” the site map problem. Items do not display properly if there have old invalid unknown channel links. You can click on these links and remove them to fix the display.

Does anyone have a working lock status? Maybe I will remove this if it does not work for anyone?

I have opened a Pull request for the new version here:

Thanks a lot! :slight_smile:
From my understanding the binding polls the server for each car seperatly?
Would it be possible to make one poll for the both cars?
I don’t know the architecture or other limitations for that, but in my case I’m really near to the polling limit of the server with two cars.

Yes

Yes probably.

I guess I should implement a “bridge” and a car thing. The bridge might be re-usable for both cars… I will have to investigate and see if and how this works.

That will be really great. :slight_smile:

In the meantime I can also confirm the poll function for the Megane. It works great!

Let me know, if there is some testing to do.

@NikM and anyone else. There is a new version that I need help testing. It is for openhab 3.4.0-SNAPSHOT it incorporates our work and some great feedback from the pull request.

Please test this latest version:
https://drive.google.com/file/d/1x40etWApZDdOBQX0b9AFsmywcuLk7bs_/view?usp=sharing

The updatenow channel has gone because I have improved the handler. You can REFRESH data in a rule like this:

RenaultCar_Location.sendCommand("REFRESH")

All items that get a REFRESH command will trigger a poll and update all channels. So use it wisely or you will trip the API request count circuit breaker which locks you out for a while.

Hey @Doug_Culnane ,

sorry for my late response. I was very busy last week and not at home.
But I try to test the new version today or tomorrow.
My feedback will come soon…

Thanks, greetings and a happy new year!

@Doug_Culnane

I’m not able to run the binding with my OH3.4.0 release installation.
Could you build it for OH 3.4.0?

2023-01-02 10:00:14.132 [ERROR] [Events.Framework                    ] - FrameworkEvent ERROR

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.renault [237]

  Unresolved requirement: Import-Package: com.google.gson; version="[2.9.0,3.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1847) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1840) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1745) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1667) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234) [org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345) [org.eclipse.osgi-3.17.200.jar:?]

2023-01-02 10:00:17.976 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.renault-4.0.0-SNAPSHOT.jar

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.renault [237]

  Unresolved requirement: Import-Package: com.google.gson; version="[2.9.0,3.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.17.200.jar:?]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [bundleFile:3.7.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [bundleFile:3.7.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]

Same here.