/Zigbee-Wall-Switch-Cover

Zigbee button that goes over light switch

Primary LanguageHTML

Zigbee Wall Switch Cover

This is a zigbee button that can go over a standard US wall switch. This can be handy to control smartbulbs (or whatever else) in a place where you are unable to install smart switches, allowing the switch to remain in the on position and activating the bulb with the front buttons.

This is built using FreePad firmware for the E18-MS1-PCB zigbee module. For the zigbee coordinator I use zigbee2mqtt

Photos

PCB_Front PCB_Back

PCB_On_Wall Case_On_Wall zigbee_switch

Programming

This is the wiring diagram between the PCB and CC Debugger

WiringDiagram

To program the module, use TI SmartRF Flash Programmer NOT v2 and a CC Debugger

Use the DIYRuZ_FreePad_PM3.hex file from FreePad releases for longer battery life.

Ordering

You can use the gerber files in the PCB folder to order from a PCB manufacturer (I used jlcpcb)

Part list

Parts can be found in BOM Folder

  • 2x 2032 Battery Holder
  • 3mm LED
  • 5-pin 2.54 (standard) header for programming (if using the 3D printed case that I provided, these headers needed to be removed after programming)
  • 2x 1k resistors, 0805
  • 10k resistor, 0805
  • 2x push buttons, 6x6x4.5mm
  • E18-MS1-PCB

Case

The 3D printed case file can be found in the Case folder

Printed with 20% Infill, Front face on bed with supports for the mounting holes

The PCB has 2mm mounting holes, but I did not use them in this case

Case (Custom)

Notes

  • Orient the "TOP" part of the PCB towards the direction of the switch (so upside down if your switch in on in the down position)
  • Button 1 (SW1) is the pairing button
  • Pair using the info at Freepad: How to join
  • I highly reccomend setting at least one of the buttons to MOMENTARY mode for quicker respose using the Freedpad: Working modes guide
  • Only one battery is required to run but I use 2 so I get a longer run time
  • If using zigbee2mqtt, don't use the outdated CC2531 board. It killed my batteries in days and pairing problems. I recomend the Sonoff ZBDongle-P (Not model ZBDongle-E)

How I use mine

  • Top button is set to MOMENTARY mode and toggles light on/off

  • Bottom button press toggles between scenes from Home Assistant

  • Bottom button hold goes into a dimming mode that allows me to brighten with the top button and dim with the bottom button

  • Bottom double press sets light to a night light

  • I achieve these by using a mix of Home Assistant automations as well as Node Red