Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonoff status after command execute #5

Open
Remendado opened this issue Jan 8, 2023 · 0 comments
Open

Sonoff status after command execute #5

Remendado opened this issue Jan 8, 2023 · 0 comments

Comments

@Remendado
Copy link

Remendado commented Jan 8, 2023

I have Sonoff TH16 one of first versions and Basic R3. I got success with switch devices to ON and OFF over eWeLink-mqtt. And now I want to receive new switch status after command execute.

When I push On-Off button in Ewelink mobile app, I get:

[2023-01-08 15:33:02,923] INFO publishing item: ewelink/ewelink_status/1000xxxx/json: {"action": "update", "deviceid": "1000xxxxxx", "apikey": "xxxx", "userAgent": "app", "sequence": "1673181180165", "params": {"switch": "on"}}
[2023-01-08 15:33:02,923]DEBUG Received data {'action': 'update', 'deviceid': '1000xxxx', 'apikey': 'xxxx', 'userAgent': 'app', 'sequence': '1673181180165', 'params': {'switch': 'on'}}
[2023-01-08 15:33:02,924] INFO publishing item: ewelink/ewelink_status/1000xxxx/json: {'action': 'update', 'deviceid': '1000xxxx', 'apikey': 'xxxx', 'userAgent': 'app', 'sequence': '1673181180165', 'params': {'switch': 'on'}}
----> [2023-01-08 15:33:02,924]DEBUG Action Update: Publishing: {'switch': 'on'}
----> [2023-01-08 15:33:02,925] INFO publishing item: ewelink/ewelink_status/1000xxxx/switch: on
[2023-01-08 15:33:02,925] INFO publishing item: ewelink/ewelink_status/1000xxxx/last_update: Sun Jan 8 15:33:02 2023
[2023-01-08 15:33:02,926] INFO publishing item: ewelink/ewelink_status/1000xxxx/status: OK

When I send "on" or "off" command over MQTT

mosquitto_pub -r -u "homeuser" -P "xxxx" -h 127.0.0.1 -p 1883 -t "/ewelink_command/1000xxxx/switch" -m off

i get something like this:

[2023-01-08 15:38:43,110] INFO publishing item: ewelink/ewelink_status/1000xxxx/json: {"error": 0, "deviceid": "1000xxxx", "apikey": "xxxx", "sequence": "1673181522000", "uid": "xxxxxx"}
[2023-01-08 15:38:43,112]DEBUG command completed successfully
[2023-01-08 15:38:43,113] INFO publishing item: ewelink/ewelink_status/1000xxxx/status: OK
[2023-01-08 15:38:43,114]DEBUG Received data {'error': 0, 'deviceid': '1000xxxx', 'apikey': 'xxxx', 'sequence': '1673181522000', 'uid': 'xxxxxx'}
[2023-01-08 15:38:43,115] INFO publishing item: ewelink/ewelink_status/1000xxxx/json: {'error': 0, 'deviceid': '1000xxxx', 'apikey': 'xxxx', 'sequence': '1673181522000', 'uid': 'xxxxxx'}

In both cases commands executes successfully, but in the second case I don't get new switch status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant