forked from blakadder/templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoil_diffuser_550ml
87 lines (72 loc) · 3.27 KB
/
oil_diffuser_550ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
date: 2019-05-05
title: Oil Diffuser 550ML
category: misc
type: Humidifier
standard: global
link: https://www.aliexpress.com/item/550ML-APP-Control-Essential-Oil-Aroma-Diffuser-With-Wood-Grain-Air-Humidifier-Aromatherapy-Diffuser-For-Home/32983725049.html
image: https://user-images.githubusercontent.com/5904370/57200999-010cc300-6f93-11e9-8fbe-ad02435e367f.png
template: '{"NAME":"Oil Diffuser","GPIO":[255,255,255,255,255,255,255,255,255,255,255,21,22],"FLAG":0,"BASE":18}'
link_alt:
---
Flashed via serial by using TYWE3S pins. Might work with Tuya Convert.
This device has everything controlled via the MCU. It does not work with Tuya Dimmer module due to additional features and different command values.
For the device to be fully supported the [Tuya driver](https://raw.githubusercontent.com/arendst/Sonoff-Tasmota/development/sonoff/xdrv_16_tuyadimmer.ino) would need a major code rewrite.
I've configured some rules to get basic functionality and [configure](https://gist.github.com/blakadder/807df02fcaf88e2b059e7b8d008c1881) it in Home Assistant.
Rule2 notes:
Relay1 controls the diffuser: intermittent mode / off (you can change the code to a mode of your choice)
Relay2 controls the device LED: white / off (you can change the codes to a color mode of your choice)
Rule3 notes:
First rule string is required, otherwise your device might not respond to serial commands on reboots.
Fan speed is published to a retained mqtt topic and can be controlled via mqtt command `cmnd/diffuser/Event high` or `low`.
**If you use the device buttons or the remote, the state won't be recorded in Tasmota and your power states will be out of sync**
```lua
Rule2 on power1#state=1 do serialsend5 55AA00060005020400010213 endon on power1#state=0 do serialsend5 55AA00060005020400010011 endon on power2#state=1 do serialsend5 55AA00060005060400010217 endon on power2#state=0 do serialsend5 55AA00060005060400010015 endon
Rule3 on system#boot do backlog baudrate 9600; seriallog 2; serialsend5 55aa000300010306 endon on event#high do backlog serialsend5 55AA00060005650400010175; publish2 stat/diffuser/FAN high endon on event#low do backlog serialsend5 55AA00060005650400010074; publish2 stat/diffuser/FAN low endon
```
Here's a list of captured serial codes:
```lua
set wifi led state
55aa000300010306
diffuser off
55AA00060005020400010011
continuous mode
55AA00060005020400010112
intermittent mode
55AA00060005020400010213
countdown mode
55AA00060005020400010314
countdown 1 min
55AA0006000866020004000000017A
countdown 1 hr
55AA00060008660200040000003CB5
countdown 3 hr
55AA0006000866020004000000B42D
high speed
55AA00060005650400010175
low speed
55AA00060005650400010074
dimmer 0%
55AA0006000807020004000000001A
dimmer 100%
55AA0006000807020004000000FF19
light on
55AA00060005060400010318
light off
55AA00060005060400010015
white light
55AA00060005060400010217
rgb cycle
55AA00060005060400010116
color green
55AA000600120803000E31316666303030303734363436345D
color blue
55AA000600120803000E3030313566663030656136343634BC
color yellow
55AA000600120803000E666665363030303033353634363493
color red
55AA000600120803000E666630303039303136353634363465
color purple
55AA000600120803000E6666303065653031333036343634BE
```
[](https://postimg.cc/WhDDWks9)