Ewelink / Sonoff Binding - New binding without flashing

Hi @delid4ve, switches dont work, they dont change anything on the switch, I dont hear the click on turning on and off. I tried both mainSwitch and Switch, both as well.
But if I press the button on the TH16R2, and refresh page on Openhab, it shows that both switch and mainswitch change state to ON. If I press again the button to turn off, Openhab follows to turn off. So there’s an issue on giving it the command i assume.

Dave , Boris hi
Thanks to Dave my Sonoff DW2 wifi is running ok. I need to see the voltage. Did you manage to link the voltage item to the channel and see it? I created the link using an existing item , but I see NULL . I do not know if I have to use JSONPATH to see the voltage . If yes does anyone know how to do it?
Thanks
Dimitri

Mode?
Logs?
Need more info than ‘they don’t work’ :+1:

Uiid?

Will get latest version as above up tomorrow. Got couple bits I wanna do before I compile still.

Yay !! Everything now works as expected. Thank you so much @delid4ve. The last build nailed my problems. Finally, joy for me now :smile:

Yep, here you go. I first turned on and off a working one (the DUALR2), and then tried on mainSwitch and Switch on the TH16R2. here are the logs:

15:26:33.997 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000c18c71
15:26:33.999 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000c19f18
15:26:34.000 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000ba43e9
15:26:34.000 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Processing update for 1000ba43e9
15:26:34.001 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Updating connection Status for 1000ba43e9
15:26:34.002 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Completed update for 1000ba43e9
15:26:34.003 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000bfd602
15:26:34.004 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000aed035
15:26:39.033 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
15:26:39.075 [DEBUG] [sonoff.internal.connections.Websocket] - Websocket Sending Message:ping
15:26:39.159 [DEBUG] [sonoff.internal.connections.Websocket] - Pong Response received
15:27:05.092 [DEBUG] [noff.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"switches":[{"switch":"on","outlet":1}]}
15:27:05.094 [DEBUG] [ff.internal.messaging.MessageProvider] - Message Type added: 1616153225094 - switches
15:27:05.095 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sending message via LAN
15:27:05.096 [DEBUG] [nding.sonoff.internal.connections.Lan] - Send LAN Update to http://192.168.1.123:8081/zeroconf/switches with unencrypted payload:{"switches":[{"switch":"on","outlet":1}]}
15:27:05.231 [DEBUG] [nding.sonoff.internal.connections.Lan] - Lan response received: {"seq":226,"sequence":"1616153225094","error":0}
15:27:05.253 [DEBUG] [ff.internal.messaging.MessageProvider] - Lan event received from 192.168.1.123
15:27:05.256 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000ba43e9
15:27:05.257 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Processing update for 1000ba43e9
15:27:05.259 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Updating connection Status for 1000ba43e9
15:27:05.261 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Completed update for 1000ba43e9
15:27:05.335 [DEBUG] [ff.internal.messaging.MessageProvider] - Websocket received message: {"action":"update","deviceid":"1000ba43e9","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","userAgent":"device","sequence":"1616153225094","params":{"switches":[{"switch":"off","outlet":0},{"switch":"on","outlet":1},{"switch":"off","outlet":2},{"switch":"off","outlet":3}]},"from":"device","seq":"226"}
15:27:05.337 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000ba43e9
15:27:05.340 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Processing update for 1000ba43e9
15:27:05.342 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Updating connection Status for 1000ba43e9
15:27:05.344 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Completed update for 1000ba43e9
15:27:10.952 [DEBUG] [noff.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"switches":[{"switch":"off","outlet":1}]}
15:27:10.953 [DEBUG] [ff.internal.messaging.MessageProvider] - Message Type added: 1616153230953 - switches
15:27:10.954 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sending message via LAN
15:27:10.955 [DEBUG] [nding.sonoff.internal.connections.Lan] - Send LAN Update to http://192.168.1.123:8081/zeroconf/switches with unencrypted payload:{"switches":[{"switch":"off","outlet":1}]}
15:27:11.071 [DEBUG] [nding.sonoff.internal.connections.Lan] - Lan response received: {"seq":227,"sequence":"1616153230953","error":0}
15:27:11.091 [DEBUG] [ff.internal.messaging.MessageProvider] - Lan event received from 192.168.1.123
15:27:11.093 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000ba43e9
15:27:11.095 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Processing update for 1000ba43e9
15:27:11.097 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Updating connection Status for 1000ba43e9
15:27:11.099 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Completed update for 1000ba43e9
15:27:11.175 [DEBUG] [ff.internal.messaging.MessageProvider] - Websocket received message: {"action":"update","deviceid":"1000ba43e9","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","userAgent":"device","sequence":"1616153230953","params":{"switches":[{"switch":"off","outlet":0},{"switch":"off","outlet":1},{"switch":"off","outlet":2},{"switch":"off","outlet":3}]},"from":"device","seq":"227"}
15:27:11.176 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000ba43e9
15:27:11.177 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Processing update for 1000ba43e9
15:27:11.179 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Updating connection Status for 1000ba43e9
15:27:11.181 [DEBUG] [ding.sonoff.internal.handler.Handler2] - Completed update for 1000ba43e9
15:27:16.307 [DEBUG] [noff.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"mainSwitch":"on"}
15:27:16.308 [DEBUG] [ff.internal.messaging.MessageProvider] - Message Type added: 1616153236308 - mainSwitch
15:27:16.309 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sending message via Cloud
15:27:16.310 [DEBUG] [sonoff.internal.connections.Websocket] - Websocket Sending Message:{"action":"update","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","userAgent":"app","sequence":1616153236308,"params":{"mainSwitch":"on"},"deviceid":"1000aed035","tempRec":""}
15:27:16.571 [DEBUG] [ff.internal.messaging.MessageProvider] - Lan event received from 192.168.1.106
15:27:16.572 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000aed035
15:27:16.651 [DEBUG] [ff.internal.messaging.MessageProvider] - Websocket received message: {"error":0,"deviceid":"1000aed035","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","sequence":"1616153236308"}
15:27:16.652 [DEBUG] [ff.internal.messaging.MessageProvider] - Websocket response is not handled for type: mainSwitch, message: {"error":0,"deviceid":"1000aed035","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","sequence":"1616153236308"}
15:27:16.656 [ERROR] [ff.internal.messaging.MessageProvider] - Websocket message didnt have any content
15:27:19.660 [DEBUG] [noff.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"mainSwitch":"off"}
15:27:19.661 [DEBUG] [ff.internal.messaging.MessageProvider] - Message Type added: 1616153239661 - mainSwitch
15:27:19.661 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sending message via Cloud
15:27:19.662 [DEBUG] [sonoff.internal.connections.Websocket] - Websocket Sending Message:{"action":"update","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","userAgent":"app","sequence":1616153239661,"params":{"mainSwitch":"off"},"deviceid":"1000aed035","tempRec":""}
15:27:19.902 [DEBUG] [ff.internal.messaging.MessageProvider] - Lan event received from 192.168.1.106
15:27:19.904 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1000aed035
15:27:19.982 [DEBUG] [ff.internal.messaging.MessageProvider] - Websocket received message: {"error":0,"deviceid":"1000aed035","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","sequence":"1616153239661"}
15:27:19.984 [DEBUG] [ff.internal.messaging.MessageProvider] - Websocket response is not handled for type: mainSwitch, message: {"error":0,"deviceid":"1000aed035","apikey":"ac1d2c64-7e8f-41d6-b857-d51133d1c4e4","sequence":"1616153239661"}
15:27:19.985 [ERROR] [ff.internal.messaging.MessageProvider] - Websocket message didnt have any content
15:27:26.316 [DEBUG] [noff.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"switch":"on"}
15:27:26.318 [DEBUG] [ff.internal.messaging.MessageProvider] - Message Type added: 1616153246318 - switch
15:27:26.319 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sending message via LAN
15:27:26.320 [DEBUG] [nding.sonoff.internal.connections.Lan] - Send LAN Update to http://192.168.1.106:8081/zeroconf/switch with unencrypted payload:{"switch":"on"}
15:27:26.350 [DEBUG] [nding.sonoff.internal.connections.Lan] - Lan response received: {"seq":1411,"sequence":"1616153246318","error":422}
15:27:30.062 [DEBUG] [noff.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"switch":"off"}
15:27:30.064 [DEBUG] [ff.internal.messaging.MessageProvider] - Message Type added: 1616153250064 - switch
15:27:30.065 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sending message via LAN
15:27:30.065 [DEBUG] [nding.sonoff.internal.connections.Lan] - Send LAN Update to http://192.168.1.106:8081/zeroconf/switch with unencrypted payload:{"switch":"off"}
15:27:30.087 [DEBUG] [nding.sonoff.internal.connections.Lan] - Lan response received: {"seq":1411,"sequence":"1616153250064","error":422}
15:27:33.579 [DEBUG] [nding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"OU3Mchu1","ts":1616153253579,"version":8}

This seems to have somethign to do with Local vs Cloud mode. When I’m in Local mode, the TH16R2 gets offline. It seems it does not support LAN mode.

New Version:

Sorry @tizen completely missed this…hmm so seems ive overlooked lan mode when changing to the cache method. So discovery isnt going to work (atm)
Could you add in normal mode via the app first create the cache file. then change your device to lan mode and add it manually.
Let me know the result, and if it works can you send me some trace logs so i can see the lan responses.

@DimitriR ive just fixed battery channel, will post up shortly

here you go @DimitriR (youll probably have to remove the device and re-add as the channel is now called battery not batteryVoltage).
2.5: https://github.com/delid4ve/SonoffJars/blob/main/org.openhab.binding.sonoff-2.5.13-SNAPSHOT_v2.1r15.jar
3.x: https://github.com/delid4ve/SonoffJars/blob/main/org.openhab.binding.sonoff-3.1.0-SNAPSHOT_v2.1r15.jar

Hi @delid4ve, In “Things” window, Channels tab, when expanding Humidity (item linked already), I see “Err” and the log shows this:

18:40:06.609 [WARN ] [se.internal.SseItemStatesEventBuilder] - Exception while formatting value '37' of item KidsSensor_Humidity with format '%.1f %RH': Conversion = 'R' 

