[DEPRECATED] Tasmota 7.x/8.x firmware for Hubitat + Tuya, Sonoff and other drivers

The Martin Jerry dimmers(SD01 & SD02) are a special case. They handle syncing of all the on-board LEDs and the main dimming using the ESP chip firmware, instead of a secondary chip. This is erased when you install tasmota. So if you want the led bar to sync, you either have to install a 3rd party tasmota with support added for the LEDs or you have to write tasmota rules on the device to do it.

1 Like

Have you tried this with the rules? Do they work as well as the 3rd party firmware? I could easily add the rules to auto-install from the new driver, but no use doing so if they don't work well.
That 3rd party firmware would have issues staying in-sync with HE as long as there is no MQTT support added to my driver. No dimmer changes FROM the device would arrive to HE.

1 Like

Sorry, I haven't tried it with the rules. I don't use the dimming functions on mine. I only use it for the buttons; to send commands to run hubitat routines. It was my understanding that it is a little laggy though. But perhaps someone else has experience using it as a dimmer.

1 Like

Ok, anyone who has and want it as part of the driver, tell me and we can look at that.

1 Like

I’m willing to work on it.
My alternative is to give a tasmota implementation that supports the device.

1 Like

That route will require MQTT or that you merge my modified Tasmota firmware with the Digiblur one... Unless you're very confident in your ability to code for embedded system, I wouldn't recommend it.

Let's do that then, I really hope we can get the rules fast enough, I'll help with them to make them as fast as can be, but I don't have any of these devices and doubt I can get them where I live, even though they're produced here. I assume there's one or many tickets in the official Tasmota GitHub, start by finding those and we can go from there.

1 Like

markus, sent you a pm. Figure we would take this offline

2 Likes

Worked with @theisgroup and came up with the following for the MJ-SD02:

Use this template:
{"NAME":"MJ-SD02","GPIO":[19,18,0,33,34,32,255,255,31,37,30,126,29],"FLAG":15,"BASE":18}

And run these two commands:

rule1 on Button3#state=2 do dimmer + endon on Button2#state=2 do dimmer - endon on Button2#state=3 do dimmer 20 endon on Button3#state=3 do dimmer 100 endon on Button1#state=2 do power1 2 endon on Button1#state=3 do power1 0 endon
backlog SerialLog 0; setoption3 1; setoption1 1; setoption32 8; buttontopic 0; setoption113 1; rule1 1; module 0;

It will now work as a dimmer. All LEDs except the two connected to the relay can be controlled separately. The new driver which will go into closed Beta soon will auto-detect this device.

EDIT: Double-clicking the up (Button 3) or down (Button 2) button will activate LED3 and LED2, respectively.
All these commands and settings are added automatically when using the new and upcoming driver.

1 Like

@gzisimatos It turns out my model is slightly different from yours, I flashed mine with Tuya Convert, very easy... :slight_smile:

When you flash yours, tell me and I will need you to run some commands in the web console and send the output to me.

1 Like

Can you tell me please which Tasmota Hubitat driver I should use after flashing with Tuya Convert in order to have access to the commands below Maxcio 400ml Aromatherapy Diffuser

1 Like

Those are not "commands" per say.

All the info on setting up and using those is linked to in the link you provided.

Straight from that page is all the info on setting up and using the commands. Markus doesn't tend to remove features from his firmware so any version should work, you just need to follow the instructions carefully.

From that page:

Please read TuyaMCU article to understand the terminology and configuration process.

There are a few different looking devices using the same PCB marked GD-HDFW05-v1.0 so this process should work on those.

Functions

dpID 1 device power: 0 = off / 1 = on
dpID 11 led power: 0 = off / 1 = on
dpID 12 error notification: 0 = ok / 1 = error
dpID 13 countdown mode options: 0 = off / 1 = 1hr / 2 = 3hr not needed with Tasmota
dpID 14 countdown status: reports value of 0…360 minutes not needed with Tasmota
dpID 103 mist strength: 0 = low / 1 = high
dpID 108 led color: 14 char value in hex (can define only RGB and send HSV value as max: RRGGBBffff6464 )
dpID 110 led mode: 0 = rgb_cycle / 1 = color / 2 = white
dpID 110 led dimmer color and white modes only it is important to define ‘DimmerRange 1,255’

Configuration

