-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for shelly dimmer #6914
Comments
Shelly didn't start shipping those devices. No one have them, so we don't know if Tasmota can be flashed or not on them. Anyway, The stock firmware of Shelly supports MQTT, so if Tasmota don't work, you can still use them with your Home Automation Software. I have pre-ordered those a month ago, so I will test them as soon as they arrive. |
@ascillato thank you for your quick answer. good hint regarding the mqtt support from the stock firmware.... |
👍 |
My shelly dimmers arrived today. Have you had any time to see if Tasmota can be flashed on to them? Sorry to bother you. |
Hi, Mine have arrived too. It has an ESP8266, so it might be possible to use Tasmota on it, but will require some more research due to it uses several other chips for controlling the dimming. So, please be patient ;) |
Some high res photos provided by @dino on Discord - for future reference: |
Maybe an email to their support dept. Asking for a simple sketch to demo dimming? Can't hurt to ask... |
I had two delivered over the weekend along with a Shelly 1PM. Got tasmota successfully flashed on the 1PM, but no joy with the dimmers. I was using the diagram from the Shelly site for the header pin-outs but the programmer could not connect. This evening I wired up both dimmers and set them up with the Shelly software and new firmware was available, so have updated them but not tried to re-flash yet. D |
I successfully flashed the dimmer! |
Great news SwedishChef, when you say ‘mirrored’ do you mean they’ve got ‘top to bottom’ mixed up? D |
The problem is that after opening the housing and flashing I recognized that the device was turned around 180 degrees compared to the pin-out picture on shell home page. |
Yup, got mine flashed as well, now moving on to the GPIO assignments. |
@djhk739 please share your results for GPIO assignment here - many thanks. PS: still no answer from shell.org regarding this ;-( |
I've sent them an email re. tasmota template support 2 days ago as well, but no replay so far. |
Where can I get this template? What's the current status, please? |
There is no Tasmota template for shelly dimmer at this moment. It requires more code modifications and reverse engineering. It will take some time on being developed. As soon as it becomes available, it is going to be announced here and in the Tasmota support chat. By now, you can use Shelly Dimmer with stock firmware. It has mqtt support and there is also an automatic discovery for shelly devices if you use home assistant with hacs component. |
Thanks a lot for your efforts! Highly appreciated. |
Anyone heard back from Shelly yet? I had a reply to my request for the source code and/or schematics as the product is sold as "open-source" (written on the box packaging). Turns out it's not open-source at all and they're not going to give me the code :/ So I've asked for an example sketch to highlight how to perform dimming instead.... |
Just for me to understand the problem: |
As explained in previous comments. Shelly dimmer has other mcu to control dimming. It requires a new driver to be coded and a lot of reverse engineering. Tasmota is not going to work as it is now. |
Aaah, I asked them the same question but with no answer. |
an STM32 with all flash/debug pins broken out ... interesting! |
I followed the esp8266 rx/tx traces and both are connect via 200R resistors to the stm32 PA9/PA10. Did someone manage to dump the flash of the esp? I'm unable to connect with esptool.py. |
Snooping the esp gpio whilst sending dim commands would be a good start. My logic analyser is not mains rated so I can't do this. |
I did make some progress ... Digging into firmware shows, that shelly dimmer is based on rBoot with dual image support and 256k spiffs. spiffs holds an stm.bin file which is very likely an stm32 firmware image!? Maybe shelly dimmer also supports OTA update of the stm32 MCU? |
@jamesturton, Once this firmware is merged back into the stable branch of Tasmota, is it going to be necessary to flash the STM32 chip separately to flashing Tasmota onto the dimmer, or is the STM32 firmware somehow going to be embedded in the Tasmota firmware? And if it is necessary to flash the STM32 in a separate process, can you please point me to a resource to help through that? |
@alistercole Tasmota will handle updating the STM32. You will not have to flash the STM32 with a ST-Link programmer if that's what you mean. |
Closing as this support has been added. Thanks a lot for the huge hard work done here 👍 |
Thanks @jamesturton !!! |
@rbswift I've tried to reproduce the flickering error you are seeing but I can't seem to do it. If you (or @daxy01) are still having problems then make a new issue and tag me in it and I can try and help you out again. It would be good if you could post a video of the flickering so I can get more of an idea of what the cause might be. |
In my instance the flickering feels like a too-low refresh rate of the lamps. I cannot record is at normal speed (guess the phone refresh rate is of effect as well), but when I record as slow-motion it will be visible. I did check slow mo recording of a regular non-dimmed bulb and there it is constant on. |
@daxy01 thank you for your installation instructions - #6914 (comment) - I used this and flashed my Shelly 1 (UK) with no problems. I'm using 3x GU10 5watt lamps and after adjusting the minimum brightness to 15 they work very well. Can I ask though how you managed to find the download link for v1.3? Just in case I need to update the Tasmota version in future. Or an I just go through the OTA update option on the WebUI now? FYI anyone who wants to use this with Alexa (I do not use HA), set emulation to Hue and it'll be found. |
...Also energy monitoring (wattage) and temperature seem off. My Shelly 1 shows 7W constant with the LED's off or on and the temperature stays around 41c regardless. Not sure if these issues are to be listed here of if I need to open a separate ticket? |
I wasn't noticing this before but I definitely notice it now. If I look directly at the bulb then the flickering isn't there, but if I look away I notice it on all 3. It becomes more noticable when the bulbs are brighter but that seems like an obvious thing. This definitely didn't happen on original firmware - I've had the Shelly installed since February this year. |
Hi @jamesturton Do I need to create a new post or am I okay to continue here? My Shelly 'flickering' since updating has gotten to a point where I'm unable to use it now (it hasn't gotten worse, I just notice it more) and have replaced the Shelly with an on/off switch. Unfortunately I didn't take a backup of the original Shelly firmware (not sure if I was ever able to) so cannot revert back. Do you require any logs etc from me to try and diagnose/fix the issue? |
@digitalface Can you make a new issue on the shelly-dimmer-stm32 firmware repo? |
I've created a new issue. Thanks! |
Quick heads-up: The Template has changed between James's test version and the version included in Tasmota dev build. |
Do you happen to know where the wifi antenna/connector is? Trying to add a small external antenna to this in an effort to boost wifi connectivity reliability. |
@fretzy99 The antenna is the stiff copper wire sticking out of the board. It looks like it might be possible to solder a U.FL connector between the antenna pad (after removing the internal antenna first) and then using a U.FL to SMA cable out of the housing. |
Add some hints from jamesturton/shelly-dimmer-stm32#11 and arendst/Tasmota#6914
I'm curious, is there a particular reason why we flash a custom firmware into the STM32? From Tasmota's point of view isn't the STM32 just like any other custom peripheral like a CSE7766 or the MCU in Tuya devices? |
@AndreKR There is no strict requirement for flashing the custom firmware to the STM. The custom STM firmware was designed to use the same communication protocol as the stock firmware. But I believe Shelly has now made changes to the protocol which make it incompatible, and since Shelly have always ignored or rejected our requests for them to publish the protocol they use, we have had to reverse engineer it which takes time... The other main reason is that the alternative firmware is open-source so others have contributed fixes to 'flickering' problems which have been seen with the stock firmware and earlier versions of the open-source firmware. |
Just to put this here for google with regards tot he Shelly Dimmer 2. I couldn't find anywhere what ESP_DBG_TX was used for, and after a quick probe, it seems to go to GPIO02, which would be UART1_TX (second UART) according to some sources for the ESP8266EX. I saw that https://templates.blakadder.com/shelly_Dimmer_2.html puts it as 'None' which I think is probably wrong, but clicking the 'edit' button didn't yield anything that I could decipher :) Further more, the button on the rear is tied to GPIO13, with pullup and is inverted. Finally, GPIO09 and GPIO10 are certainly routed (via via's but those end up underneath the flash chip, so it's reasonable fair to assume that these are IO2 and IO3 making it a quad IO serial flash device. Finally, just for completeness sake, we have a XT24F16F 16M (2 mb) quad I/O capable SPI nor flash chip. I've tested it insofar that I used D1-wroom-02 for the 2M flash size, but before used esp01-1m, which in essence test the 2M and qio capabilities. I've opened a merge request with platform.io platformio/platform-espressif8266#323 @jamesturton anybody that could update the blackadder site with the correct info or help me decipher how the pinouts are defined? |
Have you looked for this feature in other issues and in the docs?
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
I would like to order the new "Shelly Dimmer" and currently do not see a template. Has anyone ever tested the device or even run it with a different setting from another device?
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: