Functions | Variables
main Namespace Reference

Functions

def get_access_token (username, password, client_id, client_secret)
 
def get_station_values (access_token, device_id)
 
def publisher_loop (access_token, device_id)
 

Variables

 anonymous
 
 clientid = config.get("user", "client_id")
 
 clientsecret = config.get("user", "client_secret")
 
 config = ConfigParser.ConfigParser()
 
 config_path = rospy.get_param("~configpath")
 
 deviceid = config.get("device", "device_id")
 
 passw = config.get("user", "password")
 
 pub = rospy.Publisher("weather", WeatherdataArray, queue_size=1)
 
 uname = config.get("user", "username")
 
 wd_access_token = get_access_token(uname, passw, clientid, clientsecret)
 

Function Documentation

def main.get_access_token (   username,
  password,
  client_id,
  client_secret 
)
Get the Netatmo access token
:param username: Netamo username
:param password: Netamo password
:param client_id: Netamo Client ID
:param client_secret: Netamo Client Secret
:return: access token

Definition at line 22 of file main.py.

def main.get_station_values (   access_token,
  device_id 
)
Get values from a station and it's modules
:param access_token: Netatmo access token
:param device_id: Netatmo device ID
:return: station weather data

Definition at line 49 of file main.py.

def main.publisher_loop (   access_token,
  device_id 
)
Loop for publishing data in ROS
:param access_token: Netatmo access token
:param device_id: Netatmo Weather Station device ID

Definition at line 104 of file main.py.

Variable Documentation

main.anonymous

Definition at line 120 of file main.py.

main.clientid = config.get("user", "client_id")

Definition at line 131 of file main.py.

main.clientsecret = config.get("user", "client_secret")

Definition at line 132 of file main.py.

main.config = ConfigParser.ConfigParser()

Definition at line 127 of file main.py.

main.config_path = rospy.get_param("~configpath")

Definition at line 123 of file main.py.

main.deviceid = config.get("device", "device_id")

Definition at line 133 of file main.py.

main.passw = config.get("user", "password")

Definition at line 130 of file main.py.

main.pub = rospy.Publisher("weather", WeatherdataArray, queue_size=1)

Definition at line 119 of file main.py.

main.uname = config.get("user", "username")

Definition at line 129 of file main.py.

main.wd_access_token = get_access_token(uname, passw, clientid, clientsecret)

Definition at line 150 of file main.py.



netatmo
Author(s): José Jaime Ariza
autogenerated on Mon Jun 10 2019 13:59:24