After applying the template and configuring Wi-Fi and MQTT issue

Backlog SetOption66 1; TuyaMCU 21,111; TuyaMCU 11,1; TuyaMCU 12,11; TuyaMCU 13,103; TuyaMCU 14,12; TuyaMCU 15,110; DimmerRange 1,255; SetOption59 1
Rule1 on TuyaReceived#data=55AA000700056E040001007E do publish2 stat/GD-30W/EFFECT rgb_cycle endon on TuyaReceived#data=55AA000700056E040001017F do publish2 stat/GD-30W/EFFECT color endon on event#rgb_cycle do tuyasend4 110,0 endon on event#color do tuyasend4 110,1 endon on event#ON do backlog tuyasend4 110,1; tuyasend 11,1 endon on event#off do tuyasend1 11,0 endon on power3#state=1 do tuyasend4 103,1 endon on power3#state=0 do tuyasend4 103,0 endon
Rule1 1

Optional rule used to prevent the device going into countdown mode (f.e. using on device controls) and complete MCU status update on restart

Rule3 on TuyaReceived#data=55AA000700050D040001011E do tuyasend4 13,0 endon on TuyaReceived#data=55AA000700050D040001021F do tuyasend4 13,0 endon on mqtt#connected do serialsend5 55aa0001000000 endon
Rule3 1

What you get

  • Relay1 turns the diffuser on or off in stored mist strength mode, turns led on or off in stored mode and serves as device power status
  • Relay2 turns light on or off and serves as light power status.
  • Relay3 mist strength status and control using Rule1
  • Relay4 is used for error status (ON = error), no control
  • Relay5 is used for light mode status (0 = rgb_cycle, 1 = color), no control

Label webUI buttons:

Backlog WebButton1 Power; WebButton2 Light; WebButton3 Mist; WebButton4 Error; WebButton5 Light Mode

LED mode status is reported to mqtt topic stat/GD-30W/EFFECT and command Event is used to control some functions using TuyaSend4 command. All this is defined in Rule1

Color can be changed using TuyaSend3 108,RRGGBB64646464 (RR, GG and BB are hex value) only in color mode.

Dimming works using slider and Dimmer command but only when in color mode, in rgb_cycle there are no brightness controls.

Long press on device’s power button initiates Tasmota’s Wi-Fi config

Home Assistant configuration

This implementation is suited to specific needs and does not incorporate all features of the device, mostly to avoid weird situations and wrong states being reported.

Fan is the diffuser. Oscillation switch is used to toggle between rgb_cycle (oscillation on) and color (oscillation off).
Light component is the device’s RGB light but only when its in color mode, when in rgb_cycle mode light state in HA is off since you cannot control anything anyway.
Binary sensor uses the dpId 12 to show when the diffuser is out of water.

configuration.yaml

fan:
    - platform: mqtt
      name: "Diffuser"
      availability_topic: "tele/GD-30W/LWT"
      payload_available: "Online"
      payload_not_available: "Offline"
      state_topic: "tele/GD-30W/STATE"
      state_value_template: "{{ value_json.POWER1 }}"
      command_topic: "cmnd/GD-30W/POWER1"
      payload_on: "ON"
      payload_off: "OFF"
      speed_state_topic: "tele/GD-30W/STATE"
      speed_value_template: "{{ value_json.POWER3 }}"
      speed_command_topic: "cmnd/GD-30W/POWER3"
      payload_low_speed: "OFF"
      payload_high_speed: "ON"
      oscillation_state_topic: "stat/GD-30W/EFFECT"
      oscillation_command_topic: "cmnd/GD-30W/EVENT"
      oscillation_value_template: "{{ value }}"
      payload_oscillation_on: "rgb_cycle"
      payload_oscillation_off: "color"
      qos: 1
      speeds:
        - low
        - high
light:
    - platform: mqtt
      name: "Diffuser Lamp"
      command_topic: "cmnd/GD-30W/EVENT"
      state_topic: "tele/GD-30W/STATE"
      state_value_template: "{% if value_json.POWER2 == 'ON' %}{% if value_json.POWER5 == 'ON' %}ON{% else %}OFF{% endif %}{% else %}OFF{% endif %}"
      payload_on: "ON"
      payload_off: "OFF"
      brightness_command_topic: "cmnd/GD-30W/Dimmer"
      brightness_state_topic: "tele/GD-30W/RESULT"
      brightness_scale: 100
      # brightness_value_template: "{{ value_json.Dimmer }}"
      brightness_value_template: "{% if value_json.TuyaReceived is defined and value_json['TuyaReceived'].DpId == 108 %}{{ value_json['TuyaReceived'].Type3Data[12:14]|int(base=16) }}{% endif %}"
      availability_topic: "tele/GD-30W/LWT"
      payload_available: "Online"
      payload_not_available: "Offline"
      qos: 1
      retain: false
      rgb_command_topic: "cmnd/GD-30W/tuyasend3"
      rgb_command_template: "{% set brightness = state_attr('light.diffuser_lamp','brightness') | int %}{{ '108,%02x%02x%02x646464' | format(red, green, blue)}}{{ '%02x' | format(brightness) }}"
      rgb_value_template: "{% if value_json.TuyaReceived is defined and value_json['TuyaReceived'].DpId == 108 %}{{ (value_json['TuyaReceived'].Type3Data[0:2]|int(base=16),value_json['TuyaReceived'].Type3Data[2:4]|int(base=16),value_json['TuyaReceived'].Type3Data[4:6]|int(base=16)) | join(',')}}{% endif %}"
      rgb_state_topic: "tele/GD-30W/RESULT"

binary_sensor:
    - platform: mqtt
      name: "Aromatherapy Water"
      state_topic: "stat/GD-30W/POWER4"
      payload_on: "ON"
      payload_off: "OFF"
      availability_topic: "tele/GD-30W/LWT"
      payload_available: "Online"
      payload_not_available: "Offline"
      qos: 1
      device_class: problem
1 Like

There is no driver to use yet, I would need to know the output of the following two commands to be sure which version of this type of device you really have. First flash the device and configure with module 54, then run these two commands, in the web console of the device, and PM me the results:

SerialSend5 55aa0001000000
status 0

Once you have given me the output of those commands, I will know if the details on the page you linked to and @anon62731458 moved into the thread above fully applies to your model or if there are modifications needed.

When it comes to a HE driver, there will be one ones I have all the information I need, but it could take a few days before I have time.

1 Like

Hi Markus. Did you get the 2 gang dimmer in the mail? Have you made any progress with it?

1 Like

They’ve not even shipped it yet, if it’s not food it is basically not shipped domestically right now :frowning:

1 Like

Oh wow. Scary.

1 Like

Some things are getting to be more "normal", shipping isn't one of those things. I ordered coffee from my favorite supplier 2 weeks ago, they still haven't delivered :frowning:

1 Like

ANNOUNCEMENT
The Closed Beta has started, there is no documentation for how things work, but for those who have the time and knowledge to run without instructions, PM me and I'll add you to the Closed Beta thread. The Driver is very stable, so is the App. Some minor features planned for the final release are still missing, but the main things missing are more testing and documentation. Here are some screenshots:






1 Like

Can confirm the beta drivers are working great.

App can quickly install devices. if not using the app no need to manually select drivers anymore, just install the parent and the drivers do the rest creating a child with the proper drivers used.

My last test run i was able to install over 45 tasmota based devices from scratch in under 5 minutes and all chose proper drivers and just work.

2 Likes

The new driver/app works well and I like how the info is displayed in the app. Very clear what devices are under this apps control

2 Likes

Markus sorry for the delay I was away from home.
After flashing I only configured the device Tuya MCU without applying template or anything else.
Find output below:

