Sonoff /eWeLink component for original firmware

Tags: #<Tag:0x00007f3f1d74c2d8>

If your installed hassio through a VM like me than you change it in the VM settings.

Unfortunately it is on PI3
with a 32G card the problem is I use influxdb and grafana (they need large memory)

Sonoff returns to work again after I update to Ver 0.94.1.

RBPI 3b
HA: 0.94.1
Python_version 3.7.3
HassOS: 2.12 / Sup 166
Custom_components : sonoff-ewelink-websocket

1 Like

mine is working 0.94.1

1 Like

I’ve just updated to 0.94.1 and I’m not sure if it’s a coincidence or not, but I’ve noticed that my Sonoff TH10 temperature sensor has stopped updating in HA. Earlier today I was on 0.92.2 and it seemed to be working fine and was reading 68.0 degrees, and when I checked the temperature after my update it was still reading as such, but the eWeLink app shows the temperature is 64 degrees. Even after restarting HA the temperature stays at 68.

Any ideas what could be causing this issue? I’m not finding any errors in the logs.

Just did the update to 0.94.1 and everything is back in order. Hooray :partying_face:

Big thanks to the HA devs and of course to @peterbuga for the great component :love_you_gesture:

Up until today I had been stuck on a problem with the Sonoff/eWeLink custom component stalling during HA startup with no message in the log - even though the sonoff_debug standalone worked just fine (HA 94.2, raspbian+virtualenv with python 3.7.3, websocket branch). Just in case this helps others, the issue turned out to be that for sonoff_debug the module dependency only needed “pip install websocket”, but for the integrated component you also need “pip install websocket-client”. The dependency is indeed mentioned earlier in this thread, but just highlighting the debug version runs without it - so I missed the nuance. I am now a happy camper - my Sonoff 4ch Pro is all set to be my new lawn sprinkler controller. @peterbuga - great component, thanks!

Do you have some automation examples?

I’m trying to create an automation to turn on some switches (sonoff 4ch) when I’m getting close to home, but without success…

I’ll send my code:

- id: '1552160713998'
  alias: Turn on Lights when close to home
  trigger:
  - above: '30'
    below: '900'
    entity_id: proximity.home
    platform: numeric_state
  action:
  - alias: ''
    data:
      entity_id: switch.sonoff_100046ac01_3
    service: switch.turn_on
  - alias: ''
    data:
      entity_id: switch.sonoff_100046ac01_1
    service: switch.turn_on
  - alias: ''
    data:
      entity_id: switch.sonoff_100046ab72_2
    service: switch.turn_on

And yeah, I need to add an condition to only run this automation when I’m going towards home, but, for now if I can turn this switches on by automation would be perfect…

Assuming you tested that the switches work by triggering the automation from the HA GUI, you might be asking why your proximity trigger doesn’t fire? Looks like you should remove the quotes around ‘30’ and ‘900’ since numeric_state is comparing numbers, not strings. Best to start a new thread if the question is about triggers (although perhaps you thought there is something special about turning 4ch sonoff on/off - there isn’t). Here’s my automation:

- id: '1560392496406'
  alias: Water zone 1
  trigger:
  - at: 05:00:00
    platform: time
  condition:
  - condition: time
    weekday:
    - sun
    - tue
    - fri
  - condition: template
    value_template: "{{ not (states('sensor.dark_sky_precip_probability')|float > 50 and states('sensor.dark_sky_precip_intensity')|float > 0.1) }}"
  action:
  - data:
      entity_id: switch.10004c1399_1
    service: switch.turn_on

Hello,

Assumed I want the Sonoff Power R2 will automatic switch off after 1 hour of run, or send notification to my phone. Here is my code, anythings wrong?

- id: '1560392496406'
  alias: Auto stop
  trigger:
    platform: time_pattern
    hours: '1'
  condition: state
  entity_id: switch.10004c1399_1
  state: 'on'
  for:
    hours: 1
  action:
  - data:
      entity_id: switch.10004c1399_1
    service: switch.turn_off

thanks

If your switches work outside of that automation, then you just need help getting the automation working. You might find more help in a new thread asking about automations specifically.

in home assistant 0.94.4 python 3.7.3 home assistant say me integration not found

room

Is it possible to do something like this?
Does anyone know the code and how to do it?

Thanks

That looks like a cover component.

and the code behind?

Template cover or MQTT cover.

what I need is, insert the cover but know what the code is and how to do it for example by the blind at 30 percent

Have you got any answer by now? I have the same problem when upgrading to 0.95.1:
General Errors:
- Integration not found: sonoff
Went back to 0.94.4 where, in my case, the custom component workes just as it had before.

Same here.