My Tasmotized Sonoffs do show the correct status after a restart… not sure why you think they don’t/won’t.
you will need 1 FTDI adapter the Amazon link from @vrt or this one from AliExpress are perfect
I would like to flash my first Sonoff basic but I’m a bit confused how to do this. Can I plug the FTDI directly into the sonoff or do I need a cable to connect the right pins? And is it also necessary to solder things together?
You’ll need some header pins and won’t have to solder them in you can just hold them to flash. I needed short cables as the USB I purchased just had pins but your adapter might have a cable attached.
Thanks,
I am planning to buy this adapter
So I think I need, for instance this cables. Is this right?
Yeah you’ll need cables and header pins
@Marco_Lupieri The ScreenShot is the Sync with HA UI part. Triggers when the Sonoff turn ON/OFF and call the HA API via WebHooks to refresh the state.
If you’re not intending to solder headers in you could just go for male to female leads and get away without the headers
I use this script for the light in HA:
script:
lampada_salotto_accesa:
sequence:
- service: ifttt.trigger
data: {“event”:“ikea_on”}
lampada_salotto_spenta:
sequence:
- service: ifttt.trigger
data: {“event”:“ikea_off”}
light:
- platform: template
lights:
luce_salotto:
friendly_name: “Lampada Salotto”
turn_on:
service: script.lampada_salotto_accesa
turn_off:
service: script.lampada_salotto_spenta
But have a problem for syn the UI. in body section what should I write?
I see what you are saying.
I am using switch.command_line.
######switch.yaml#####
- platform: command_line
switches:
tv_plug:
command_on: “/usr/bin/curl -X GET https://maker.ifttt.com/trigger/TURN_ON_TVPlug/with/key/YOUR_IFTTT_KEY”
command_off: “/usr/bin/curl -X GET https://maker.ifttt.com/trigger/TURN_OFF_TVPlug/with/key/YOUR_IFTTT_KEY”
friendly_name: “TV Plug”
Using my script, how should I set up WebHooks to refresh the state? Thanks
I try with your switch.command_line, but not working… sonoff not switch light… if i copy the ifttt url in a browser work, if i click the switch in home assistant not working…
Why?
WIP:
Works well, it works on my WHDTS WiFi Momentary Inching Relay, although it shows up as a switch, it would be nice if I can change it to a momentary switch instead. Thanks for the post!
Unfortunately as I mentioned before is still work in progress and I cannot track all the requests in various threads. If you want a proper integration (and be wiling to test it, because you’re the only one so far with this type of device) please follow these links and submit a github issue
perhaps useful to know.
Hardware for flasing …
1 x mini USB cable.
Hello!
I qill try the flash on the S26 plugs that I bought to see if I can use it with HA. Is that valid to do so?
Thank you!
Well I have a problem, I have a number of Sonoff Devices, followed your installation. It worked for a two weeks and now it is unavailable., I have 10 people telling me to change this and that, but nothing is working. My WIFI is 100% and on the Sonoff GUI it works fine.
Any suggestions?
could the IP addresses have changed?
This is a fantastic integration. Unfortunately for me it does not work after I have upgraded to HA 0.100.1. So I had to downgrade HA.
In HA 0.100.1 I get the following error in the log:
Error loading custom_components.sonoff. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 346, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/sonoff/__init__.py", line 10, in <module>
from homeassistant.util.async_ import run_coroutine_threadsafe
ImportError: cannot import name 'run_coroutine_threadsafe' from 'homeassistant.util.async_' (/usr/src/homeassistant/homeassistant/util/async_.py)