Sonoff-MQTT-OTA-Arduino icon indicating copy to clipboard operation
Sonoff-MQTT-OTA-Arduino copied to clipboard

Screwed up web GUI by choosing wrong module

Open Ontrackx opened this issue 6 years ago • 10 comments

I have a 4ch module I screwed around in config and chose wrong module The 4chan is talking on my mqtt bus and i can reach it from http But how to issue change to 4channel mode via http?

like, I just get command uknown http://sonoff/cm?user=admin&password=******&cmnd=modules

Ontrackx avatar May 29 '18 15:05 Ontrackx

If you can reach it from HTTP why not using the configuration menu and change module there?

If you do not use user and password the http syntax is http://sonoff/cm?cmnd=modules

If you have MQTT access why not send an mqtt message with topic modules?

arendst avatar May 29 '18 15:05 arendst

BTW this repository is end-of-life

arendst avatar May 29 '18 15:05 arendst

I am bit of a neewb to mqtt Http only shows яяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяя л If i try with http http://sonoff/cm?user=admin&password=****&cmnd=Modules% i get

{"Command":"Unknown"}

I think i just write the http string wrong

Ontrackx avatar May 29 '18 15:05 Ontrackx

Sorry i am in the wrong section i seee....

Ontrackx avatar May 29 '18 15:05 Ontrackx

When it shows that it probably also doesn't handle your http modules request ...

arendst avatar May 29 '18 15:05 arendst

what will the command be to try change module to 4ch sonoff with mqtt

i can try that Sorry tried to read how to but cant seem to find the correct syntax

Ontrackx avatar May 29 '18 16:05 Ontrackx

Depending on your broker you could use:

mosquitto_pub -h mqtt_server_name.com -t cmnd/sonoff/module -m 7  # Sonoff 4CH
mosquitto_pub -h mqtt_server_name.com -t cmnd/sonoff/module -m 23  # Sonoff 4CH Pro

But considering your broken http responses I suspect you have a bigger issue than selecting the wrong module...

arendst avatar May 29 '18 16:05 arendst

You don't possible have time to look at it via teamviewer? I know it is a stupid question But if this happens to others like me :) maybe it can be diagnosed Btw i am on the most recent binary release and it was working perfectlu util I had to test what happend if i change to wrong module: My mqtt server: : Sending PUBLISH to mqtt-spy (d0, q0, r0, m0, 'cmnd/sonoff/reset', ... (3 bytes)) 1527611274: Sending PUBLISH to Sonoff4ch (d0, q0, r0, m0, 'cmnd/sonoff/reset', ... (3 bytes)) 1527611274: Received PUBLISH from Sonoff4ch (d0, q0, r0, m0, 'stat/sonoff/RESULT', ... (21 bytes)) 1527611274: Sending PUBLISH to mqtt-spy (d0, q0, r0, m0, 'stat/sonoff/RESULT', ... (21 bytes)) 1527611281: Received PUBLISH from mqtt-spy (d0, q0, r0, m0, 'cmd/sonoff/reset', ... (3 bytes)) 1527611281: Sending PUBLISH to mqtt-spy (d0, q0, r0, m0, 'cmd/sonoff/reset', ... (3 bytes))

Ontrackx avatar May 29 '18 16:05 Ontrackx

Go to the correct repository, formulate your problem (again). provide the requested information and let people help you to get is sorted.

In the end you probably have to clear flash and re-flash the fkrmware but perhaps others can manage to get you up and running again.

arendst avatar May 29 '18 16:05 arendst

Thankyou :)

Ontrackx avatar May 29 '18 16:05 Ontrackx