And temperature reads -244.9 degrees centigrade.

and the Switch is still giving an error as it seems it’s trying the LAN mode rather than Cloud mode:

18:42:54.432 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'KidsSensor_Switch' received command ON
18:42:54.434 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'KidsSensor_Switch' predicted to become ON                                              
18:42:54.439 [DEBUG] [noff.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"switch":"on"}
18:42:54.441 [DEBUG] [ff.internal.messaging.MessageProvider] - Message Type added: 1616164974441 - switch
18:42:54.442 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sending message via LAN
18:42:54.440 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'KidsSensor_Switch' changed from OFF to ON
18:42:54.443 [DEBUG] [nding.sonoff.internal.connections.Lan] - Send LAN Update to http://192.168.1.106:8081/zeroconf/switch with unencrypted payload:{"switch":"on"}
18:42:54.630 [DEBUG] [nding.sonoff.internal.connections.Lan] - Lan response received: {"seq":1421,"sequence":"1616164974441","error":422}

2.5.x:SonoffJars/org.openhab.binding.sonoff-2.5.13-SNAPSHOT_v2.1r17.jar at main · delid4ve/SonoffJars · GitHub
3.x:SonoffJars/org.openhab.binding.sonoff-3.1.0-SNAPSHOT_v2.1r17.jar at main · delid4ve/SonoffJars · GitHub

above updated to r17

Dave and Emre hi. First for Dave my DW2 works very well.
A last question (I hope) I try to display the battery voltage info which I see in the **log 2.813 but I selelct in the channel link **
JSONPATH:$.DoorTrap1.battery and format %.3f and as you see in the log below it cannot transform. I tried all sorts of device names DoorTrap1 , DeviceID , even the channel-linik name with no success.
I know I am distracting you from the main subject but probably someone or you can advise on how to format . Thank
Dimitri

