[SOLVED] Help with sending Command

Does this mean, that I can just sendCommand(ON) to my item below to lock the car?
(I have installed the org.openhab.action.volvooncall-2.4.0-SNAPSHOT as well)

Switch CarLocked "Pulpo Verriegelung [%s]" {channel="volvooncall:vehicle:xxxxxxxxx:doors#carLocked"}

Action are intended to be used with the new rule engine. So you’ll find menu entries in NRE related to Volvo on call

I can not find an action to start Heater.

/Mike

It’s possible a stupid question, but what is NRE? :open_mouth:

Next-Gen Rule Engine

Thanks, @tnemrap,

Because I am fine with text based rules, I would prefer to use those for starting the heater (among other stuff).
I have tried a sendCommand accordingly on the heater channel:

Switch CarHeater			"Standheizung [%s]"					        (G_jdbc)        {channel="volvooncall:vehicle:xxxxx:remoteHeater"}

but nothing happens.

So, how to arrange the action to the heater in regular test based rules?
Maybe it’s simple, but I lost sight of the woods for the trees


@NCO I agree with you and also prefer that solution.

But even in NRE i cat not find any command for heater

/Mike

Thanks for your response.
Did you install org.openhab.action.volvooncall-2.4.0-SNAPSHOT.jar?
I missed that part in the beginning and just installed the org.openhab.binding.volvooncall-2.4.0-SNAPSHOT.jar

Do you see the other VOC commands?

But does that mean it just works the one or the other way?
Or can I somehow also do it with my rules files to trigger the Heater?

I see the same as you and I could not find the heater command.

/Mike

Hmmm
 that’s true.

But the approach of separate rules within Paper UI does not make sense for me anyway.

I just need to figure out how to work with „regular“ sendCommands

I just tried to setup VOC on a 2.4.0 system (VOC Binding ver 2.4.0.201809171434). I could add the API without problem, but when I tried to add the car I got this error:

2018-12-19 00:19:57.148 [ERROR] [g.volvooncall.handler.VehicleHandler] - Exception occurred during execution: java.lang.IllegalStateException: Expected a boolean but was NUMBER at line 1 column 135 path $.position.heading 
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a boolean but was NUMBER at line 1 column 135 path $.position.heading

/Martin

OH is complaining that you have setup heading as a number, but it’s actually a switch.
I never got anything back from this switch (like ON if I am driving), so I have removed this channel completely.
However, that might be a local regulation within Europe for my case !? (Germany)

I do not think sending a command to a status channel is the proper way to do it (while it’s the OH1 way of working in many bundles). You can create a rule with NRE and trigger this rule based on any or switch change value. But, you’re right, NRE actions should have their rule DSL counterpart. If I’ve got time I’ll do this.
As I am on it, I’ll add heater start action but will not be able to test it properly, my car does not support it.

Sorry, Gael.
I don’t want to be pushy - I thought the “regular” text based rule stuff is more like a general OH thing and would not require actions from you.

Anyway, if you have something to test with the heater, just let me know and I will support.

I guess that in order to remove the position#heading channel, I need to set everything up with text files instead of autodiscovery. Is there an example somewhere how that should look (definition of Bridge/Things)?

Hi Martin,

I have everything set up in text files.
However, if you set up all your stuff in PaperUI, you don’t need to change this.

I just did not link the channel to any item - thats all and looks like this in red.
Actually i juste recognized that I still have heading linked - changed that :slight_smile:

grafik

Thanks for your help!

The issue for me is that I have not linked any items yet for the vehicle thing, so all channels are “empty”, i.e. like the Calculated Location on your screenshot. So I would guess that the error occurs before the linking to the item is done.

If you define the thing/channels in text files I would assume that it’s possible to remove the position#heading, but when it’s autodiscovered that does not work. So if you have any example on the text files I’d be very grateful.

The definition of the Things file seems to differ between different bindings. I had change all my MQTT stuff now with 2.4 and they had a bit of different format for Things than other bindings. The only way seems to be to look at the examples for the different bindings


Here are sample things / item definitions files

voc.things

Bridge volvooncall:vocapi:glh "VoC Gaël" @ "System" [username="mail@exmple.com", password="mysuperpassword"]
{
    Thing vehicle XC60 "XC60" @ "World" [vin="ddssddsds", refreshinterval=5]
}

voc.items


Group gVoc "Volvo On Call" <volvo> (gBindings, gOutside)

Group:Contact:OR(OPEN,CLOSED) gDoorsOpening "Portes"    <car_door>  (gVoc)
Contact Voc_DoorsTailgate           "Tailgate"                              (gDoorsOpening)         {channel="volvooncall:vehicle:glh:XC60:doors#tailgate"}
Contact Voc_DoorsRearRight          "Rear right"                            (gDoorsOpening)         {channel="volvooncall:vehicle:glh:XC60:doors#rearRight"}
Contact Voc_DoorsRearLeft           "Rear Left"                             (gDoorsOpening)         {channel="volvooncall:vehicle:glh:XC60:doors#rearLeft"}
Contact Voc_DoorsFrontRight         "Passager"                              (gDoorsOpening)         {channel="volvooncall:vehicle:glh:XC60:doors#frontRight"}
Contact Voc_DoorsFrontLeft          "Conducteur"                            (gDoorsOpening)         {channel="volvooncall:vehicle:glh:XC60:doors#frontLeft"}
Contact Voc_DoorsHood               "Hood"                                  (gDoorsOpening)         {channel="volvooncall:vehicle:glh:XC60:doors#hood"}

Group:Contact:OR(OPEN,CLOSED) gWindowsOpening "FenĂȘtres" <car_window>   (gVoc)
Contact Voc_WindowsRearRightWnd     "Rear right"                            (gWindowsOpening)       {channel="volvooncall:vehicle:glh:XC60:windows#rearRightWnd"}
Contact Voc_WindowsRearLeftWnd      "Rear Left"                             (gWindowsOpening)       {channel="volvooncall:vehicle:glh:XC60:windows#rearLeftWnd"}
Contact Voc_WindowsFrontRightWnd    "Passager"                              (gWindowsOpening)       {channel="volvooncall:vehicle:glh:XC60:windows#frontRightWnd"}
Contact Voc_WindowsFrontLeftWnd     "Conducteur"                            (gWindowsOpening)       {channel="volvooncall:vehicle:glh:XC60:windows#frontLeftWnd"}

Switch Voc_DoorsCarLocked           "Verouillée"                            (gVoc)                  {channel="volvooncall:vehicle:glh:XC60:doors#carLocked"}
Number:Length Voc_Odometer          "Kilométrage [%d %unit%]"               (gVoc, gSensorDist)     {channel="volvooncall:vehicle:glh:XC60:odometer#odometer"}
Number:Dimensionless Voc_FuelLevel  "Fuel Level"                <sewerage>  (gVoc, gSensorBatt)     {channel="volvooncall:vehicle:glh:XC60:tank#fuelLevel"}
Switch Voc_Fuel_Alert               "Niveau Carburant"          <siren>     (gVoc, gBatteryAlarm)   {channel="volvooncall:vehicle:glh:XC60:tank#fuelAlert"}
String Voc_Fluid_Message            "Lave Glace"                <washer>    (gVoc)                  {channel="volvooncall:vehicle:glh:XC60:other#washerFluidLevel"}
Location Voc_Location               "Location"                  <geoloc>    (gVoc)                  {channel="volvooncall:vehicle:glh:XC60:position#location"}
DateTime Voc_Location_LUD           "Timestamp [%1$tH:%1$tM]"   <time>      (gVoc)                  {channel="volvooncall:vehicle:glh:XC60:position#locationTimestamp"}
Switch Voc_Fluid_Alert              "Alerte Lave Glace"         <siren>     (gVoc, gSensorAlarm)

Thanks,

but still the same error with

java.lang.IllegalStateException: Expected a boolean but was NUMBER at line 1 column 135 path $.position.heading`

Maybe the Volvo API differs between countries? I’m in Sweden. Is there some way of removing/excluding that channel without going into the source code?