00:00:00 CFG: Loaded from flash at FA, Count 10
00:00:00 APP: Some settings have been reset (2)
00:00:00 Project tasmota Tasmota Version 7.1.2(basic)-2_6_1
00:00:00 SNS: Hardware Serial
00:00:00 TYA: MCU Product ID: 6ASdNwe9IdaewQEl1.0.0
00:00:00 WIF: Connecting to AP1 Puffy in mode 11N as tasmota-5991...
00:00:07 WIF: Connected
00:00:07 HTP: Web server active on tasmota-5991 with IP address 192.168.1.16
18:36:26 RSL: tele/tasmota/INFO1 = {"Module":"Tuya MCU","Version":"7.1.2(basic)","FallbackTopic":"cmnd/DVES_DF7767_fb/","GroupTopic":"cmnd/tasmotas/"}
18:36:26 RSL: tele/tasmota/INFO2 = {"WebServerMode":"Admin","Hostname":"tasmota-5991","IPAddress":"192.168.1.16"}
18:36:26 RSL: tele/tasmota/INFO3 = {"RestartReason":"Software/System restart"}
18:36:26 RSL: stat/tasmota/RESULT = {"POWER":"OFF"}
18:36:26 RSL: stat/tasmota/POWER = OFF
18:36:30 RSL: tele/tasmota/STATE = {"Time":"2020-02-22T18:36:30","Uptime":"0T00:00:14","UptimeSec":14,"Vcc":3.692,"Heap":31,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"POWER":"OFF","Wifi":{"AP":1,"SSId":"Puffy","BSSId":"30:D3:2D:CF:AF:B2","Channel":6,"RSSI":80,"LinkCount":1,"Downtime":"0T00:00:08"}}
18:37:54 CMD: SerialSend5 55aa0001000000
18:37:54 RSL: stat/tasmota/RESULT = {"SerialSend":"Done"}
18:37:54 TYA: MCU Product ID: 6ASdNwe9IdaewQEl1.0.0
18:38:18 CMD: status 0
18:38:18 RSL: stat/tasmota/STATUS = {"Status":{"Module":54,"FriendlyName":["Tasmota"],"Topic":"tasmota","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
18:38:18 RSL: stat/tasmota/STATUS1 = {"StatusPRM":{"Baudrate":9600,"GroupTopic":"tasmotas","OtaUrl":"http://thehackbox.org/tasmota/release/tasmota.bin","RestartReason":"Software/System restart","Uptime":"0T00:02:02","StartupUTC":"2020-02-22T17:36:16","Sleep":50,"CfgHolder":4617,"BootCount":3,"SaveCount":12,"SaveAddress":"F8000"}}
18:38:18 RSL: stat/tasmota/STATUS2 = {"StatusFWR":{"Version":"7.1.2(basic)","BuildDateTime":"2019-12-06T11:24:46","Boot":31,"Core":"2_6_1","SDK":"2.2.2-dev(38a443e)","Hardware":"ESP8266EX"}}
18:38:18 RSL: stat/tasmota/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Puffy",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00C08009","2805C8000100060000005A00000000000000","00000000","00000000"]}}
18:38:18 RSL: stat/tasmota/STATUS4 = {"StatusMEM":{"ProgramSize":458,"Free":544,"Heap":30,"ProgramFlashSize":1024,"FlashSize":2048,"FlashChipId":"1540C8","FlashMode":0,"Features":["00000809","8F082383","041083A0","20021706","010001C0","00000000"],"Drivers":"1,2,3,4,9,10,16,20,21","Sensors":"3"}}
18:38:18 RSL: stat/tasmota/STATUS5 = {"StatusNET":{"Hostname":"tasmota-5991","IPAddress":"192.168.1.16","Gateway":"192.168.1.254","Subnetmask":"255.255.255.0","DNSServer":"192.168.1.254","Mac":"CC:50:E3:DF:77:67","Webserver":2,"WifiConfig":4}}
18:38:18 RSL: stat/tasmota/STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_DF7767","MqttUser":"DVES_USER","MqttCount":0,"MAX_PACKET_SIZE":1000,"KEEPALIVE":30}}
18:38:18 RSL: stat/tasmota/STATUS7 = {"StatusTIM":{"UTC":"Sat Feb 22 17:38:18 2020","Local":"Sat Feb 22 18:38:18 2020","StartDST":"Sun Mar 29 02:00:00 2020","EndDST":"Sun Oct 25 03:00:00 2020","Timezone":"+01:00","Sunrise":"07:46","Sunset":"18:21"}}
18:38:18 RSL: stat/tasmota/STATUS10 = {"StatusSNS":{"Time":"2020-02-22T18:38:18"}}
18:38:18 RSL: stat/tasmota/STATUS11 = {"StatusSTS":{"Time":"2020-02-22T18:38:18","Uptime":"0T00:02:02","UptimeSec":122,"Vcc":3.691,"Heap":30,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"POWER":"OFF","Wifi":{"AP":1,"SSId":"Puffy","BSSId":"30:D3:2D:CF:AF:B2","Channel":6,"RSSI":76,"LinkCount":1,"Downtime":"0T00:00:08"}}}

1 Like