arendst / Sonoff-MQTT-OTA-Arduino

Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE - Now EOL
618 stars 197 forks source link

Screwed up web GUI by choosing wrong module #334

Open Ontrackx opened 6 years ago

Ontrackx commented 6 years ago

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

arendst commented 6 years ago

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 commented 6 years ago

BTW this repository is end-of-life

Ontrackx commented 6 years ago

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 commented 6 years ago

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

arendst commented 6 years ago

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

Ontrackx commented 6 years ago

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

arendst commented 6 years ago

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...

Ontrackx commented 6 years ago

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))

arendst commented 6 years ago

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.

Ontrackx commented 6 years ago

Thankyou :)