- Platform information:
- Hardware: Raspberry Pi 4 Model B Rev 1.2, 4GB RAM,
- OS: Linux 5.4.51-v7l+
- Java Runtime Environment:
- openjdk version â1.8.0_265â
- OpenJDK Runtime Environment (Zulu 8.48.3.246-CA-linux_aarch32hf) (build 1.8.0_265-b11)
- OpenJDK Client VM (Zulu 8.48.3.246-CA-linux_aarch32hf) (build 25.265-b11, mixed mode)
- openHAB version: openHAB 2.5.8-1
- Issue of the topic: I executed following steps:
- Copy the file from github to /usr/share/openhab2/addons
- renamed the file to org.openhab.binding.sonoff.jar
- In the console
sudo chown openhab org.openhab.binding.sonoff.jar
sudo chgrp openhab org.openhab.binding.sonoff.jar
- crated a bridge/things file
Bridge sonoff:account:uniqueName âSonoff Accountâ @ âotherâ
[ email=âmyEmailâ, password=âmyPasswordâ,accessmode=âcloudâ]
I have a Sonoff model 4CHPROR3, but nothing appear in the inbox and I am not able to force a new discovery.
I did tried to change the contents of the .things file by adding code found everywhere, but nothing works.
Let me report the logs here:
2021-10-31 21:26:48.294 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sonoff.things'
2021-10-31 21:26:48.344 [DEBUG] [nternal.handler.SonoffAccountHandler] - Initialising Sonoff Account: sonoff:account:uniqueName
2021-10-31 21:26:48.347 [INFO ] [nternal.handler.SonoffAccountHandler] - Sonoff Access Mode set to: cloud
2021-10-31 21:26:48.351 [DEBUG] [unication.SonoffCommunicationManager] - Message queue is running
2021-10-31 21:26:48.352 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Login Request:{"email":"myEmail","password":"myPassword","countryCode":"+1"}
2021-10-31 21:26:48.324 [hingStatusInfoChangedEvent] - 'sonoff:account:uniqueName' changed from UNINITIALIZED to INITIALIZING
2021-10-31 21:26:50.034 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Login Response:{"error":10004,"msg":"request redirection","data":{"region":"eu"}}
2021-10-31 21:26:50.037 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Login Request:{"email":"myEmail","password":"myPassword","countryCode":"+1"}
2021-10-31 21:26:51.194 [DEBUG] [ernal.connection.SonoffApiConnection] - Api Login Response:{"error":0,"msg":"","data":{"user":{"accountLevel":10,"countryCode":"+41","email":"myEmail","apikey":"7b1e30f3-452a-4fd3-aa52-b20f32d4336b","accountConsult":false,"appVersion":"4.16.1","denyRecharge":false,"ipCountry":"CH"},"at":"1e05db3f1b6dcfc710754b85d407c3bde52b0eda","rt":"243c8309661ae3fecf7990516d0231755ca0ed19","region":"eu"}}
2021-10-31 21:26:51.197 [DEBUG] [l.connection.SonoffConnectionManager] - Api connected
2021-10-31 21:26:51.200 [DEBUG] [ernal.connection.SonoffApiConnection] - Attempt to get websocket server
2021-10-31 21:26:51.205 [DEBUG] [ernal.connection.SonoffApiConnection] - Websocket URL Request:{"appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"AE6iK9LN","ts":1635712011204,"version":8,"accept":"ws"}
2021-10-31 21:26:51.258 [DEBUG] [ernal.connection.SonoffApiConnection] - Websocket URL Response:{"port":8080,"IP":"3.120.166.65","reason":"ok","domain":"eu-pconnect7.coolkit.cc","error":0}
2021-10-31 21:26:51.814 [DEBUG] [connection.SonoffWebSocketConnection] - WebSocket Socket successfully connected to eu-pconnect7.coolkit.cc/3.120.166.65
2021-10-31 21:26:51.817 [DEBUG] [l.connection.SonoffConnectionManager] - Websocket connected
2021-10-31 21:26:51.823 [DEBUG] [connection.SonoffWebSocketConnection] - Websocket Sending Message:{"action":"userOnline","at":"1e05db3f1b6dcfc710754b85d407c3bde52b0eda","apikey":"7b1e30f3-452a-4fd3-aa52-b20f32d4336b","appid":"oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq","nonce":"Xwx183G3","ts":1635712011,"userAgent":"app","sequence":1635712011821,"version":8}
2021-10-31 21:26:51.894 [DEBUG] [connection.SonoffWebSocketConnection] - Login Response Received: {"error":0,"apikey":"7b1e30f3-452a-4fd3-aa52-b20f32d4336b","config":{"hb":1,"hbInterval":145},"sequence":"1635712011821"}
2021-10-31 21:26:52.279 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'sonoff.things'
2021-10-31 21:26:51.904 [hingStatusInfoChangedEvent] - 'sonoff:account:uniqueName' changed from INITIALIZING to ONLINE
2021-10-31 21:27:11.264 [DEBUG] [nternal.handler.SonoffAccountHandler] - Running Activation task
2021-10-31 21:27:11.266 [DEBUG] [connection.SonoffWebSocketConnection] - Websocket Sending Message:ping
2021-10-31 21:27:11.810 [DEBUG] [connection.SonoffWebSocketConnection] - Pong Response received
It seems to work, but I do not see the device which is connected, the 4CHPROR3.
I did tried to act on a local network by using the following .things file:
Bridge sonoff:account:uniqueName "Sonoff Account" @ "other"
[accessmode="local"] {
}
In such a case, the outcome in the log is
2021-10-31 22:47:10.447 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sonoff.things'
2021-10-31 22:47:10.499 [DEBUG] [nternal.handler.SonoffAccountHandler] - Initialising Sonoff Account: sonoff:account:uniqueName
2021-10-31 22:47:10.502 [INFO ] [nternal.handler.SonoffAccountHandler] - Sonoff Access Mode set to: local
2021-10-31 22:47:10.505 [DEBUG] [unication.SonoffCommunicationManager] - Message queue is running
2021-10-31 22:47:10.513 [DEBUG] [ernal.connection.SonoffLanConnection] - mDNS service has been started on IP 127.0.0.1
2021-10-31 22:47:10.518 [DEBUG] [ernal.connection.SonoffLanConnection] - mDNS service has been started on IP 192.168.1.100
2021-10-31 22:47:10.527 [DEBUG] [l.connection.SonoffConnectionManager] - Lan connected
2021-10-31 22:47:10.481 [hingStatusInfoChangedEvent] - 'sonoff:account:uniqueName' changed from UNINITIALIZED to INITIALIZING
2021-10-31 22:47:10.539 [hingStatusInfoChangedEvent] - 'sonoff:account:uniqueName' changed from INITIALIZING to ONLINE
2021-10-31 22:47:10.852 [ERROR] [unication.SonoffCommunicationManager] - The device 100114c555 doesnt exist, unable to set state
2021-10-31 22:47:10.855 [DEBUG] [nternal.handler.SonoffAccountHandler] - Added IP Address 100114c555 for device 192.168.1.109
2021-10-31 22:47:11.556 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'sonoff.things'
2021-10-31 22:47:30.537 [DEBUG] [nternal.handler.SonoffAccountHandler] - Running Activation task
In addition, when a deviceâs button is press, the following debug message appears:
2021-10-31 22:50:26.407 [ERROR] [unication.SonoffCommunicationManager] - The device 100114c555 doesnt exist, unable to set state
2021-10-31 22:50:26.411 [DEBUG] [nternal.handler.SonoffAccountHandler] - Added IP Address 100114c555 for device 192.168.1.109
So the device is somehow connected, but I do not control it.
Do you have any advices on what it is happening and why the device is not visible or controllable?