Seeking A Solution: Essential Oil Diffuser

No bridge needed, but my “out of the box” comment was getting ahead of myself. I actually needed to install the Sonoff eWeLink custom component. Just follow the readme about where things should go.

Then if you don’t have it already, add the following code in configuration.yaml:

sonoff:
  username: !secret sonoff_username
  password: !secret sonoff_password
  scan_interval: 60
  grace_period: 600

After restart you should see a switch that looks like this:

switch.sonoff_00-DEVICE-ID-NUMBER-00

Hmm… I cannot get it working with HASS v0.90.2. It seems that the component may need to be patched to support a different directory structure. To install I’m just dong a:

git clone https://github.com/peterbuga/HASS-sonoff-ewelink /config/custom_components

and I get the ERROR:

 2019-04-02 20:13:28 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sonoff.sensor. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/loader.py", line 166, 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 962, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.sonoff.sensor'; 'custom_components.sonoff' is not a package
2019-04-02 20:13:28 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sensor.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-04-02 20:13:28 WARNING (MainThread) [homeassistant.loader] Integrations need to be in their own folder. Change sensor/sonoff.py to sonoff/sensor.py. This will stop working soon.
2019-04-02 20:13:28 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.sonoff.switch. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/loader.py", line 166, 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 962, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.sonoff.switch'; 'custom_components.sonoff' is not a package
2019-04-02 20:13:28 WARNING (MainThread) [homeassistant.loader] You are using a custom component for switch.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-04-02 20:13:28 WARNING (MainThread) [homeassistant.loader] Integrations need to be in their own folder. Change switch/sonoff.py to sonoff/switch.py. This will stop working soon.

Not sure what the error as it’s not my component but it might be easier to install manually. You can grab the raw files from github and save as individual files. This is what my file structure looks like. I am also on v90.2.

43%20AM

hi all, i’m the creator of the sonoff component.
for those of you who are in doubt on how to install it 1st of all please read the description (that’s the main problem usually) and/or follow up in the original thread.
if you want to help integrating the device mentioned by @sfgabe feel free to join (and help) the discussion https://github.com/peterbuga/HASS-sonoff-ewelink/issues/83

also, HA v0.88+ needs a different structure of the files (@sfgabe) and there are branches that follow this change.

1 Like

Out of interest, if this works as a sonoff, can it be flashed with tasmota, and addressed directly?

A bit late but I just want to share my recent experience. I also bought this one:
https://m.aliexpress.com/item/33014570952.html
They nicely show in the video and images that is compatible with eWeLink but it’s not. It can pair only with Tuya or Smart Life and it’s not recognized by HA. So be careful guys.
As with regards to the eWeLink ones, did you manage to integrate it in HA? Can you adjust more settings than only the power?
As I see Smart Life can connect with IFTTT but the diffusers are not recognized as compatible devices. So, as a workaround for people who don’t want to install too many things, you can create a scene in Smart Life that turns the diffuser on/off which is recognized by IFTTT. Therefore you will have something like HA -> IFTTT -> Smart Life -> diffuser.
Really don’t like this solution but it works for now.

I have same thing, did you find it ?

Tasmota found just 1 GPIO15 which is Led on off Only.

Power ON/OFF is not found.

It was Tuya platform.

Actually, this is very strange.

I also have Tuya platform not eWelink.

This product has 2 version ?

So for the eWeLink one, I was able to get more options by sending it through as an Alexa routine with the Alexa Media player here: https://github.com/custom-components/alexa_media_player

You’ll need to setup the parameters in the Alexa app:

Then add this to your scripts:

alexa_humidifier_on:
  alias: Alexa Humidifier On
  sequence:
  - data:
      entity_id: media_player.my_alexa
      media_content_id: humidifieron
      media_content_type: routine
    service: media_player.play_media

Can anyone point me at what to buy from Amazon UK - would be very grateful!

Thanks

Stuart

I have got a similar one as the OP. I have ordered a replacement board (see link below) which should work just on/off with power switch. I will report back once I receive my part.

https://www.aliexpress.com/item/32962545681.html?spm=a2g0s.9042311.0.0.27424c4dy0ZYxi

A new version of Tuya convert to update the firmware is in testing

It could be flashed with something like tasmota or espeasy!

1 Like

If you are running Node-red there is a tuya node that can control various tuya devices locally, mine do not have internet connectivity but i can control them. it takes a little time to figure out a few things like which setting is controllable but can be done

I have a couple of Kogan devices that are tuya based and all controllable
2 x https://www.kogan.com/au/buy/kogan-smarterhome-smart-aroma-diffuser/
1 X https://www.kogan.com/au/buy/kogan-smarterhome-17l-smart-glass-kettle/

this is the node-red node

You will also need to use the tuya app to find the device ID, and also retrieve the key, but have a look here on how to find them both

2 Likes

I think I found the way to integrate with HA

but I wish I can make it ESPHOME node.

Perhaps it will be possible someday.

ESPHOME has Tuya dimmer components and make efforts to integrate several things.

minsuke, you can! Here’s my experiences:

Wow you Great !!!

I am very happy to inform your codes and knowhow.

this diffuser only acts as a TASMOTA

Your codes make me happy to integrate 100% ESPHOME System.

thxs again your code sharing and kind information.

:grinning:

Hi, I have this same oil diffuser, what template did you use? What wifi chip does l bring yours?

Hi, I have this same oil diffuser, what template did you use? What wifi chip does l bring yours?

I found the codes for this model, they are commands “AT + UPDATE =” serial codes similar to sonoff-L1

Diffuser and Light ON FAN LOW
backlog serialsend4 AT+UPDATE=“sequence”:“1579752745631”,“switch”:“on”,“state”:1; serialsend5 1B

Diffuser and Light ON FAN HIGH
backlog serialsend4 AT+UPDATE=“sequence”:“1579752745631”,“switch”:“on”,“state”:2; serialsend5 1B
Diffuser and Light OFF FAN OFF(LOW)
backlog serialsend4 AT+UPDATE=“sequence”:“1579752745631”,“switch”:“off”,“state”:1; serialsend5 1B

Hi all. I have the Maxcio oil diffuser connected with smart life and google assistant. I didn’t understand how to have it working inside HA. I’m not interested in hacking the firmware. Just normal integration. What shall I do? How to use with sonoff? Shall I create an account?