Ewelink / Sonoff Binding - New binding without flashing

Since yesterday the cloud connection doesn’t work anymore:
COMMUNICATION_ERROR
Cloud Offline

Is anybody else experiencing the same?

EDIT: it just solved by itself, probably was an issue with ewelink servers

For me, it just works perfectly! :slight_smile:

Thank you so much.

Binding installed, no issues, found my single basic switch, again no issues, however the device remains offline.

2022-05-18 09:41:36.947 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sonoff:14:5172e109fe:10003215cf' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2022-05-18 09:41:40.724 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sonoff:14:5172e109fe:10003215cf' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2022-05-18 09:41:40.735 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sonoff:14:5172e109fe:10003215cf' changed from INITIALIZING to OFFLINE ```

I dont appear to be able to change the logging level
openhab> log:set TRACE  org.openhab.binding.sonoff
Error executing command: Unable to set level for logger

Any tips please?

Initializing handler for thing ‘sonoff:account:49006d9d86’ takes more than 5000ms.

Version: 3.2.0 (Build)
org.openhab.binding.sonoff-3.2.0-SNAPSHOT_2.5R10.jar

very high CPU usage of whole openhab java instance


2022-05-31 13:56:40.615 [INFO ] [nternal.handler.SonoffAccountHandler] - Sonoff Access Mode set to: mixed
2022-05-31 13:56:45.629 [WARN ] [core.thing.internal.ThingManagerImpl] - Initializing handler for thing 'sonoff:account:49006d9d86' takes more than 5000ms.
2022-05-31 13:57:28.890 [ERROR] [connection.SonoffWebSocketConnection] - Websocket Closed, Status Code: 1006, Reason:Disconnected
2022-05-31 13:58:31.214 [ERROR] [connection.SonoffWebSocketConnection] - Websocket Closed, Status Code: 1006, Reason:Disconnected
2022-05-31 13:59:33.814 [ERROR] [connection.SonoffWebSocketConnection] - Websocket Closed, Status Code: 1006, Reason:Disconnected

any ideas?

Hi.

Thank you for this binding. It works great with openhab 3.2.
Can it be released for openhab 3.3 too ?

Regards.

Hi,I see issues with logging in, because cannot get where to change the country code, and default “+1” is used. Could you please assist? Installed binding as a jar into /addons folder.

{“error”:407,“msg”:“appid is unauthorized! oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq”,“data”:null}

Want to use it with my wifi pump for balcony plants (FW Name in Sonos app: PDF-B04-GL)

Is there a plan to sometime release this as an official binding?
Recently it stopped responding and does not work for me anymore. I did no change in the account and devices connected. The eWelink app responds normally to the devices. Only OH3.2 jar stopped responding.

I experience the same issue since yesterday. The openhab “Sonoff account thing” gets stuck in “INITIALIZING” state. checked with OH 3.2, 3.3

Same problem here. Didn’t change anything, Ewelink app working without any problem, but the OH3 binding stopped functioning.

Same connection problem here:

2022-07-07 19:59:43.115 [ERROR] [unication.SonoffCommunicationManager] - Cannot send command uiActive, all connections are offline for deviceid 1000fe4aaa
2022-07-07 19:59:44.124 [WARN ] [unication.SonoffCommunicationManager] - Ok message not received for transaction: 1657216783115, command was uiActive, retrying again. Retry count 2
2022-07-07 19:59:44.229 [ERROR] [unication.SonoffCommunicationManager] - Cannot send command uiActive, all connections are offline for deviceid 1000fe4aaa
2022-07-07 19:59:45.231 [WARN ] [unication.SonoffCommunicationManager] - Ok message not received for transaction: 1657216783115, command was uiActive, retrying again. Retry count 3
2022-07-07 19:59:45.334 [ERROR] [unication.SonoffCommunicationManager] - Cannot send command uiActive, all connections are offline for deviceid 1000fe4aaa
2022-07-07 19:59:46.336 [WARN ] [unication.SonoffCommunicationManager] - Unable to send transaction 1657216783115, command was uiActive, after 3 retry attempts
2022-07-07 19:59:46.438 [ERROR] [unication.SonoffCommunicationManager] - Cannot send command uiActive, all connections are offline for deviceid 100107e752
2022-07-07 19:59:47.440 [WARN ] [unication.SonoffCommunicationManager] - Unable to send transaction 1657216783115, command was uiActive, after 3 retry attempts

Same here… Debug log:

