Weatherreporter

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
m (Installation)
(Supported weather bnetworks)
 
(11 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
= Weather Reporter =
 
The agoweatherreporter module uploads environment data such as temperature to sites for weather crowd sourcing.
 
The agoweatherreporter module uploads environment data such as temperature to sites for weather crowd sourcing.
  
 
The module is listening for event.environment.temperaturechanged or event.environment.humiditychanged events. The config file contains a list of sensors that should be reported.
 
The module is listening for event.environment.temperaturechanged or event.environment.humiditychanged events. The config file contains a list of sensors that should be reported.
  
 +
== Supported weather bnetworks ==
 +
* [http://www.temperatur.nu/orter.html temperatur.nu] - Swedish weather crowd sourcing site
 +
* [https://www.wunderground.com/ Weather Underground]
 +
 +
== Configuration ==
 
Config file example
 
Config file example
 
<pre>
 
<pre>
 
[weatherreporter]
 
[weatherreporter]
 +
log_level=INFO
  
[Services]
+
[General]
 
Delay = 150
 
Delay = 150
[[temperatur.nu]]
+
sensors=S1-temp,S2-temp
[[[Tempsensor garage]]]
+
 
Hash = 12345678901234567890123456789012
+
[WeatherUnderground]
Sensor = S11
+
Password=<your password>
UUID = 03f3f1d3-41d2-41bc-10d9-7656181a2e28
+
Delay=151
 +
 
 +
[temperatur.nu]
 +
Delay=152
 +
 
 +
 
 +
[S1-temp]
 +
Desc=Garage sensor
 +
UUID = <UUID of the device>>
 +
WU-Station=<station for Weather Underground>
 +
TN-Hash = <Temperature.nu API key>
 +
 
 +
[S2-temp]
 +
Desc=Entrance sensor
 +
UUID = <UUID of the device>>
 +
TN-Hash = <Temperature.nu API key>
 
</pre>
 
</pre>
  
As of now, the only service supported is temperatur.nu<br/><br/>
 
 
Parameters explained:<br/>
 
Parameters explained:<br/>
  [[[Tempsensor garage]]]                        - Just a name you select
+
Delay                    - Delay between uploads, can be overrideen for each sensor
  Hash = 12345678901234567890123456789012        - The unique hash you get when registering your weatherstation
+
  [S1-temp]               - Just a name you select
  Sensor = S11                                  - The aGo control device name
+
  TN- Hash                 - Temperatur.nu: The key you received when registering your station
  UUID = 03f3f1d3-41d2-41bc-10d9-7656181a2e28    - The aGo control UUID for the device
+
WU-Station              - Weather Underground: Station name
 +
  Sensor = S1-temp,S2-temp - The agocontrol device names
 +
  UUID =                   - The agocontrol UUID for the device
  
== Installation ==
+
== Install package ==
 +
sudo apt-get install agocontrol-weatherreporter
  
cd /home/<your username>
+
== Dependencies ==
git clone git://github.com/kennethreitz/requests.git
+
Likely depreciated:
cd requests
+
  sudo apt-get install python-configobj
  sudo python setup.py install
+
  
cd /home/<your username>
+
or use:
wget https://pypi.python.org/packages/source/c/configobj/configobj-5.0.6.tar.gz
+
tar -xvf configobj-5.0.6.tar.gz
+
cd configobj-5.0.6
+
sudo python setup.py install
+
  
 +
<<Is this still needed?>>
 
  cd /home/<your username>
 
  cd /home/<your username>
 
  wget https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
 
  wget https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
Line 41: Line 61:
 
  cd six-1.9.0
 
  cd six-1.9.0
 
  sudo python setup.py install
 
  sudo python setup.py install
 +
 +
== Enable and start daemon==
 +
 +
Then enable and start the daemon
 +
sudo systemctl enable agoweatherreporter.service
 +
sudo systemctl start agoweatherreporter.service

Latest revision as of 16:02, 1 January 2017

Contents

[edit] Weather Reporter

The agoweatherreporter module uploads environment data such as temperature to sites for weather crowd sourcing.

The module is listening for event.environment.temperaturechanged or event.environment.humiditychanged events. The config file contains a list of sensors that should be reported.

[edit] Supported weather bnetworks

[edit] Configuration

Config file example

[weatherreporter]
log_level=INFO

[General]
Delay = 150
sensors=S1-temp,S2-temp

[WeatherUnderground]
Password=<your password>
Delay=151

[temperatur.nu]
Delay=152


[S1-temp]
Desc=Garage sensor
UUID = <UUID of the device>>
WU-Station=<station for Weather Underground>
TN-Hash = <Temperature.nu API key>

[S2-temp]
Desc=Entrance sensor
UUID = <UUID of the device>>
TN-Hash = <Temperature.nu API key>

Parameters explained:

Delay                    - Delay between uploads, can be overrideen for each sensor
[S1-temp]                - Just a name you select
TN- Hash                 - Temperatur.nu: The key you received when registering your station
WU-Station               - Weather Underground: Station name
Sensor = S1-temp,S2-temp - The agocontrol device names
UUID =                   - The agocontrol UUID for the device

[edit] Install package

sudo apt-get install agocontrol-weatherreporter

[edit] Dependencies

Likely depreciated:

sudo apt-get install python-configobj

or use:

<<Is this still needed?>>

cd /home/<your username>
wget https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
tar -xvf six-1.9.0.tar.gz
cd six-1.9.0
sudo python setup.py install

[edit] Enable and start daemon

Then enable and start the daemon

sudo systemctl enable agoweatherreporter.service
sudo systemctl start agoweatherreporter.service
Personal tools