Great stuff.
Thank you for the GPIO’s, adapted to Tasmota and working well.
Great stuff.
Thank you for the GPIO’s, adapted to Tasmota and working well.
I think the mind meld option would be great
Home someone can help me, I bought one of these switches (3 gang) v1.3, I tried tuya convert to flash the device with no success. I’m now trying to flash tasmota with a serial adapter. My question is how do I get the device in programm mode? I held the reset button, but it don’t seem to work. Please help.
Hold down gpio0 when turning it on (or when pressing the reset button)
@neilvangeffen, Sorry I only saw to post above now. My BAD. I was able to flash tasmota and loaded the following template: https://blakadder.github.io/templates/zemismart_KS-811_3gang.html. Everything looks fine except, the led of off switches flash. How can I stop the flashing led’s? and Then do I need to configure something in tasmota?
I’m having a DUMB day, LED’s will stop flashing as soon as you configure your MQTT details.
Glad you got there
Can you share the tasmota template here for those that want to run Tasmota instead of esphome
I did, it works
You did what?
KS-811 3gang working with ESPHOME
I have all 3 now, and checked the pinouts and they are updated in the first post
Pinouts:
Inputs;
1 way - GPIO0
2 way GPIO16 top, GPIO5 bottom
3 way GPIO16 top, GPIO5 middle, GPIO4 bottom
Outputs;
Status LED GPIO2
Load 1 GPIO13
Load 2 GPIO12
Load 3 GPIO14
Hi all
Thanks for the work done here!
I have a three gang switch, when flashing via esphome I’m getting: “A fatal error occurred: MD5 of file does not match data in flash!”.
I’m using 3.3v - should I be using 5v?
cheers
Never had that sorry. I do power my switch from 5V when i have it running on the bench for testing and OTA programming… but use 3V3 when using the serial port for putting the initial code on…
Thanks for responding Neil, probably saved me frying device
I probably have a poor quality USB to TTL Serial Converter or had poor connections to the board.
Just documenting how I got mine to eventually flash in case it helps someone else:
I played around with esptool.py with various baud rates and settings without success.
Eventually I fed 5v to the board through the 5v pin (instead of using the regular 3.3V pin) while using the regular Tx/Rx/Gr pins and the flash worked. esptool.py --before default_reset --after no_reset --chip esp8266 --port /dev/ttyUSB0 write_flash -fm dout 0x0 my_esphome.bin
Flashing OTA now works with no issues.
Thanks again for doing the hard yards and letting us know how to proceed. Debating converting the whole house to these now.
No problem. Glad you got it working!
I put nearly a dozen more into my house haha
Since your not just using it for a light or the relay capabilities, perhaps your can try the press/click options:
Double Click, Long Click, Single Click
Ea.
#-- GPIO16 - Top Button
#-- GPIO5 - Middle Button
#-- GPIO4 - Bottom Button
binary_sensor:
- platform: gpio
pin:
number: GPIO16
mode: INPUT
inverted: True
name: "Livingroom Wall Switch Top"
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at least 0.2s
then:
- logger.log: "Double Clicked Livingroom Wall Switch Top"
# Switch on tv example
- homeassistant.service:
service: switch.turn_on
data:
entity_id: switch.tv_power
- timing:
- ON for 1s to 2s
- OFF for at least 0.5s
then:
- logger.log: "Single Long Clicked Livingroom Wall Switch Top"
# Switch set scene / change light color
- homeassistant.service:
service: light.turn_on
data:
entity_id: light.downstairs_lights
transition: 5
color_name: blue
brightness_pct: 50
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
if:
condition:
api.connected:
then:
- logger.log: "Single Short Clicked Livingroom Wall Switch Top"
- homeassistant.service:
service: light.toggle
data:
entity_id: light.living_room
transition: 2
else:
- logger.log: "Not connected to API changing Livingroom Wall Switch Top Relay"
- switch.toggle: livingroom_top_relay
Here is the pin out for the Zemismart one way:
switch GPIO0
Load GPIO12
LED GPIO13
Francois
Hello, how did you flash?
you open up the unit and connect to the RX and TX lines of the ESP8266 with a USB-UART converter like the FTDI adapters everyone uses. Then hold down GPIO0 as you turn it on, and flash it with esphome-flasher or some other tool.
Google flashing esp8266 and a wealth of information will pop up