Home automation server and playground for new technologies
Simple home automation server (my simple and custom-made alternative for Home Assistant) Zigbee devices support is enabled with help of zigbee2mqtt project and chineeze clone of Texas Instruments CC2531 stick. Browser part is implemented on react + emotion + materialui. Parcel2 is used as module bundler. Server side code is written in nodejs + typescript, babel as bundler/loader.
Used technologies
- typescript 4.0
- react 17 and useSate, useEffect, useReducer react hooks
- emotion as styled components library
- immer in reducer
- parcel2 with hot reload enabled
- eslint with airbnb presets
- mqtt client
- yeelight-platform for integration with yeelight devices
- materialui 5.0
- debug module
- sqlite3 databese with nodejs sqlite3 client
- import-sorter for VS Code
- axios as http client
- pm2 as daemon process manger (backend watchdog)
- no redux, no create-react-app
- relative paths for imports
UI screen
Scripts
yarn build
build production client-side bundleyarn start
launch server in production modeyarn stop
stop production serveryarn run list
list of pm2 processesyarn parcel:dev
launch parcel in devevelopment modeyarn server:dev
launch server in device mode (with debug enabled)yarn all:dev
parcel:dev
+server:dev