rule "Lock / Unlock Car"
when
Item CarLocked received command
then
if(receivedCommand == ON) {
CarLock.sendCommand(ON)
logInfo("car.rules", "Car: Locked")
}
else if(receivedCommand == OFF) {
// NOTE: This just unlocks invisibly the trunk - when opening the trunk, the vehicle will be completely unlocked.
CarUnlock.sendCommand(ON)
logInfo("car.rules", "Car: unlocked")
sendTelegram("OH_TeleBot", "Heckklappe wurde entriegelt.\nDurch Ćffnen komplett entriegelbar.")
}
end
After a while I see the following in the logs:
2018-10-04 10:19:03.095 [vent.ItemStateChangedEvent] - CarLocked changed from ON to OFF
2018-10-04 10:19:03.272 [vent.ItemStateChangedEvent] - CarLock changed from ON to NULL
So it seems that the CarLocked channel resets the state according to the lock status of the car (which is alright).
But at the same time the ālockā item goes to NULL.
Is this on purpose?
Just a comment: if thatās coming from the binding, like in the case of a communication error or suchlike, it really ought to be setting the state to UNDEF rather than NULL
I actually donāt know where this comes from. @glhopital: I guess you know,
Definitely is does not come from my rules, so I assume from the binding.
As the Lock Channel is to send the lock command into the binding only, I assume that itās reset after a specific time to NULL within the bindingā¦
@NCO : these ālockā and āunlockā channel does not exist anymore since I introduced actions. Reason why they switch back to NULL is because they are not found in the channel list.
The latest one is available as a PR, including binding and actions. Youāll have to use experimental rules engine to use actions as earlier discussed.
In fact, the binding itself it - I think- ready, or nearly ready. We miss documentation, but what bothers me is that it includes an action package for the new rule engine and I think I must have @Kai advice on this.
Is this about https://github.com/openhab/openhab2-addons/pull/3740? Looking at the PR, seeing it is still marked WIP, I fear this wonāt make it in the 2.4 release - for this, it should have ideally been finalised this weekend. But letās plan it as a first candidate for 2.5!
Running the version above I found this (maybe itās not relevant anymore with a newer version).
2018-12-12 08:00:43.639 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
at org.openhab.binding.volvooncall.internal.wrapper.VehiclePositionWrapper.getPosition(VehiclePositionWrapper.java:47) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.getValue(VehicleHandler.java:259) ~[?:?]
at org.openhab.binding.volvooncall.handler.VehicleHandler.lambda$5(VehicleHandler.java:131) ~[?:?]
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:130) ~[?:?]
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) [?:?]
According to the VOLVO hotline, they had issues with the VOC services - so this might be related.
However, after VOC services were up and running again, the positioning of the VOC binding did not catch up the actual position.
Running the python script by molobrakos did return the correct position.