This repository is your go-to source for integrating digital light control and window shading systems into your smart home, using a Raspberry Pi and Pico-W. It is compatible with both iOS and Android devices through Apple HomeKit and Node-RED UI. It is a better alternative to the homebridge-tcp-smarthome project.
Ready to give your smart home an upgrade? Let's dive in!
The SmartHome.json flow in Node-RED on a Raspberry Pi enables the control of lights (connected through LMDI-100
) and window blinds (connected via Mechonet
) in a home automation setup. When an accessory is operated via Apple HomeKit or the Node-RED-UI website, Node-RED sends the command to the appropriate pseudo terminal (pty). These ptys are established by the PtyServer software, which connects to each Pico-W unit over TCP. Subsequently, the Pico-W relays these commands to the connected devices (LMDI or Mechonet) through RS232 communication. Node-RED displays the Pico-W responses in the Node-RED-UI for effective monitoring. Installing several Pico-W units in a building, all linked to the same WiFi network as the Raspberry Pi, enables centralized management of various devices.
- Accessories can be operated through either Apple HomeKit or Nodered-UI website.
- It supports lights and window covering accessories.
- Number of accessories can be configured.
- Individual and all lights on/off control.
- Individual lights brightness control from 0 to 100%.
- Individual and all window blinds 5-level (0%, 25%, 50%, 75%, 100%) covering.
- Provides the status of blinds and lights.
- Install nodered on Raspberry-Pi by running this command on Pi's terminal.
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
- Install nodered-red-dashboard and start the node-red service.
cd ~/.node-red npm i node-red-dashboard node-red-restart sudo systemctl enable nodered.service node-red-start
- Refer NRCHKB to install HomeKit package on nodered.
- Follow the instructions in import export flow to import
SmartHome.json
to the nodered. - Follow the instructions in remote-serial-pico to setup the Pico-W.
-
Block diagram: (checkout detailed diagram)
-
Writing commands to pty and reading responses from pty for each pico:
Special thanks to Medical Informatics Engineering for their support throughout the development of this project, especially to Doug Horner for his invaluable guidance.