condemil / shelly-dimmer-knob

Shelly Dimmer with rotary encoder and Home Assistant intergration
MIT License
17 stars 2 forks source link

Shelly Dimmer 2 support #1

Open Ovw-lang opened 4 years ago

Ovw-lang commented 4 years ago

This is exactly what I was looking for! However, I do have some questions because the manual is still missing some parts for me. Do you also happen to be on tweakers?

condemil commented 4 years ago

Hello, you can find the guide under the following link: https://www.instructables.com/id/Shelly-Dimmer-Wall-Switch-With-Rotary-Knob-and-Hom/

Ovw-lang commented 4 years ago

Thank you! Are you planning to keep updating the firmware?

condemil commented 4 years ago

It is feature complete for my purpose, if someone decides to make more features they can send merge requests.

JacobSoderblom commented 3 years ago

First off all, sorry for posting in an old issue!

This is awesome and thank you for sharing!

I notised that in the original firmware there is an option for button type called "rotary switch". Do you know if they have included your feature into their firmware? Because I cannot get it to work with that button type, the only thing that works is to dim down. It would be lovely if we do not need to flash the dimmer.

Ovw-lang commented 3 years ago

@JacobSoderblom

I did ask this question directly at Shelly support. This is their answer:

_Yes, it can not be used with any rotary switch. We are working on this integration. Do not use it for now.

Thank you for your time!

Kind regards, Shelly Support Team_

craggyh commented 3 years ago

Hi

Does this firmware work on a Shelly Dimmer 2? I flashed it but doesn't seem to turn on the relay/dim etc?

condemil commented 3 years ago

I don't have Shelly Dimmer 2 to test it. You can try to backup your current firmware, check and if it doesn't work you can flash back the original firmware.

craggyh commented 3 years ago

I tried and the firmware loads fine but the dimmer doesn't do anything from Homeassistant. Presumably the GPIOs have changed on the Dimmer 2.

What rotary encoder did you use? I have a ky-040 but it seems to be different pinout that the one you used. You don't seem to be using any 3v3 on the Instructable, just 2x ground pins. Maybe I've missed something?

condemil commented 3 years ago

The pinout is different now, can be checked in here: https://shelly.cloud/knowledge-base/devices/shelly-dimmer-2/

Also based on this thread the communication protocol between esp8266 and stm32 is different so it will require some changes to the firmware to support Shelly Dimmer 2.

condemil commented 3 years ago

This is the pinout of the encoder I use:

     -------
A --|1     4|-- Switch
C --|2  o   |
B --|3     5|-- Switch
     -------
craggyh commented 3 years ago

Are you using any 3v to the encoder or just ground wires? It looks like an EC11 encoder which is a bit different to the ky-040 which seems to require 3v3 or 5v

condemil commented 3 years ago

I connect it exactly like I showed it on the scheme/pictures in instructibles guide without any additional power supply.