Tasmota Dimmer Sonoff D1

I flashed the Sonoff D1 Dimmer with Tasmota and all went well.

Unfortunately nymea doesn’t see this device as a dimmer and I can only turn the dimmer on and off.

Is there a way to tweak it or is some development necessary?

Regards,

André

Hi @Foenky

To make the plugin work properly with dimming, there’s some development needed. I’ve looked into the code and the tasmota docs, but couldn’t see right away what the actual commands for dimming would be and I don’t have such a device to test with.

You could do some things to help with this:
Enable the Tasmota logs through the debug interface and watch the logs. Use the web interface on the tasmota device to dim up and down and see what MQTT messages come in.

Hi Michael,

I did some dimming of the D1 after configuring logging and here are the results:

I | Tasmota: Publish received from Sonoff thing: “cafa7a45265a4184828e92c7090409a8/sonoff/RESULT” {“POWER”:“OFF”}
I | Tasmota: Publish received from Sonoff thing: “cafa7a45265a4184828e92c7090409a8/sonoff/POWER” OFF
W | Thing: No such state type “{00000000-0000-0000-0000-000000000000}” in “Halogeenverlichting Keuken” “(sonoff_basic)”
I | Tasmota: Publish received from Sonoff thing: “cafa7a45265a4184828e92c7090409a8/sonoff/RESULT” {“POWER”:“ON”}
I | Tasmota: Publish received from Sonoff thing: “cafa7a45265a4184828e92c7090409a8/sonoff/POWER” ON
W | Thing: No such state type “{00000000-0000-0000-0000-000000000000}” in “Halogeenverlichting Keuken” “(sonoff_basic)”
I | Tasmota: Publish received from Sonoff thing: “cafa7a45265a4184828e92c7090409a8/sonoff/RESULT” {“POWER”:“ON”,“Dimmer”:49}
I | Tasmota: Publish received from Sonoff thing: “cafa7a45265a4184828e92c7090409a8/sonoff/RESULT” {“POWER”:“ON”,“Dimmer”:83}
I | Tasmota: Publish received from Sonoff thing: “cafa7a45265a4184828e92c7090409a8/sonoff/RESULT” {“POWER”:“ON”,“Dimmer”:34}
I | Tasmota: Publish received from Sonoff thing: “f0381263fef3415b9240623097bfd952/sonoff/STATE” {“Time”:“2021-04-11T22:55:25”,“Uptime”:“3T13:18:03”,“UptimeSec”:307083,“Vcc”:3.442,“Heap”:31,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:13,“POWER”:“ON”,“Wifi”:

Hope this helps.

Regards,

André

Yes, that was helpful, I think…

I’ve added some code that should hopefully handle it… It’s building in experimental. There’s a new thing now named Tasmota Dimmer. Please test it and report back if it works.

1 Like

Thanks for the quick coding Michael!

Unfortunately it doesn’t work yet.

The logging (Power on, Off, On, dimmer change, dimmer change, power off)

I | Tasmota: Publishing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/cmnd/” “{\n “Dimmer”: 1\n}\n”
W | Tasmota: Unhandled execute action call for devie Thing(“Dimmer Keukenverlichting”, id: “{3162b38f-4b55-475f-b7bc-b417f11f9b42}”, ThingClassId: “{4fb65caa-7f84-4496-91f6-1cd35574cc2e}”)
I | Tasmota: Publish received from Sonoff thing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/RESULT” {“Command”:“Unknown”}
I | Tasmota: Publishing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/cmnd/” “{\n “Dimmer”: 0\n}\n”
W | Tasmota: Unhandled execute action call for devie Thing(“Dimmer Keukenverlichting”, id: “{3162b38f-4b55-475f-b7bc-b417f11f9b42}”, ThingClassId: “{4fb65caa-7f84-4496-91f6-1cd35574cc2e}”)
I | Tasmota: Publish received from Sonoff thing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/RESULT” {“Command”:“Unknown”}
I | Tasmota: Publishing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/cmnd/” “{\n “Dimmer”: 1\n}\n”
W | Tasmota: Unhandled execute action call for devie Thing(“Dimmer Keukenverlichting”, id: “{3162b38f-4b55-475f-b7bc-b417f11f9b42}”, ThingClassId: “{4fb65caa-7f84-4496-91f6-1cd35574cc2e}”)
I | Tasmota: Publish received from Sonoff thing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/RESULT” {“Command”:“Unknown”}
I | Tasmota: Publishing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/cmnd/” “{\n “Dimmer”: 29\n}\n”
W | Tasmota: Unhandled execute action call for devie Thing(“Dimmer Keukenverlichting”, id: “{3162b38f-4b55-475f-b7bc-b417f11f9b42}”, ThingClassId: “{4fb65caa-7f84-4496-91f6-1cd35574cc2e}”)
I | Tasmota: Publish received from Sonoff thing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/RESULT” {“Command”:“Unknown”}
I | Tasmota: Publishing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/cmnd/” “{\n “Dimmer”: 63\n}\n”
W | Tasmota: Unhandled execute action call for devie Thing(“Dimmer Keukenverlichting”, id: “{3162b38f-4b55-475f-b7bc-b417f11f9b42}”, ThingClassId: “{4fb65caa-7f84-4496-91f6-1cd35574cc2e}”)
I | Tasmota: Publish received from Sonoff thing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/RESULT” {“Command”:“Unknown”}
I | Tasmota: Publishing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/cmnd/” “{\n “Dimmer”: 0\n}\n”
W | Tasmota: Unhandled execute action call for devie Thing(“Dimmer Keukenverlichting”, id: “{3162b38f-4b55-475f-b7bc-b417f11f9b42}”, ThingClassId: “{4fb65caa-7f84-4496-91f6-1cd35574cc2e}”)
I | Tasmota: Publish received from Sonoff thing: “3162b38f4b55475fb7bcb417f11f9b42/sonoff/RESULT” {“Command”:“Unknown”}

I think it needs a power “on” command instead of "dimmer:1"

For power on it should be like (logging from a sonoff mini):

I | Tasmota: Publishing: “0e3531d64fe94d3e824292c9eaf60711/sonoff/cmnd/POWER” ON
I | Tasmota: Publish received from Sonoff thing: “0e3531d64fe94d3e824292c9eaf60711/sonoff/RESULT” {“POWER”:“ON”}
I | Tasmota: Publish received from Sonoff thing: “0e3531d64fe94d3e824292c9eaf60711/sonoff/POWER” ON
W | Thing: No such state type “{00000000-0000-0000-0000-000000000000}” in “Halogeenverlichting Uitbouw” “(sonoff_basic)”
I | Tasmota: Publishing: “0e3531d64fe94d3e824292c9eaf60711/sonoff/cmnd/POWER” OFF
I | Tasmota: Publish received from Sonoff thing: “0e3531d64fe94d3e824292c9eaf60711/sonoff/RESULT” {“POWER”:“OFF”}
I | Tasmota: Publish received from Sonoff thing: “0e3531d64fe94d3e824292c9eaf60711/sonoff/POWER” OFF
W | Thing: No such state type “{00000000-0000-0000-0000-000000000000}” in “Halogeenverlichting Uitbouw” “(sonoff_basic)”

For dimming i’m not sure what to use, but I think it should be:

"3162b38f4b55475fb7bcb417f11f9b42/sonoff/cmnd/dimmer" 40

Thanks again for the great support! Hope you can change this so the Sonoff D1 is also working.

Regards,

André

Hi, please try again with the latest packages. At least turning on/off should now work. Let’s hope dimming works too

1 Like

Hi Michael,

It works perfectly!
Thanks and keep up the good work!

André

1 Like