Unfortunately no, you’ll not be able to remove it without changing the source. I suspect that yes, API answers may be different from a country to the other. PR done.
@martin1 I am using this in Sweden with my Volvos and i do not have that problem.
Try https://github.com/molobrakos/volvooncall and lock at your output.
/Mike
I ran volvooncall and the part for position looks like (lat & long obfuscated…):
"position": {
"longitude": 12.3456,
"latitude": 12.3456,
"timestamp": "2018-12-20T11:51:54+00:00",
"speed": 0,
"heading": 245
},
So in my case the heading is a number.
I had the car for service a couple of weeks ago to fix a problem with starting the heater through the app (with the calendar). They then upgraded the software in the car.
It seems strange that the heading should be a boolean; a number as a compass course seems more relevant.
What value do you get with volvooncall?
Have to look when driving now it is null
"position": {
"longitude": 17.123456,
"latitude": 60.123456,
"timestamp": "2018-12-20T12:26:12+00:00",
"speed": null,
"heading": null
My guess is that the values for speed and heading are null for earlier releases of the software in the car.
The readings that I got was when the car was still.
So probably the type for heading should change from Boolean to Number (or more precise Angle:Degree)
You’re probably right, but without any clear description of the API, it’s always a guessing work that I was unable to do as like @tnemrap, I had it ‘null’
Ok. Is it possible for you to update the code and release a new version? And if so, where can I find it?
Code has been updated and new version released but apparently build failed due to an error in nest.test binding…
I installed the September 17 version of the binding (only one I could find) and created a .things and .items file. But somehow it doesn’t work for me. I see the API connection being established and links added in the log, but no actual data comes in. It throws an error:
The openhab.log entries:
[INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'volvo.things'
[WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
at org.openhab.binding.volvooncall.handler.VehicleHandler.updateTrips(VehicleHandler.java:148) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.queryApiAndUpdateChannels(VehicleHandler.java:135) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.lambda$3(VehicleHandler.java:113) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
And the events.log entries:
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsFrontLeft-volvooncall:vocapi:rlm:V90:doors#frontLeft' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsFrontRight-volvooncall:vocapi:rlm:V90:doors#frontRight' has been added.
...etc
[.ItemChannelLinkAddedEvent] - Link 'Voc_WindowsRearRightWnd-volvooncall:vocapi:rlm:V90:windows#rearRightWnd' has been added.
[home.event.ThingAddedEvent] - Thing 'volvooncall:vocapi:rlm' has been added.
[event.ThingStatusInfoEvent] - 'volvooncall:vocapi:rlm' updated: INITIALIZING
[hingStatusInfoChangedEvent] - 'volvooncall:vocapi:rlm' changed from UNINITIALIZED to INITIALIZING
[event.ThingStatusInfoEvent] - 'volvooncall:vocapi:rlm' updated: ONLINE
[hingStatusInfoChangedEvent] - 'volvooncall:vocapi:rlm' changed from INITIALIZING to ONLINE
[home.event.ThingAddedEvent] - Thing 'volvooncall:vehicle:rlm:V90' has been added.
[event.ThingStatusInfoEvent] - 'volvooncall:vehicle:rlm:V90' updated: INITIALIZING
[hingStatusInfoChangedEvent] - 'volvooncall:vehicle:rlm:V90' changed from UNINITIALIZED to INITIALIZING
[event.ThingStatusInfoEvent] - 'volvooncall:vehicle:rlm:V90' updated: ONLINE
[hingStatusInfoChangedEvent] - 'volvooncall:vehicle:rlm:V90' changed from INITIALIZING to ONLINE
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsTailgate-volvooncall:vehicle:rlm:V90:doors#tailgate' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsRearRight-volvooncall:vehicle:rlm:V90:doors#rearRight' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsRearLeft-volvooncall:vehicle:rlm:V90:doors#rearLeft' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsFrontRight-volvooncall:vehicle:rlm:V90:doors#frontRight' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsFrontLeft-volvooncall:vehicle:rlm:V90:doors#frontLeft' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsHood-volvooncall:vehicle:rlm:V90:doors#hood' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_WindowsRearRightWnd-volvooncall:vehicle:rlm:V90:windows#rearRightWnd' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_WindowsRearLeftWnd-volvooncall:vehicle:rlm:V90:windows#rearLeftWnd' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_WindowsFrontRightWnd-volvooncall:vehicle:rlm:V90:windows#frontRightWnd' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_WindowsFrontLeftWnd-volvooncall:vehicle:rlm:V90:windows#frontLeftWnd' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_DoorsCarLocked-volvooncall:vehicle:rlm:V90:doors#carLocked' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_Odometer-volvooncall:vehicle:rlm:V90:odometer#odometer' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_FuelLevel-volvooncall:vehicle:rlm:V90:tank#fuelLevel' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_Fuel_Alert-volvooncall:vehicle:rlm:V90:tank#fuelAlert' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_Fluid_Message-volvooncall:vehicle:rlm:V90:other#washerFluidLevel' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_Location-volvooncall:vehicle:rlm:V90:position#location' has been added.
[.ItemChannelLinkAddedEvent] - Link 'Voc_Location_LUD-volvooncall:vehicle:rlm:V90:position#locationTimestamp' has been added.
As can be seen the API and vehicle go online, but nothing else happens, no Items get updated.
Any clues?
Thanks for this, I’ll have a look a it
Pushed an update that may correct your problem.
Thanks @glhopital. I will give it a try, but can you please point me to the location of the updated jar file as I can only find the Sept. 2018 version…
Thanks. Will test it and report back.
Hi @glhopital,
I tested the new binding and have some initial results to share.
Overnight it logged 2 errors in VehicleHandler (nothing was happening around that time):
2019-01-04 00:55:11.563 [ERROR] [nternal.items.ItemStateConverterImpl] - A conversion of null was requested:
java.lang.IllegalArgumentException: State must not be null.
at org.eclipse.smarthome.core.internal.items.ItemStateConverterImpl.convertToAcceptedState(ItemStateConverterImpl.java:52) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.sendUpdate(ProfileCallbackImpl.java:135) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onStateUpdateFromHandler(SystemDefaultProfile.java:54) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$9(CommunicationManager.java:477) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$11(CommunicationManager.java:497) ~[?:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.CommunicationManager.handleCallFromHandler(CommunicationManager.java:493) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.CommunicationManager.stateUpdated(CommunicationManager.java:475) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.stateUpdated(ThingManagerImpl.java:167) ~[?:?]
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateState(BaseThingHandler.java:287) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.lambda$6(VehicleHandler.java:164) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.queryApiAndUpdateChannels(VehicleHandler.java:161) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.lambda$3(VehicleHandler.java:144) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
2019-01-04 00:55:11.591 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
at org.openhab.binding.volvooncall.handler.VehicleHandler.getValue(VehicleHandler.java:279) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.lambda$6(VehicleHandler.java:162) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:?]
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.queryApiAndUpdateChannels(VehicleHandler.java:161) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.lambda$3(VehicleHandler.java:144) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Looking at the current state of the Items it seems some (like Voc_Odometer
) where retrieved last night when I installed the binding (and some are still NULL):
openhab> smarthome:items list Voc_*
Voc_Fluid_Alert (Type=SwitchItem, State=NULL, Label=Washer Alert, Category=siren, Groups=[gVoc])
Voc_Location (Type=LocationItem, State=xx.xxxxxxxxxxxxxx,x.xxxxxxxxxxxxxxx, Label=Location, Category=geoloc, Groups=[gVoc])
Voc_DoorsRearLeft (Type=ContactItem, State=NULL, Label=Rear Left, Category=null, Groups=[gDoorsOpen])
Voc_Odometer (Type=NumberItem, State=79111.78 km, Label=Milage, Category=null, Groups=[gVoc])
Voc_DoorsFrontRight (Type=ContactItem, State=NULL, Label=Passenger, Category=null, Groups=[gDoorsOpen])
Voc_Fuel_Alert (Type=SwitchItem, State=OFF, Label=Fuel Alert, Category=siren, Groups=[gVoc])
Voc_DoorsHood (Type=ContactItem, State=NULL, Label=Hood, Category=null, Groups=[gDoorsOpen])
Voc_WindowsRearLeftWnd (Type=ContactItem, State=NULL, Label=Rear Left, Category=null, Groups=[gWindowsOpen])
Voc_DoorsCarLocked (Type=SwitchItem, State=NULL, Label=Locked, Category=null, Groups=[gVoc])
Voc_Fluid_Message (Type=StringItem, State=Normal, Label=Washer Level, Category=washer, Groups=[gVoc])
Voc_Location_LUD (Type=DateTimeItem, State=2019-01-03T21:06:20.000+0100, Label=Timestamp, Category=time, Groups=[gVoc])
Voc_DoorsRearRight (Type=ContactItem, State=NULL, Label=Rear Right, Category=null, Groups=[gDoorsOpen])
Voc_DoorsFrontLeft (Type=ContactItem, State=NULL, Label=Driver, Category=null, Groups=[gDoorsOpen])
Voc_WindowsFrontLeftWnd (Type=ContactItem, State=NULL, Label=Driver, Category=null, Groups=[gWindowsOpen])
Voc_DoorsTailgate (Type=ContactItem, State=NULL, Label=Tailgate, Category=null, Groups=[gDoorsOpen])
Voc_FuelLevel (Type=NumberItem, State=56 %, Label=Fuel Level, Category=sewerage, Groups=[gVoc])
Voc_WindowsRearRightWnd (Type=ContactItem, State=NULL, Label=Rear Right, Category=null, Groups=[gWindowsOpen])
Voc_WindowsFrontRightWnd (Type=ContactItem, State=NULL, Label=Passenger, Category=null, Groups=[gWindowsOpen])
Using molobrakos’s Python script, however, gives a full overview of the dashboard info:
$ voc dashboard
Position : (xx.xxxxxxxxxxxxxx, x.xxxxxxxxxxxxxxx)
Door lock : Locked
Heater : Off
Odometer : 79143 km
Trip meter 1 : 5681 km
Trip meter 2 : 32 km
Fuel amount : 27 L
Fuel level : 49 %
Fuel consumption : 9.2 L/100 km
Range : 300 km
Engine : Off
Last trip : 2019-01-04 07:28:41+01:00
Engine : Off
Hood : Closed
Front left door : Closed
Front right door : Closed
Rear left door : Closed
Rear right door : Closed
Front left window : Closed
Front right window : Closed
Rear left window : Closed
Rear right window : Closed
Front right tyre : OK
Front left tyre : OK
Rear right tyre : OK
Rear left tyre : OK
Washer fluid : OK
Brake Fluid : OK
Service : OK
Bulbs : OK
Doors : Closed
Windows : Closed
Restarting the binding updates all Items, except for one (Voc_Fluid_Alert
):
openhab> smarthome:items list Voc_*
Voc_Fluid_Alert (Type=SwitchItem, State=NULL, Label=Washer Alert, Category=siren, Groups=[gVoc])
Voc_Location (Type=LocationItem, State=xx.xxxxxxxxxxxxxx,x.xxxxxxxxxxxxxxx, Label=Location, Category=geoloc, Groups=[gVoc])
Voc_DoorsRearLeft (Type=ContactItem, State=CLOSED, Label=Rear Left, Category=null, Groups=[gDoorsOpen])
Voc_Odometer (Type=NumberItem, State=79143.33 km, Label=Milage, Category=null, Groups=[gVoc])
Voc_DoorsFrontRight (Type=ContactItem, State=CLOSED, Label=Passenger, Category=null, Groups=[gDoorsOpen])
Voc_Fuel_Alert (Type=SwitchItem, State=OFF, Label=Fuel Alert, Category=siren, Groups=[gVoc])
Voc_DoorsHood (Type=ContactItem, State=CLOSED, Label=Hood, Category=null, Groups=[gDoorsOpen])
Voc_WindowsRearLeftWnd (Type=ContactItem, State=CLOSED, Label=Rear Left, Category=null, Groups=[gWindowsOpen])
Voc_DoorsCarLocked (Type=SwitchItem, State=ON, Label=Locked, Category=null, Groups=[gVoc])
Voc_Fluid_Message (Type=StringItem, State=Normal, Label=Washer Level, Category=washer, Groups=[gVoc])
Voc_Location_LUD (Type=DateTimeItem, State=2019-01-04T14:01:24.000+0100, Label=Timestamp, Category=time, Groups=[gVoc])
Voc_DoorsRearRight (Type=ContactItem, State=CLOSED, Label=Rear right, Category=null, Groups=[gDoorsOpen])
Voc_DoorsFrontLeft (Type=ContactItem, State=CLOSED, Label=Driver, Category=null, Groups=[gDoorsOpen])
Voc_WindowsFrontLeftWnd (Type=ContactItem, State=CLOSED, Label=Driver, Category=null, Groups=[gWindowsOpen])
Voc_DoorsTailgate (Type=ContactItem, State=CLOSED, Label=Tailgate, Category=null, Groups=[gDoorsOpen])
Voc_FuelLevel (Type=NumberItem, State=49 %, Label=Fuel Level, Category=sewerage, Groups=[gVoc])
Voc_WindowsRearRightWnd (Type=ContactItem, State=CLOSED, Label=Rear right, Category=null, Groups=[gWindowsOpen])
Voc_WindowsFrontRightWnd (Type=ContactItem, State=CLOSED, Label=Passenger, Category=null, Groups=[gWindowsOpen])
Just to be sure: I run binding version 2.4.0.201901030924 on OH2.4.0 Release Build.
Update on previous findings:
After restart of the binding, updates keep coming in today/tonight. So, if it doesn’t crash, it works.
Have someone figured out how to start Heather and Lock Car from a Rule?
/Mike
Engine start using a NRE rule works for me (I would prefer a non-NRE solution as well). But the unlock rule I created remains in Running state for quite some time and when it finally finishes the doors are still locked. There is no channel for the heater ATM, as far as I know (haven’t checked the source files yet).
When testing with voc
command, I noticed the following behaviour:
-
voc heather start | stop
works -
voc lock | unlock
doesn’t work -
voc engine start | stop
works
However, when testing with the App, I noticed that when trying to unlock the doors, it reported a warning (translated from Dutch): Communication with your Volvo can have issues if your Volvo has no GSM-coverage or is in power save mode. So, could be that I have done to many tests…
EDIT: I also noticed that neither the voc
command nor the binding show a temperature, but the app shows the temperature outside the car as well.
I am now just using voc form rules until we have a binding that can replace that solution.
For me i must have the possibility to lock and start heater from rules, as they are components in scenes.
When i go to bed:
Turn off all lights
Lock the Car
Arm the security system.
/Mike