Hi, I have a Asakuki 500ml Oil Diffuser. If you have a similar wifi-enabled diffuser, the chances are the below, or something similar will work for you.
*Update, I’m using tasmota for now and most seem to be doing the same, it isn’t perfect but seems better.
I flashed it with tyua-convert and had it setup with Tasmota and realized that much of the information on the template page were incorrect. Fortunately a better way of doing things and correct codes were in a similar device. Everything was working 100% but I wanted to use the home-assistant API and I <3 ESPHome.
I compiled an ESPHome config, uploaded it and… boom was unable to reach the device completely .
Fortunately a co-worker helped me with some soldering so I flashed it manually, this time with a minimal configuration and one small thing that I believe prevented whatever loop that screwed things up first time.
logger:
baud_rate: 0
After some tinkering I managed to get 80% of the functionality of tasmota up and running.
The two key exceptions (perhaps you can help?) are:
- No empty water notification to home asssistant. AFAIK there is no UART ‘listen’ function in esphome. This isn’t a huge problem as the device shuts down the mist function anyway.
- Perhaps related to the above, everything is running on ‘optimistic’ - I’d rather know for sure the state of the switch.
- No perfect ‘light’ configuration to control the LED. I can send of specific RGB strings, but don’t know enough lambda magic to create a custom light component.
This is the best diffuser I have owned, and the price is cheaper than smaller, dumber diffusers.
For anyone else looking to use esphome with their diffuser, this esphome config may be a useful starting point:
substitutions:
devicename: asakuki
esphome:
name: asakuki
platform: ESP8266
board: esp01_1m
# disable rainbow LED mode (allowing custom led color selection)
on_boot:
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x05, 0x6e, 0x04, 0x00, 0x01, 0x01, 0x7E]
wifi:
ssid: "yours"
password: "yours"
switch:
- platform: template
name: $devicename LED
optimistic: true
turn_on_action:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x05, 0x0b, 0x01, 0x00, 0x01, 0x01, 0x18]
turn_off_action:
- uart.write: [0x55, 0xAA, 0x00, 0x06, 0x00, 0x05, 0x0B, 0x01, 0x00, 0x01, 0x00, 0x17]
- platform: template
name: $devicename Rainbow Mode
optimistic: true
turn_on_action:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x05, 0x0b, 0x01, 0x00, 0x01, 0x01, 0x18]
turn_off_action:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x05, 0x6e, 0x04, 0x00, 0x01, 0x01, 0x7E]
uart:
baud_rate: 9600
tx_pin: GPIO1
rx_pin: GPIO3
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
services:
- service: asakuki_off
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x05, 0x67, 0x04, 0x00, 0x01, 0x02, 0x78]
- service: asakuki_wifi_led
then:
- uart.write: [0x55, 0xaa, 0x00, 0x03, 0x00, 0x01, 0x03, 0x06]
- service: asakuki_fast
then:
- uart.write: [0x55, 0xAA, 0x00, 0x06, 0x00, 0x05, 0x67, 0x04, 0x00, 0x01, 0x01, 0x77]
- service: asakuki_slow
then:
- uart.write: [0x55, 0xAA, 0x00, 0x06, 0x00, 0x05, 0x67, 0x04, 0x00, 0x01, 0x00, 0x76]
- service: asakuki_purple
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x64, 0x38, 0x30, 0x30, 0x66, 0x66, 0x30, 0x31, 0x32, 0x32, 0x66, 0x66, 0x66, 0x66, 0xb9]
- service: asakuki_color_green1
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x37, 0x38, 0x66, 0x66, 0x30, 0x30, 0x30, 0x30, 0x35, 0x63, 0x66, 0x66, 0x66, 0x66, 0xBF]
- service: asakuki_color_orange
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x66, 0x66, 0x34, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x66, 0x66, 0x66, 0x66, 0x66, 0xb4]
- service: asakuki_color_yellow
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x66, 0x66, 0x63, 0x30, 0x30, 0x30, 0x30, 0x30, 0x32, 0x64, 0x66, 0x66, 0x66, 0x66, 0xe1]
- service: asakuki_color_green2
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x30, 0x30, 0x66, 0x66, 0x34, 0x32, 0x30, 0x30, 0x38, 0x37, 0x66, 0x66, 0x66, 0x66, 0x8d]
- service: asakuki_color_blue
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x30, 0x30, 0x63, 0x33, 0x66, 0x66, 0x30, 0x30, 0x63, 0x33, 0x66, 0x66, 0x66, 0x66, 0xe4]
- service: asakuki_color_pink
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x66, 0x66, 0x30, 0x30, 0x61, 0x38, 0x30, 0x31, 0x34, 0x31, 0x66, 0x66, 0x66, 0x66, 0xb7]
- service: asakuki_color_red1
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x66, 0x66, 0x30, 0x30, 0x32, 0x34, 0x30, 0x31, 0x36, 0x30, 0x66, 0x66, 0x66, 0x66, 0x85]
- service: asakuki_color_red2
then:
- uart.write: [0x55, 0xaa, 0x00, 0x06, 0x00, 0x12, 0x6c, 0x03, 0x00, 0x0e, 0x66, 0x66, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x66, 0x66, 0x66, 0x66, 0x78]
ota:
In the future I hope to use the ‘fan’ component so homeassistant will show better controls for off/low/high and a colorpicker for the LED - perhaps even effects- why not.