Your personal weather station with a Raspberry Pi 3
- http://kleine-nerdprojekte.blogspot.ch/
- https://wiki.pilight.org/doku.php/receivers
- https://home-assistant.io/components/pilight/
- https://wiringpi.com/pins/
- https://wiki.pilight.org/doku.php/electronics#introduction_433_mhz_encoderdecoder
Install samba and mosquitto (MQTT)
https://github.com/home-assistant/hassbian-scripts
sudo hassbian-config install mosquitto
sudo hassbian-config install samba
Install pilight
http://kleine-nerdprojekte.blogspot.ch/2014/02/auslesen-von-temperaturwerten-der.html
https://www.pilight.org/get-started/installation/
Set port for deamon:
https://wiki.pilight.org/doku.php/settings
vim /etc/pilight/config.json
And add the following next to
"webserver-port": 5001,
"port": 5000,
Start daemon with the following command if pilight-reveive says
no pilight ssdp connections found
(use option -D for debugging purposes):
sudo pilight-daemon
Set ID’s for Stations
I bought two of these: http://www.pearl.ch/a-NC7159-3041.shtml
Monitor sent data with the following command:
sudo pilight-receive
Example of Data:
{ "message": { "id": 10, "temperature": 21.3, "humidity": 19.0, "battery": 1 }, "origin": "receiver", "protocol": "alecto_ws1700", "uuid": "0000-b8-27-eb-cad9b1", "repeats": 1 }
Here the ID of the Station is 10.
Add Sensor in Home Assistant config:
- platform: pilight name: 'Sensor 1' variable: temperature payload: id: 10 unit_of_measurement: '°C'
Activate HTTPS(TLS) with Let’s Encrypt
https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/
Then fix permissions (as user pi):
cd /etc/letsencrypt sudo chown -R root:homeassistant live sudo chown -R root:homeassistant archive sudo chmod -R 755 live sudo chmod -R 755 archive sudo systemctl restart [email protected]
Leave a Reply