Sonoff /eWeLink component for original firmware

I’m 100% sure the location was not needed in previous app versions (and I still think is not needed it’s just a constrain on app’s side not server side), I know this because I was always selecting “Andorra” out of laziness and let the app figure it out my country in background based on my ip (the same flow is used in the component as a failsafe for people who misconfigure the location in HA). maybe they’re just trying to optimize/analyze where&how the users are located to deploy the servers better and whatnot
ps: i live in Milano for the time being and I had an italian IP all the time :stuck_out_tongue:

regarding the previous FW conversation, the idea was to be able to restore a sonoff device to current available firmware by downloading its firmware file from itead servers just like a device would & ready for flashing (aka tasmota -> original sonoff) and NOT downgrading. i don’t think the time i might spent on cracking this will make much of help

1 Like

I love this component, I have been using it for months now with no issues.

Any chance to get this added to HACS, its a nice easy way to stay on top of new versons/changes

for the time being no :slightly_smiling_face:

Ok with the latest firmware with Home Assistant 0.97.2 all is ok and I have a smart circuit breaker

@Hdjweb

what type? a link if possible.
thanks

Thanks a lot peterbuga for your incredible work and your time. After activate my Home Assistant’s python virtual environment (source bin/activate) and install websocket and websocket-client (pip3 install websocket websocket-client) your component works as expected. Are there any option to put my switch in living room area?. I can’t put the switch in any area beacause i can’t see it in “Integrations” panel.

Tahnks a lot for your great work!!!

Just make a custom button and place it in Lovelace in a living room group.

Thanks a lot for your answer CoreyMaxim. I have searched about “custom buttom” in Home Assistant but i don’t find specific official documentation. Maybe you refer to Button Card? Lovelace: Button card

Thanks a lot.

That’s absolutely the one, that button card is awesome. You can do pretty much whatever you want to do with them.

This is pretty much how my whole ui is setup as.

friend I had the same problem as you, after the last update my sonoff pow did not give an updated reading of consumption, just disable lan mode in each sonoff pow and the problem will be solved

I returned back to Tasmota with teleperiod of 10 Sec.
now everything is fine especially with Grafana.

Recently, I often got the problem when I turn on or turn off 2 Sonoff switches at a same time in an automation. It would turn on/off 1 switch only.

My automation code as:

 - alias: 'Tự động tắt đèn phòng ăn (out motion)'
   trigger:
     - platform: state
       entity_id: sensor.motiondetect_corridor
       to: 'Clear'
       from: 'Detect Mode'
   condition:
     - condition: time
       after: '22:00:00'
       before: '05:00:00'
   action:
     - delay:
         minutes: 0.5
     - service: switch.turn_off
       entity_id: switch.sonoff_10008700fd_1, switch.sonoff_10008700fd_2

I tried to separate the service into 2 callings as below but result also the same.

     - service: switch.turn_off
       entity_id: switch.sonoff_10008700fd_1
     - service: switch.turn_off
       entity_id: switch.sonoff_10008700fd_2

Is there anybody got the same problem? And the solution to solve it? Thank you very much.

Please post your config properly. There is a sticky thread that I am sick of pointing people to, but here goes again How to help us help you - or How to ask a good question

@Teddythanh take a look here

1 Like

Hi!
Anyone knows if this 8 gang generic switch works well on this integration?
if not, any other 8 gang switch works?

Thanks!

Hi @peterbuga,

I am new to this. I followed your instructions. The sonoff component is not starting. I have the below error in my log file.

2019-08-28 18:58:38 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-08-28 18:58:41 ERROR (MainThread) [homeassistant.setup] Error during setup of component sonoff
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 344, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 316, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x722ddb70>: Failed to establish a new connection: [Errno -2] Name does not resolve

@Fernando_Donan i’m pretty sure that 8 gang switch it’s not ewelink supported, as the logos imply it’s Tuya (also it’s kinda impossible for itead devices to support 8 gangs without some supplemental update to their API + clearly the app) if someone else knows otherwise please correct me.

@Dean_Olivier on the 1st view looks like the component is unable to connect to the required servers, if you’re running the HA instance behind PiHole or some other kind of connection please double-check or temporarily disable it and see if that fixes it

@peterbuga, I am just running HA on my RaspberryPi 3B+. No PiHole. Network is wide open.