The weather devices gives the condition of rain, outdoor temperature and humidity. Rain is set as a binary sensor and will be marked true if any variety of rain is detected including drizzle. Temperature and humidity are shown as multi-level sensor. This allows for graphing the data over time to view trends.
This device requires the install of the Python Weather API.
Configuration options are set in /etc/opt/agocontrol/conf.d/weather.conf:
[weather] locations_ID=ITLM2916 tempunits = f waittime = 300
Temporary instructions until I learn how to create a package so this is automated...
sudo wget http://git.agocontrol.com/agocontrol/agocontrol/raw/master/devices/weather/agoweather.py sudo mv agoweather.py /opt/agocontrol/bin sudo apt-get install python-pywapi sudo nano /etc/opt/agocontrol/conf.d/weather.conf
Then edit the lines to match your location- e.g.:
[weather] locations_ID=63005 tempunits = f waittime = 300
Save and exit the file, then run
sudo chmod a+rx /etc/opt/agocontrol/conf.d/weather.conf sudo chmod a+rx /opt/agocontrol/bin/agoweather.py
Then create and edit the service file:
sudo nano /lib/systemd/system/agoweather.service
Putting the following in that service file:
[Unit] Description=ago control Weather Device [Service] ExecStart=/opt/agocontrol/bin/agoweather.py WorkingDirectory=/opt/agocontrol/bin StandardOutput=syslog StandardError=syslog Restart=always RestartSec=2 User=agocontrol [Install] WantedBy=multi-user.target
You should then just have to enable and start the service:
systemctl enable agoweather.service systemctl start agoweather.service
And check it is running with:
systemctl status agoweather.service
It maybe required to reload the system daemon:
sudo systemctl --system daemon-reload