[SOLVED] Help with sending Command

This is easily derived from the channel definition for the different items, for instance:

Number:Dimensionless	VoC_Fuel_Level
						"Fuel Level"
						<sewerage>
						(gVoC)
						{channel="volvooncall:vehicle:v90:V90:tank#fuelLevel"}

The first 4 elements make up the correct Thing ID, which is derived from the .things file:

Bridge volvooncall:vocapi:v90 "VoC V90" @ "System" [username="**REDACTED**", password="**REDACTED**"] {
    Thing vehicle V90 "V90" @ "World" [vin="**REDACTED**", refreshinterval=5]
}

I know the ThingID and ChannelID stuff can be a bit confusing at timesā€¦ :smiley:

When I try to use the remote heater action, I get the same error. But the pre-climatization action works for me. If you lookup the details in PaperUI for the Thing, you see the list of supported and not supported channels/actions.

@noppes123 & @kjoglums, Thanks a lot for your help. I got it running based on the rule example of @kjoglums. For me it works as follows (via Alexa Voice command):

rule "VOC Heater On"
    when
        Item Volvo_Standheizung_Alexa changed to ON
    then
        val actions = getActions("volvooncall", "volvooncall:vehicle:YV*************")
        if(actions===null) {
            logWarn("VOC", "Actions not Found")
            return
        }
        else {
        logWarn("Volvo", "VOC - Actions")
        actions.preclimatizationStartCommand()
        }
        Volvo_Standheizung_Alexa.sendCommand(OFF)
end

The only thing is, that I can start the Preclimatization but cannot stop it. I assume I still have to modify the code a bit here for a correct stop command.

Have you tried similar to preclimatizationStartCommand from above to preclimatizationStopCommand()? I.e. in an action/rule setting?

Also I believe there is an ongoing PR to enable preclimatization as a switch item:

Yes, I have tried it with the preclimatizationStopCommand() but it doesnā€™t work. It is not a drama for me, as Iā€™m happy that I can at least start the heater :slight_smile: Being able also to stop it would be great but thatā€™s no problem so far. By the way: by using the starting command preclimatizationStartCommand()without a number in the brackets, the heater will run to its maximum operation time and will then stop automatically, correct?

I havenĀ“t used the preclimatizationStopCommand() either, as the preclimatizationStartCommand() will run similar as if you were to run ā€œHeat Startā€ from VOC App. Meaning, as you say, the heater will only run to its maximum operation time. Also, the heat commands will not queue if you were to give the command more than once, as this will only generate an immediate error response from the Volvo API itself (if an existing command is ongoing), and the additional command will be cancelled.

Similar as if you try to run heating from app with too little remaining fuel (at least for my V90 Ā“18 diesel), OH will not force the heater to start. So I havenĀ“t found any real benefits/needs and practical use for the preclimatizationStopCommand()

Thatā€™s correct. With the changes in the PR you can start/stop de preclimatization with a switch in OH.
It also works in combination with the app, FE: start with OH, stop with the app and vice versa.

Hi,
is anyone working on the 2nd review for this pull request?
Thanks in advance.

Iā€™m not sure what the way of working is with PRā€™s in OH.

Can I assign a second reviewer? (I am the creator)
Or is this done by the OH crew from time to time?

Maybe @Kai can answer this?

Dear all,
unfortunately my VOC setup doesnā€™t work anymore. So far it has been working well. Currently I get the following error messages in openhab.log. Does anybody have an idea about the reason and how to solve the problem?

2020-04-24 11:33:45.416 [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:58) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.sendUpdate(ProfileCallbackImpl.java:134) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onStateUpdateFromHandler(SystemDefaultProfile.java:53) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$9(CommunicationManager.java:467) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$11(CommunicationManager.java:487) ~[?:?]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_232]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.handleCallFromHandler(CommunicationManager.java:483) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.CommunicationManager.stateUpdated(CommunicationManager.java:465) ~[?:?]
        at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.stateUpdated(ThingManagerImpl.java:168) ~[?:?]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateState(BaseThingHandler.java:245) ~[?:?]
        at org.openhab.binding.volvooncall.internal.handler.VehicleHandler.lambda$6(VehicleHandler.java:164) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_232]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_232]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_232]
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_232]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_232]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_232]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0_232]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0_232]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_232]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_232]
        at org.openhab.binding.volvooncall.internal.handler.VehicleHandler.queryApiAndUpdateChannels(VehicleHandler.java:161) ~[?:?]
        at org.openhab.binding.volvooncall.internal.handler.VehicleHandler.handleCommand(VehicleHandler.java:211) ~[?:?]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:191) ~[?:?]
        at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:267) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_232]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

Just to mention: Same behaviour than @jensilein since a while.

Good evening everyone,

Iā€™m having trouble understanding the other # carEvent function ā€¦
When I test from Postman, I cannot access this resource.
I am developing a script for recording intermediate GPS coordinates in order to plot the routes on a Leaflet map.
At the beginning I based myself on EngineRunning but it is inoperative ā€¦
The notion of trigger would be saving for me.

Thanks for your help.

Bruce

Edit : VolvoOnCall - Bindings | openHAB