openhab> log:tail
23:30:48.439 [DEBUG] [onoff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
23:30:51.574 [DEBUG] [sonoff.internal.connections.Websocket] - Websocket Sending Message:ping
23:30:51.581 [DEBUG] [nding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"zmsJ4ApQ","ts":1616189451581,"version":8}
23:30:51.658 [DEBUG] [sonoff.internal.connections.Websocket] - Pong Response received
23:30:51.805 [DEBUG] [nding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"DoorTrap1","deviceid":"1001038d41","apikey":"92cdd98d-13a3-4578-8e01-839a747dfc95","extra":{"uiid":102,"description":"20201022001","brandId":"5c4c1aee3a7d24c7100be054","apmac":"d0:27:02:07:17:d3","mac":"d0:27:02:07:17:d2","ui":"WiFi门磁","modelInfo":"5e1541388ceaa2dd27be4af4","model":"OPL-DMA-GL","manufacturer":"深圳松诺技术有限公司"},"brandName":"SONOFF","brandLogo":"https://eu-ota.coolkit.cc/logo/q62PevoglDNmwUJ9oPE7kRrpt1nL1CoA.png","showBrand":true,"productModel":"DW2-Wi-Fi","devConfig":{"lowVolAlarm":2.6},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1,"wxAlarmNotify":0,"wxOpsNotify":0,"wxDoorbellNotify":0,"appDoorbellNotify":1,"doorOnNotify":1,"doorOffNotify":1},"devGroups":[],"family":{"familyid":"603aa822a2965000071f8c52","index":0,"roomid":"603aa822a2965000071f8c4f"},"shareTo":[],"devicekey":"bb148e58-4ca6-43c1-82ae-730ee32fc75d","online":false,"params":{"bindInfos":{},"switch":"off","battery":2.813,"fwVersion":"1000.2.924","type":4,"chipID":"d027020717d2","mac":"d027020717d2","rssi":-92,"lastUpdateTime":"2021-03-19T21:20:36.191Z","actionTime":"2021-03-19T20:36:07.779Z"},"denyFeatures":["sceneClick"]},"index":0}],"total":1}}
23:30:51.826 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1001038d41
23:30:51.844 [WARN ] [rofiles.JSonPathTransformationProfile] - Could not transform state '2 V' with function '$.MainEntranceDoorTrap1_Voltage.battery' and format '%.3f Volts'

Where are you trying to transform it?
The battery voltage is as follows:

QuantityType<ElectricPotential>

with unit type as VOLT

See here for conversion help:

Without any transformation or custom unit does your 2.813 display correctly? I may not have put enough decimal places so will check tomorrow

2.5: SonoffJars/org.openhab.binding.sonoff-2.5.13-SNAPSHOT_v2.1r18.jar at main · delid4ve/SonoffJars · GitHub
3.1: SonoffJars/org.openhab.binding.sonoff-3.1.0-SNAPSHOT_2.1r18.jar at main · delid4ve/SonoffJars · GitHub

battery fix

Updated the latest r18 bindings, S26 works fine but 1ch basic got the following error:

2021-03-20 15:06:12.428 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'sonoff:1:f25abd857d:8ef70e99da': class org.openhab.binding.sonoff.internal.states.StateUnknown cannot be cast to class org.openhab.binding.sonoff.internal.states.State1 (org.openhab.binding.sonoff.internal.states.StateUnknown and org.openhab.binding.sonoff.internal.states.State1 are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @1198b01)

java.lang.ClassCastException: class org.openhab.binding.sonoff.internal.states.StateUnknown cannot be cast to class org.openhab.binding.sonoff.internal.states.State1 (org.openhab.binding.sonoff.internal.states.StateUnknown and org.openhab.binding.sonoff.internal.states.State1 are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @1198b01)

	at org.openhab.binding.sonoff.internal.handler.Handler1.updateDevice(Handler1.java:1) ~[?:?]

	at org.openhab.binding.sonoff.internal.handler.HandlerBaseDual.initialize(HandlerBaseDual.java:82) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor107.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:834) [?:?]

@phui can you try deleting your thing and the file that relates to it under userdata/Sonoff , running discovery and then re-adding. Just want to check it’s not a hangover before I dive in

Dave hi,
1.I created thing named : DoorTrap1
2. Went to channels of this thing …it shows all channels i.e. switch , Battery Level (which is a number…) …etc etc,…
3.Selected Battery Level channel because I want to display battery voltage
and created the link , but it displays 2 for the Battery Level instead of 2.813 Volts (which I see in the log)
4.In order to see the voltage (number) with 3 decimals , under profile ,I selected JSONPATH instead of no profile
5. I enter in JSONPATH formatter the following : $.DoorTrap1.battery …as it appears on the log above. i.e. device = DoorTrap1, battery and in State formatter = %.3f Volts
6. I save the link , but it seems the format is not working. In the attached jpg

shows 2 instead 2.813 Volts
I must be missing something elementary !!!
Thanks
Dimitri

@DimitriR Can you try deleting the thing and then clearing the cache.
The channel was changed from Number to Number:ElectricPotential
There was an error in that it was fetching the value as an integer but that’s changed now to a double so should work

Try delete all things including the account things. then delete the 2 txt file in userdata/sonoff
re-add the a/c things, then scan… S26 discovered successfully but not the 1 ch basic
Try manual add the 1 ch basic and got the following error again:

2021-03-20 17:55:28.506 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'sonoff:1:41110fc1cf': class org.openhab.binding.sonoff.internal.states.StateUnknown cannot be cast to class org.openhab.binding.sonoff.internal.states.State1 (org.openhab.binding.sonoff.internal.states.StateUnknown and org.openhab.binding.sonoff.internal.states.State1 are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @1198b01)

java.lang.ClassCastException: class org.openhab.binding.sonoff.internal.states.StateUnknown cannot be cast to class org.openhab.binding.sonoff.internal.states.State1 (org.openhab.binding.sonoff.internal.states.StateUnknown and org.openhab.binding.sonoff.internal.states.State1 are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @1198b01)

	at org.openhab.binding.sonoff.internal.handler.Handler1.updateDevice(Handler1.java:1) ~[?:?]

	at org.openhab.binding.sonoff.internal.handler.HandlerBaseDual.initialize(HandlerBaseDual.java:82) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor107.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:834) [?:?]

Thanks in advance.

@phui Can you send me debug log from when you add the binding and also the cache file. Strange… it should be uiid1 but it’s not picking up the correct state for some reason and using a default of unknown. Could also try a cache clear

Dave hi
I upgraded to r17, deleted cache , thing etc , restarted OH3, recreated DoorTrap1 Thing . I kept the account thing. Still Voltage is truncated.
Question ; Do I have to use No profile to see the voltage with 3 decimals ?
or do I have to use JSONPATH profile which I have tried too but I am not sure if the info I enter in the JSONPATH expression and state formatter to %.3f Volts
As you can see in the log below the battery voltage is now 2.8.instead 2.813
and the warning message shows it cannot transform state.
What function do I need to use ? What am I doing wrong ? Thanks
Dimitri

{},"switch":"on","battery":2.8,"fwVersion":"1000.2.924","type":2,"chipID":"d027020717d2","mac":"d027020717d2","rssi":-89,"lastUpdateTime":"2021-03-20T13:10:39.804Z","actionTime":"2021-03-20T13:10:39.804Z"},"denyFeatures":["sceneClick"]},"index":0}],"total":1}}
15:11:11.223 [DEBUG] [ff.internal.messaging.MessageProvider] - Forwarding state to 1001038d41
15:11:11.229 [WARN ] [rofiles.JSonPathTransformationProfile] - Could not transform state '2 V' with function '$.battery' and format '%.3f Volts'