https://github.com/stesel/mandarin-home-pi
Smart water supplier for home plants based on raspberry pi.
https://github.com/stesel/mandarin-home-pi
express-js fauna-db mobx raspberry-pi-camera raspberry-pi-gpio react-js typescript web-sockets webpack
Last synced: about 2 months ago
JSON representation
Smart water supplier for home plants based on raspberry pi.
- Host: GitHub
- URL: https://github.com/stesel/mandarin-home-pi
- Owner: stesel
- License: mit
- Created: 2020-07-05T07:43:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-14T23:18:04.000Z (almost 3 years ago)
- Last Synced: 2025-06-20T03:04:00.200Z (12 months ago)
- Topics: express-js, fauna-db, mobx, raspberry-pi-camera, raspberry-pi-gpio, react-js, typescript, web-sockets, webpack
- Language: TypeScript
- Homepage: https://mandarin-home-test.herokuapp.com/
- Size: 3.16 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README

# mandarin-home-pi
[Video](https://www.youtube.com/watch?v=7qVixwESHIk)
[](https://www.youtube.com/watch?v=7qVixwESHIk "video")
[Demo](https://mandarin-home-test.herokuapp.com/)
*Password: 0000*
## Backend env
`SECRET_PHRASE_CLIENT`
`SECRET_PHRASE_PI`
`DB_SECRET_PI`
`PI_MODE`
## Pi env
`WS_HOST_PI`
`SECRET_PHRASE_PI`
## Set Pi env
```
export ENV_VAR="value" >> ~/.bashrc
source ~/.bashrc
echo ENV_VAR
```
## Install Pi App
```
wget -O mandarin-home-pi.js url/mandarin-home-pi.js --show-progress
pm2 start ./mandarin-home-pi.js
pm2 startup systemd
pm2 save
#reload env vars
pm2 reload all --update-env
```
## Find Pi in local network
```
arp -na | grep "PI MAC" | grep -E -o "192.168.0.[0-9]{1,3}"
```
## Camera setup
https://www.raspberrypi.org/documentation/usage/camera/installing.md
## GPIO
http://wiringpi.com/
```
gpio -g mode 4 output
gpio -g blink 4
or
gpio -g write 4 1 (to turn it on)
gpio -g write 4 0 (to turn it off)
```
## PM2
```
wget -qO- https://getpm2.com/install.sh | bash
```
### LICENSE
[MIT License](LICENSE.md)