Sonoff D1 Dimmer #947
-
Hi. Looking to add a dimmer to control a ceramic heat lamp. I've seen in the documentation that the Sonoff D1 dimmer is supported, but there's a note that it should be flashed with the Tasmota firmware. Still this device supports a DIY mode which will open the API... https://theroamingworkshop.cloud/b/en/1989/sonoff-d1-dimmer/ This is not supported at this time right? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 17 replies
-
At this moment, this dimmer is only supported when flashed with Tasmota. I did not own this device, and somebody had this one with Tasmota. And you are the first asking for the Sonof own API. So for now, it is easier for me to ask you to flash your Sonof dimmer with Tasmota, so it will work. When I have to make new code, it needs to be tested etc. That takes more time, and can make it more complicated. 1 device 2 ways of connecting. Creating your own script dimmer relay can also work. |
Beta Was this translation helpful? Give feedback.
-
OK. I think I'll be getting one (they are cheap) and try to create a script for the DIY mode. If I manage to make it work I'll share the script, might be better to support it out of the box. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Made it work and was quite easy actually. So the Sonoff D1 dimmer does work on DIY mode without the need to flash the Tasmota firmware (which is already supported by TerrariumPI). In order to set it in DIY mode you'll need the RF remote as the dimmer do not have any button. Both are very affordable at the moment. You can find the instructions here: https://sonoff.tech/diy-developer/ Also check TRW's detailed tutorial here: https://theroamingworkshop.cloud/b/en/1989/sonoff-d1-dimmer/ Once the dimmer is in DIY mode and connected to the wifi network the device will listen at it's assigned ip and port 8081. The ip should be known and configured as static in the network. Then you can retrieve and command the device through the documented API: https://sonoff.tech/sonoff-diy-developer-documentation-d1-http-api/ I've used the provided script dimmer to build a script to interact with the dimmer. I've attached the script file which has a lot of comments and should be very self-explanatory. Product page: https://sonoff.tech/product/smart-lighting/d1/ I believe any Sonoff device which supports DIY mode could be easily operated the same way. |
Beta Was this translation helpful? Give feedback.
-
OK. I've setup the area back to my script. Deleted the new relay, added it again this time without being assigned to any area. It seems it's now failing on the reading: 2024-09-27 21:44:31,131 - WARNING - terrariumRelay - Could not take a new measurement from relay sonoff_d1-dimmer dimmer named 'Heat Lamp' at address 'http://192.168.0.37:8081'. Tried for 1.01 seconds. Skipping this update. I can ping the address and run my script from the command line which works fine and points to this address:port Can I provide any other meaningful data? |
Beta Was this translation helpful? Give feedback.
At this moment, this dimmer is only supported when flashed with Tasmota.
I did not own this device, and somebody had this one with Tasmota. And you are the first asking for the Sonof own API.
So for now, it is easier for me to ask you to flash your Sonof dimmer with Tasmota, so it will work. When I have to make new code, it needs to be tested etc. That takes more time, and can make it more complicated. 1 device 2 ways of connecting.
Creating your own script dimmer relay can also work.