Ewelink component request

Flashing Itead Sonoff devices via original OTA mechanism!!! WORKS!!!
After a lot of search, I could find this excellent project to change the firmware to this switch lx-wifi-03o without soldering nothing !!!


This is a script to update a Sonoff device from the stock firmware to Sonoff-Tasmota purely over WiFi.

I doesn’t work with the latest >1.6 firmware in sonoff…

Yes, I could see this in the notes of the sites.
However the firmware version of the devices that i updated was 2.0.1!

Are you using Tasmota or IFTTT? Both does not provide state- On/Off (Tasmota loose state after sometime and even with cosol command after restart

Using Tasmota and it works in HA perfectly even across a reboot. It does not lose it’s state.

It does not. There is enough dicussion on this. I use OTA method to flash my Sonoff POWs - it is on Tasmota v.5.9.1.

See discussion here MQTT : How to Retain Sonoff Switch Setting across Restarts of HA

I used Console” and entered the command " PowerRetain 1 " as suggested still after restart it is not showing correct on off state. The Switch code I am using is

  • platform: mqtt
    name: “POW2”
    command_topic: “cmnd/sonoffp2/power”
    state_topic: “stat/sonoffp2/POWER”
    qos: 1
    payload_on: “ON”
    payload_off: “OFF”
    payload_available: “Online”
    payload_not_available: “Offline”
    retain: true

I am using MQTT add on (mosquito) in Hass.io running 0.721

Here- this person also admit it. He is person advocating Tasmota big time

I don’t care who ‘admits it’ it works for me.

Which MQTT service are you using

May be I have to look have MQTT outside HA and in a different box

I’m using the broker in Hassio.
I did have to set the power retain in the console. I have found that if my router restarts that the switch will turn on when it reconnects which is a nuisance but only happened once… but if I restart home assistant, it stays on or off and HA shows the correct state.

OK. May be I give the built in MQTT a go and not the Mosquito add-on. In this discussion they claim that it is a problem with built in MQTT but add on work. But for me Add on MQTT (mosquito) does not work

Just remember I am using hassio - so I have to use the addon…

OK. I am Hass.io with RP3. So you are using same MQTT as me.

mqtt:
broker: core-mosquitto

May be it is the firmware then? I have 5.9.1

Console” button, and enter the command " PowerRetain 1 " will correct the state buy HA restart will kill it in my setting

Tasmota firmware? I’m on 6.1 now but was on 5.14 I think) I don’t recognise 5.9.1 tasmota firmware.

I am checking Sonoff POW units and did OTA. Version is correct - it is refereed to here

Because my power metering info did not show up I have to follw instructions in that article and it worked.

Let me check if it allow me to update firmware OTA as I do not have a serial adapter yet

Mine updates OTA from the webui. I upgraded to 6.1 OTA on the weekend when it became the latest release. https://github.com/arendst/Sonoff-Tasmota/releases/tag/v6.1.0

I don’t disagree - it would be nice if there was a component for eWeLink but I don’t think there is any interest in this by the Devs.

Before I flashed Tasmota, I was using IFTTT and it seemed to work ok across reboots as well…

That looks correct, make sure your MQTT broker is setup to allow persistence. You really don’t need the retain on the HA side, in some rare cases it could get out of sync, but absolutely the powerretain on the Tasmota console is key to the state of the switch staying.

Someone’s working on this:

2 Likes

I would like support for the Ewelink component as I am using 2 of https://www.amazon.com/gp/product/B073VK9X49/ref=oh_aui_detailpage_o01_s01?ie=UTF8&psc=1 and they have no location to flash the firmware to Tasmota.

I agree, flashing is a pain, I have 10 devices and only flashed four, one does not work at all and the other three work on the Sonoff GUI but not not work with HA without problems. I had many, many people to tell me to change my MQTT logic, did it and still have the problems.

1 Like