Sonoff /eWeLink component for original firmware

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.

is the custom component compatible with the mini sonoff?

@Dean_Olivier sorry but i have no idea what’s going wrong on your side

@matteos1 no one reported it as working but there’s a high possibility it should.

Received a mini today.

Edited from connection issues. Note to self, use android app and not iphone app. Iphone wouldn’t quick pair and errored with compatible pair. Android quick paired first time.

Sonoff Mini appears in Home Assistant fine, so please add to the list.

I’m looking for the sonoff mini component among my home assistant devices, but I can’t find it.
I paed with iphone. I don’t think this is the problem because the application detects it

Strange, mine appeared straight away after a restart. It even showed but as unavailable when I was having connection issues with the app. As soon as I solved the app issues I was then able to control it in HA.

I’ve disconnected again now ready to wire it where I intend to place it, but let me know if there’s any checks I can help with.

The QR code also leads to the tuya app.

I can only see a sonoff, the mini does not appear on ha

from what i’ve seen the new sonoffs might have this lan-mode enabled by default. i don’t have one so i don’t know what steps to do exactly but try to disable anything related to this and more importantly open the eWeLink app on the phone using strictly the mobile connection data and not the wifi.
if you still have the same output (works on app but not on HA) you’ll need to search & provide more details otherwise i don’t know what is going wrong … (would not hurt if you could provide the output of sonoff-debug.py script to take a look at what’s going around there)

ok now it works, i shared the sonoff on ha’s ewelink account. perfect