2022-07-08 12:38:50.365 [DEBUG] [nternal.handler.SonoffAccountHandler] - Running Activation task
2022-07-08 12:38:50.366 [DEBUG] [unication.SonoffCommunicationManager] - Added a message to the queue
2022-07-08 12:38:50.366 [ERROR] [unication.SonoffCommunicationManager] - Cannot send command uiActive, all connections are offline for deviceid 100149xxxx
2022-07-08 12:38:51.372 [WARN ] [unication.SonoffCommunicationManager] - Ok message not received for transaction: 1657258730366, command was uiActive, retrying again. Retry count 2
2022-07-08 12:38:51.473 [DEBUG] [unication.SonoffCommunicationManager] - Message queue is running
2022-07-08 12:38:51.473 [ERROR] [unication.SonoffCommunicationManager] - Cannot send command uiActive, all connections are offline for deviceid 100149xxxx
2022-07-08 12:38:51.795 [DEBUG] [nternal.handler.SonoffAccountHandler] - Running connection check task
2022-07-08 12:38:51.795 [DEBUG] [l.connection.SonoffConnectionManager] - Connection Check Running for mixed mode 
2022-07-08 12:38:51.795 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Login Request:{"email":"xxx@xxx.com","password":"xxxxxxxx","countryCode":"+1"}
2022-07-08 12:38:52.474 [WARN ] [unication.SonoffCommunicationManager] - Ok message not received for transaction: 1657258730366, command was uiActive, retrying again. Retry count 3
2022-07-08 12:38:52.579 [DEBUG] [unication.SonoffCommunicationManager] - Message queue is running
2022-07-08 12:38:52.579 [ERROR] [unication.SonoffCommunicationManager] - Cannot send command uiActive, all connections are offline for deviceid 100149xxxx
2022-07-08 12:38:52.787 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Login Response:{"error":407,"msg":"appid is unauthorized! oeVkj2lYFGnJu5XXXXXXXXXXXXXXXXX","data":{}}
2022-07-08 12:38:52.788 [DEBUG] [l.connection.SonoffConnectionManager] - Api disconnected
2022-07-08 12:38:52.789 [DEBUG] [connection.SonoffWebSocketConnection] - Stopping websocket client
2022-07-08 12:38:53.587 [WARN ] [unication.SonoffCommunicationManager] - Unable to send transaction 1657258730366, command was uiActive, after 3 retry attempts
2022-07-08 12:38:53.688 [DEBUG] [unication.SonoffCommunicationManager] - Message queue is running

Looks like the problem occurs on other sonoff-implementations too:

@delid4ve Would you have time to have a quick look please?

1 Like

Carried out a firmware update using the smartphone app. Afterwards it worked again with openHAB.

Not the case here… I have 3 devices (2x powr2 and 1x TH16) - only the TH16 is having the problem (latest firmware installed)

1 Like

Just adding to those that have already commented about the Binding no longer working with the Ewelink Sonoff Cloud.
For me all device that are paired to Sonoff Zigbee Bridges have gone offline, that is all temperature, Touch Switches, PIR’s, Door open sensors, quite a lot of hardware.
Reading articles in other forums it appears a change was made at the Ewelink Sonoff cloud end that has caused this issue, not sure the reason for the change, sounds like it is intentional and not going to change back.
That leaves us in a tricky spot as I see it, the only fix will be for change to the binding to cater for the change at the Ewelink Sonoff cloud interface.
Hopefully @delid4ve would be kind enough to have a look.

I’ll jump on this afternoon

5 Likes

Hi there i know that cloud offline is the main issue right now, but i have a question regarding R3 device working as a rollershutter. Is there a support of such working mode in the binding or i will need to use additional items/rules to operatore the relays. It will be good to send OFF / ON / STOP / dimmer commands directly to binding which will be interpreted by the cloud as is in in the app. What i think is important it will used engine calibrated by the app so no further timers rules neccesary in openhab.

Do you have any news on this topic ? is there a way to build cache of devices without sonoff cloud access? i can not add my new device

Status:

OFFLINE

**CONFIGURATION_ERROR**

This device has not been initilized, please run discovery

Need to change the:
appid: oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq (NOT working)
appid: KOBxGJna5qkk3JLXw3LHLX3wSNiPjAVi (OK)
appsecret: 6Nz4n0xA8s8qdxQf2GqurZj2Fs55FUvM (NOT working)
appsecret: 4v0sv6X5IM2ASIBiNDj6kGmSfxo40w7n (OK)
Source: SonoffLAN/cloud.py at master · AlexxIT/SonoffLAN · GitHub
org.openhab.binding.sonoff-2.5.13-SNAPSHOT_2.1_ok.txt (226.8 KB)
Openhab 2.5.12

1 Like

https://github.com/jgesser/openhab-3.x-sonoff/releases/download/v3.3.0-SNAPSHOT/org.openhab.binding.sonoff-3.3.0-SNAPSHOT.jar with this fix

1 Like

This is great thank you,
I’m on OH 3.3 and have a Sonoff TH16. It’s working like a charm again