@Emre7 i would remove the channels/things, then the binding, stop openhab, clear cache.
I have just checked all of the above and all has been fixed in latest version above (r18), r19 just has a new device added. will shortly be publishing r20 tho.
temp is set to celcius
humidity to percent
I cant find any errors in regards to sending the command via cloud.
I’ve done the following test: I switched the sonoff on from the ui (hear the “click”), then pressed the button on the device (I hear the “click” but nothing happens in the ui) and finally switched again the ui to off (no “click” heard this time, so in the end everything is off).
Those are the logs:
2021-03-21 16:00:29.355 [DEBUG] [off.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"switch":"on"}
2021-03-21 16:00:29.358 [DEBUG] [f.internal.messaging.MessageProvider] - Message Type added: 1616338829357 - switch
2021-03-21 16:00:29.370 [DEBUG] [noff.internal.handler.HandlerAccount] - Sending message via LAN
2021-03-21 16:00:29.372 [DEBUG] [ding.sonoff.internal.connections.Lan] - Send LAN Update to http://192.168.1.56:8081/zeroconf/switch with unencrypted payload:{"switch":"on"}
2021-03-21 16:00:29.429 [DEBUG] [ding.sonoff.internal.connections.Lan] - Lan response received: {"seq":39,"sequence":"1616338829357","error":0}
2021-03-21 16:00:29.435 [DEBUG] [f.internal.messaging.MessageProvider] - Lan event received from 192.168.1.56
2021-03-21 16:00:29.440 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:00:29.458 [DEBUG] [f.internal.messaging.MessageProvider] - Websocket received message: {"action":"update","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","userAgent":"device","sequence":"1616338829357","params":{"switch":"on"},"from":"device","seq":"39"}
2021-03-21 16:00:29.461 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:00:32.204 [DEBUG] [f.internal.messaging.MessageProvider] - Lan event received from 192.168.1.56
2021-03-21 16:00:32.209 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:00:32.231 [DEBUG] [f.internal.messaging.MessageProvider] - Websocket received message: {"action":"update","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","userAgent":"device","params":{"switch":"off"},"from":"device","seq":"40"}
2021-03-21 16:00:32.234 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:00:35.394 [DEBUG] [off.internal.handler.HandlerBaseDual] - Sonoff - Command Payload:{"switch":"off"}
2021-03-21 16:00:35.396 [DEBUG] [f.internal.messaging.MessageProvider] - Message Type added: 1616338835396 - switch
2021-03-21 16:00:35.398 [DEBUG] [noff.internal.handler.HandlerAccount] - Sending message via LAN
2021-03-21 16:00:35.400 [DEBUG] [ding.sonoff.internal.connections.Lan] - Send LAN Update to http://192.168.1.56:8081/zeroconf/switch with unencrypted payload:{"switch":"off"}
2021-03-21 16:00:35.474 [DEBUG] [ding.sonoff.internal.connections.Lan] - Lan response received: {"seq":41,"sequence":"1616338835396","error":0}
2021-03-21 16:00:35.488 [DEBUG] [f.internal.messaging.MessageProvider] - Lan event received from 192.168.1.56
2021-03-21 16:00:35.501 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:00:35.508 [DEBUG] [f.internal.messaging.MessageProvider] - Websocket received message: {"action":"update","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","userAgent":"device","sequence":"1616338835396","params":{"switch":"off"},"from":"device","seq":"41"}
2021-03-21 16:00:35.511 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:00:43.727 [DEBUG] [noff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
2021-03-21 16:00:47.548 [DEBUG] [onoff.internal.connections.Websocket] - Websocket Sending Message:ping
2021-03-21 16:00:47.552 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"peqHJidb","ts":1616338847551,"version":8}
2021-03-21 16:00:47.578 [DEBUG] [onoff.internal.connections.Websocket] - Pong Response received
2021-03-21 16:00:47.729 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"Multiuso","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","extra":{"description":"WWJG001162","brandId":"5611402280a0e2630f7b102d","apmac":"d0:27:00:54:4f:cf","mac":"d0:27:00:54:4f:ce","ui":"开关改装模å—","modelInfo":"5655cb0c93991b740423d1ba","model":"ITA-GZ1-GL","manufacturer":"深圳创易智能系统有é™å…¬å¸","uiid":14,"staMac":"DC:4F:22:2A:2E:20","chipid":"002A2E20"},"brandName":"Maker","brandLogo":"","showBrand":true,"productModel":"Sonoff","tags":{"disable_timers":[],"m_6d34_enri":"on"},"devConfig":{},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1},"family":{"familyid":"5ff81d3e04d5cd00080a4d90","index":0},"shareTo":[],"devicekey":"e1167b7c-402a-421d-a97d-bab2b2125708","online":true,"params":{"bindInfos":{"gaction":["3762d06b-dd8c-401a-bea5-2272fc3a6d34_ewelink-google-home-v1"]},"switch":"off","fwVersion":"3.5.0","rssi":-83,"staMac":"DC:4F:22:2A:2E:20","startup":"stay","sledOnline":"on","init":1,"pulse":"off","pulseWidth":500,"timers":[],"version":8,"only_device":{"ota":"success"},"ssid":"Skynet","bssid":"44:4e:6d:dd:9f:15"}},"index":0}],"total":1}}
2021-03-21 16:00:47.732 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:01:43.729 [DEBUG] [noff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
2021-03-21 16:01:47.557 [DEBUG] [onoff.internal.connections.Websocket] - Websocket Sending Message:ping
2021-03-21 16:01:47.561 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"gHzTxFdL","ts":1616338907561,"version":8}
2021-03-21 16:01:47.587 [DEBUG] [onoff.internal.connections.Websocket] - Pong Response received
2021-03-21 16:01:47.687 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"Multiuso","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","extra":{"description":"WWJG001162","brandId":"5611402280a0e2630f7b102d","apmac":"d0:27:00:54:4f:cf","mac":"d0:27:00:54:4f:ce","ui":"开关改装模å—","modelInfo":"5655cb0c93991b740423d1ba","model":"ITA-GZ1-GL","manufacturer":"深圳创易智能系统有é™å…¬å¸","uiid":14,"staMac":"DC:4F:22:2A:2E:20","chipid":"002A2E20"},"brandName":"Maker","brandLogo":"","showBrand":true,"productModel":"Sonoff","tags":{"disable_timers":[],"m_6d34_enri":"on"},"devConfig":{},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1},"family":{"familyid":"5ff81d3e04d5cd00080a4d90","index":0},"shareTo":[],"devicekey":"e1167b7c-402a-421d-a97d-bab2b2125708","online":true,"params":{"bindInfos":{"gaction":["3762d06b-dd8c-401a-bea5-2272fc3a6d34_ewelink-google-home-v1"]},"switch":"off","fwVersion":"3.5.0","rssi":-83,"staMac":"DC:4F:22:2A:2E:20","startup":"stay","sledOnline":"on","init":1,"pulse":"off","pulseWidth":500,"timers":[],"version":8,"only_device":{"ota":"success"},"ssid":"Skynet","bssid":"44:4e:6d:dd:9f:15"}},"index":0}],"total":1}}
2021-03-21 16:01:47.691 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:02:43.731 [DEBUG] [noff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
2021-03-21 16:02:47.566 [DEBUG] [onoff.internal.connections.Websocket] - Websocket Sending Message:ping
2021-03-21 16:02:47.570 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"ZNR660G7","ts":1616338967570,"version":8}
2021-03-21 16:02:47.597 [DEBUG] [onoff.internal.connections.Websocket] - Pong Response received
2021-03-21 16:02:47.710 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"Multiuso","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","extra":{"description":"WWJG001162","brandId":"5611402280a0e2630f7b102d","apmac":"d0:27:00:54:4f:cf","mac":"d0:27:00:54:4f:ce","ui":"开关改装模å—","modelInfo":"5655cb0c93991b740423d1ba","model":"ITA-GZ1-GL","manufacturer":"深圳创易智能系统有é™å…¬å¸","uiid":14,"staMac":"DC:4F:22:2A:2E:20","chipid":"002A2E20"},"brandName":"Maker","brandLogo":"","showBrand":true,"productModel":"Sonoff","tags":{"disable_timers":[],"m_6d34_enri":"on"},"devConfig":{},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1},"family":{"familyid":"5ff81d3e04d5cd00080a4d90","index":0},"shareTo":[],"devicekey":"e1167b7c-402a-421d-a97d-bab2b2125708","online":true,"params":{"bindInfos":{"gaction":["3762d06b-dd8c-401a-bea5-2272fc3a6d34_ewelink-google-home-v1"]},"switch":"off","fwVersion":"3.5.0","rssi":-83,"staMac":"DC:4F:22:2A:2E:20","startup":"stay","sledOnline":"on","init":1,"pulse":"off","pulseWidth":500,"timers":[],"version":8,"only_device":{"ota":"success"},"ssid":"Skynet","bssid":"44:4e:6d:dd:9f:15"}},"index":0}],"total":1}}
2021-03-21 16:02:47.713 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:03:43.734 [DEBUG] [noff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
2021-03-21 16:03:47.575 [DEBUG] [onoff.internal.connections.Websocket] - Websocket Sending Message:ping
2021-03-21 16:03:47.580 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"WtL1OVfQ","ts":1616339027580,"version":8}
2021-03-21 16:03:47.606 [DEBUG] [onoff.internal.connections.Websocket] - Pong Response received
2021-03-21 16:03:47.665 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[],"total":0}}
2021-03-21 16:04:43.736 [DEBUG] [noff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
2021-03-21 16:04:47.586 [DEBUG] [onoff.internal.connections.Websocket] - Websocket Sending Message:ping
2021-03-21 16:04:47.590 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"k1XFHPA5","ts":1616339087589,"version":8}
2021-03-21 16:04:47.615 [DEBUG] [onoff.internal.connections.Websocket] - Pong Response received
2021-03-21 16:04:47.756 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"Multiuso","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","extra":{"description":"WWJG001162","brandId":"5611402280a0e2630f7b102d","apmac":"d0:27:00:54:4f:cf","mac":"d0:27:00:54:4f:ce","ui":"开关改装模å—","modelInfo":"5655cb0c93991b740423d1ba","model":"ITA-GZ1-GL","manufacturer":"深圳创易智能系统有é™å…¬å¸","uiid":14,"staMac":"DC:4F:22:2A:2E:20","chipid":"002A2E20"},"brandName":"Maker","brandLogo":"","showBrand":true,"productModel":"Sonoff","tags":{"disable_timers":[],"m_6d34_enri":"on"},"devConfig":{},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1},"family":{"familyid":"5ff81d3e04d5cd00080a4d90","index":0},"shareTo":[],"devicekey":"e1167b7c-402a-421d-a97d-bab2b2125708","online":true,"params":{"bindInfos":{"gaction":["3762d06b-dd8c-401a-bea5-2272fc3a6d34_ewelink-google-home-v1"]},"switch":"off","fwVersion":"3.5.0","rssi":-83,"staMac":"DC:4F:22:2A:2E:20","startup":"stay","sledOnline":"on","init":1,"pulse":"off","pulseWidth":500,"timers":[],"version":8,"only_device":{"ota":"success"},"ssid":"Skynet","bssid":"44:4e:6d:dd:9f:15"}},"index":0}],"total":1}}
2021-03-21 16:04:47.759 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:05:37.212 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 70016
2021-03-21 16:05:43.738 [DEBUG] [noff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
2021-03-21 16:05:47.595 [DEBUG] [onoff.internal.connections.Websocket] - Websocket Sending Message:ping
2021-03-21 16:05:47.598 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"MIdC539q","ts":1616339147598,"version":8}
2021-03-21 16:05:47.625 [DEBUG] [onoff.internal.connections.Websocket] - Pong Response received
2021-03-21 16:05:47.749 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"Multiuso","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","extra":{"description":"WWJG001162","brandId":"5611402280a0e2630f7b102d","apmac":"d0:27:00:54:4f:cf","mac":"d0:27:00:54:4f:ce","ui":"开关改装模å—","modelInfo":"5655cb0c93991b740423d1ba","model":"ITA-GZ1-GL","manufacturer":"深圳创易智能系统有é™å…¬å¸","uiid":14,"staMac":"DC:4F:22:2A:2E:20","chipid":"002A2E20"},"brandName":"Maker","brandLogo":"","showBrand":true,"productModel":"Sonoff","tags":{"disable_timers":[],"m_6d34_enri":"on"},"devConfig":{},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1},"family":{"familyid":"5ff81d3e04d5cd00080a4d90","index":0},"shareTo":[],"devicekey":"e1167b7c-402a-421d-a97d-bab2b2125708","online":true,"params":{"bindInfos":{"gaction":["3762d06b-dd8c-401a-bea5-2272fc3a6d34_ewelink-google-home-v1"]},"switch":"off","fwVersion":"3.5.0","rssi":-83,"staMac":"DC:4F:22:2A:2E:20","startup":"stay","sledOnline":"on","init":1,"pulse":"off","pulseWidth":500,"timers":[],"version":8,"only_device":{"ota":"success"},"ssid":"Skynet","bssid":"44:4e:6d:dd:9f:15"}},"index":0}],"total":1}}
2021-03-21 16:05:47.752 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
2021-03-21 16:06:43.740 [DEBUG] [noff.internal.handler.HandlerAccount] - Sonoff Connection Check Running
2021-03-21 16:06:47.604 [DEBUG] [onoff.internal.connections.Websocket] - Websocket Sending Message:ping
2021-03-21 16:06:47.608 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Discovery Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"xDxarGSJ","ts":1616339207607,"version":8}
2021-03-21 16:06:47.633 [DEBUG] [onoff.internal.connections.Websocket] - Pong Response received
2021-03-21 16:06:47.744 [DEBUG] [ding.sonoff.internal.connections.Api] - Api Devices response:{"error":0,"msg":"","data":{"thingList":[{"itemType":1,"itemData":{"name":"Multiuso","deviceid":"10002a293f","apikey":"3762d06b-dd8c-401a-bea5-2272fc3a6d34","extra":{"description":"WWJG001162","brandId":"5611402280a0e2630f7b102d","apmac":"d0:27:00:54:4f:cf","mac":"d0:27:00:54:4f:ce","ui":"开关改装模å—","modelInfo":"5655cb0c93991b740423d1ba","model":"ITA-GZ1-GL","manufacturer":"深圳创易智能系统有é™å…¬å¸","uiid":14,"staMac":"DC:4F:22:2A:2E:20","chipid":"002A2E20"},"brandName":"Maker","brandLogo":"","showBrand":true,"productModel":"Sonoff","tags":{"disable_timers":[],"m_6d34_enri":"on"},"devConfig":{},"settings":{"opsNotify":0,"opsHistory":1,"alarmNotify":1},"family":{"familyid":"5ff81d3e04d5cd00080a4d90","index":0},"shareTo":[],"devicekey":"e1167b7c-402a-421d-a97d-bab2b2125708","online":true,"params":{"bindInfos":{"gaction":["3762d06b-dd8c-401a-bea5-2272fc3a6d34_ewelink-google-home-v1"]},"switch":"off","fwVersion":"3.5.0","rssi":-83,"staMac":"DC:4F:22:2A:2E:20","startup":"stay","sledOnline":"on","init":1,"pulse":"off","pulseWidth":500,"timers":[],"version":8,"only_device":{"ota":"success"},"ssid":"Skynet","bssid":"44:4e:6d:dd:9f:15"}},"index":0}],"total":1}}
2021-03-21 16:06:47.748 [DEBUG] [f.internal.messaging.MessageProvider] - Forwarding state to 10002a293f
Deleted account things and both S26 and 1ch basic, deleted .txt file in userdata/sonoff
Updated with r20, scan, both S26 and 1 ch basic discovered and added smoothly.
Thanks Dave !!
consumption: if your running in cloud or mixed mode this will retrieve the consumption channels (5 in total) (kWh)
local: if your running in local only mode current/power/voltage are not sent from the device - just switching. This will retrieve the extra data at whatever intervals you want. If your in mixed or cloud you don’t need this
Hi Dave I just deleted my account thing, and my 2 devices to start again with your new code. Unfortunately this one is not even allowing an account to be added, please see logs below:
2021-03-27 12:29:26.384 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.sonoff.internal.handlers.HandlerAccount@42b018': null
java.lang.NullPointerException: null
at org.openhab.binding.sonoff.internal.states.StateProvider.getStateType(StateProvider.java:89) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setState(StateProvider.java:81) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setStates(StateProvider.java:61) ~[?:?]
at org.openhab.binding.sonoff.internal.handlers.HandlerAccount.initialize(HandlerAccount.java:98) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor45.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) [?:?]
2021-03-27 12:29:26.403 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'sonoff:account:fad0e9be48': null
java.lang.NullPointerException: null
at org.openhab.binding.sonoff.internal.states.StateProvider.getStateType(StateProvider.java:89) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setState(StateProvider.java:81) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setStates(StateProvider.java:61) ~[?:?]
at org.openhab.binding.sonoff.internal.handlers.HandlerAccount.initialize(HandlerAccount.java:98) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor45.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) [?:?]
I did the cache clear from the console, and same issue. Is there a different way to clear the cache other than stopping the service then doing the sudo console-cli clean-cache?
2021-03-27 13:31:05.141 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.sonoff.internal.handlers.HandlerAccount@13affcd': null
java.lang.NullPointerException: null
at org.openhab.binding.sonoff.internal.states.StateProvider.getStateType(StateProvider.java:89) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setState(StateProvider.java:81) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setStates(StateProvider.java:61) ~[?:?]
at org.openhab.binding.sonoff.internal.handlers.HandlerAccount.initialize(HandlerAccount.java:98) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor43.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) [?:?]
2021-03-27 13:31:05.159 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'sonoff:account:1b926125f9': null
java.lang.NullPointerException: null
at org.openhab.binding.sonoff.internal.states.StateProvider.getStateType(StateProvider.java:89) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setState(StateProvider.java:81) ~[?:?]
at org.openhab.binding.sonoff.internal.states.StateProvider.setStates(StateProvider.java:61) ~[?:?]
at org.openhab.binding.sonoff.internal.handlers.HandlerAccount.initialize(HandlerAccount.java:98) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor43.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) [?:?]
Yes deleting that text file with the device ID worked from the /var/lib/openhab/sonoff folder. Did another reboot of the server after that, and account added properly, and all devices added instantly with a single scan.
Thanks for all your comments and findings.
Concerning the DW2 Wifi, what mode is required now?
I am asking cause I’m concerned running in cloud mode when it means China is always listening or do I get it wrong?
And where will I get the description how to set the binding up, is it provided in the binding description in openhab?
I was wondering: would the binding work also with “compatible” sonoff devices?
E.G. I found on Amazon some items sold as compatible with the EweLink app:
My guess would be that it should, but if I understood correctly each new item needs to be “coded” into the binding and then a new version has to be released, right?