ITEAD Sonoff switches and sockets - cheap ESP8266 Wifi+MQTT hardware

I hope so,

Do you have MQTT Action service installed?

Yes, it’s installed
Everything works great with my system except this rule.

then… just enable debug and check the logs

could you please post text as text?

Sorry didn’t realise, I hoped the photos to be more helpful.
I don’t know how to activate the debug…I can only open the files in the log folder

Hello @Marian_Grigore,
problems like these will come around from time to time. Don’t expect a rule to always just work instantly. You should get a feeling for how to debug rules.

First a side note: You are using the openHABian samba share to look at the logs. That’s an option but not the best by far. You should either install the openHAB log viewer or connect via ssh and type openhablog.

In your log I’m seeing the Sonoff_Action item receiving the restart command but I’m not seeing the log line “Sonoff Maintenance on all devices: restart”, either because it’s not there or because it’s not visible in your photo (text for logs and screenshots for visual things would be better).

So the first thing you should do is check if the rule is triggered at all, indicated by the above log line. Next just insert further log lines till you find the problem. It’s actually pretty easy :wink: Good luck!

Thank you very much for your help!
Found the problem at the variables not being before the rule at the very top page

Now my sonoffs keeps rebooting until I switch off my raspberry pi.
I have deleted the rule, restored previous rule/sitemap/ items files but no joy.
Won’t be a problem to reinstall and restore configuration files but I don’t understand what I going on

I didn’t understand the issue but in general you should get warnings about errors in your config files in the openHAB logs. Furthermore do not try to put too many rules in one file. separate them when meaningful.

“keeps rebooting” can only be a very twisted error in your rule. once again add log lines to understand whats going on.

Hi Would this work on the Sonoff 4CH DIN Rail switch. Is there a step by step procedure to flash them? I read somewhere that we don’t need a physical arduino to flash them.Is that right?

Read the first post of this thread. :grin:

1 Like

Have you flashed this as well? Can you please tell me which usb to serial adapter you used and also the firmware version. Am new to all this hence these questions?

@Ramakrishnan_Manohar See the Top of this Topic. You will find all needed informations.

  1. Yes I flashed it
  2. 3.3V FTDI USB-to-Serial Converter/Programmer example example 2
  3. https://github.com/arendst/Sonoff-Tasmota/wiki

Just start reading :slight_smile:
A small tutorial

Hi guys,
I am not sure if my problem is on the right place here. But I think here are some guys who know what to do in my case.
I want to flash the tasmota firmware to a D1 mini ESP8266 board. I struggled a bit at the beginning, but now I can flash the board. At least Platformio tells me that the flashing procedure was successful. After restarting the mini the blue LED blinks one times and nothing more happens. I tried flashing with the internal USB port and an external FTDI. Both ways with the same result: flashing was successful and nothing more again after a restart. Wlan settings are set through the config file.
I am using a mac with macOS sierra and platformio.
The serial monitor shows me the following:

{d␀l��|␀�d�|␃␌␌␌�␌l�␌c|��␂�␒�r�b�␌c��gg�loo���␌c␜p��lslslp�o�␐␃␌␄�␄d␄��␄␄␄c␄o�|␃d�␄␄�b��nn�␀d��d`␃�␛␛oo␄d`␃
␏␃o{���n␄␄��`␃␎s��n␄␄��`␃␎s��gl�|��`␃␛�s�g�c�gcp␀�

Not very promising…

Are there any hints or a description from somebody who flashed successfully a mini?

Thanks for your help!

You just have to read the first posting :slight_smile:

Yes the 4CH is working just fine with Sonoff-Tasmota and openHAB. Also have a look at:

Here is a bit off topic, afterall it’s a thread about the Sonoff modules. You’d find better help in the Tasmota issue tracker. Please move your question there.
I did not flash Tasmota onto the D1 mini, so can’t help much.

braahhh! openHAB won’t connect to mosquitto:

2017-07-20 22:57:33.677 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mqttson'
2017-07-20 22:57:35.679 [ERROR] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to broker was lost
Connection lost (32109) - java.io.EOFException
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:146)[197:org.openhab.io.transport.mqtt:1.10.0]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: java.io.EOFException
	at java.io.DataInputStream.readByte(DataInputStream.java:267)[:1.8.0_121]
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:65)[197:org.openhab.io.transport.mqtt:1.10.0]
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:107)[197:org.openhab.io.transport.mqtt:1.10.0]
	... 1 more
2017-07-20 22:57:35.682 [ERROR] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to 'mqttson' was lost: Connection lost : ReasonCode 32109 : Cause : null
2017-07-20 22:57:35.683 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'mqttson'

mqtt.cfg:

mqttson.url=tcp://localhost:1883
mqttson.clientId=OH2MQTT

installed mosquitto via openhabian-conf
and “systemctl status mosquitto” says it’s running.

are there more settings?

i already tried to delete the mqtt binding config via karafe console but the error remains :frowning:
what am i missing (again)…?

Hello i use three Sonoff Smart Switches flashed according to this tutorial.
However i have the “problem” that my wifi turns out at night and the switch starts blinking green when loosing the wifi connection.

Is there any software possibility to turn that off? I did not find any option in the WebUI.
Its driving me mad at night in my bedroom but I do not want to solder out the LED :wink: