FHEM module for netatmo weatherstations and cameras. Notes:
JSON has to be installed on the FHEM host.
You need to create an app
here to get your
client_id / client_secret.
Request the full access scope including cameras and thermostats.
Define define <name> netatmo ACCOUNT <username> <password> <client_id> <client_secret>
define <name> netatmo FORECAST <your_station_id>
define <name> netatmo PUBLIC <latitude>,<longitude> [<rad>]
Defines a netatmo account or weathermap area.
A netatmo device of the account type has to be created first so FHEM devices for the netatmo devices can be automatically created
(if autocreate is not disabled).
Examples:
define netatmo netatmo ACCOUNT abc@test.com myPassword 2134123412399119d4123134 AkqcOIHqrasfdaLKcYgZasd987123asd
define netatmo_forecast netatmo FORECAST 2f:13:2b:93:12:31
define netatmo_weathermap netatmo PUBLIC 49.452787,11.077967 0.05
define netatmo_station netatmo 2f:13:2b:93:12:31 <= These devices have to be defined through autocreate from he ACCOUNT device!
define netatmo_module netatmo MODULE 2f:13:2b:93:12:31 f1:32:b9:31:23:11
define netatmo_home netatmo HOME 1234567890abcdef12345678
define netatmo_welcome netatmo CAMERA 1234567890abcdef12345678 70:ee:12:34:56:78
define netatmo_person netatmo PERSON 1234567890abcdef12345678 01234567-89ab-cdef-0123-456789abcdef
define netatmo_relay netatmo RELAY 2f:13:2b:93:12:31
define netatmo_thermostat netatmo THERMOSTAT 2f:13:2b:93:12:31 f1:32:b9:31:23:11
Readings self-explanatory (hopefully)
SetACCOUNT
autocreate
Create fhem devices for all netatmo weather devices.
autocreate_homes
Create fhem devices for all netatmo homes, cameras and persons.
autocreate_thermostats
Create fhem devices for all netatmo relays and thermostats.
CAMERA
enable/disable [<pin>]
turns camera on/off, pin defaults to 0000
audio/irmode/led_on_live/mirror <value>
settings from app (without feedback/state)
HOME
empty
sets all persons to away state
PERSON
away
sets away state
home
sets home state
THERMOSTAT
program <program_name>
switches the heating program
setpoint_mode <mode> [<setpoint_duration>]
switches the heating mode
setpoint_temp <temperature> [<setpoint_duration>]
sets a manual temperature point
GetACCOUNT
devices
list the netatmo weather devices for this account
homes
list the netatmo home devices for this account
thermostats
list the netatmo thermostat devices for this account
update
trigger a global update for dashboard data
public [<address>] <args>
no arguments -> get all public stations in a radius of 0.025° around global fhem latitude/longitude
<rad> -> get all public stations in a radius of <rad>° around global fhem latitude/longitude
<lat>,<lon> [<rad>] -> get all public stations in a radius of 0.025° or <rad>° around <lat>/<lon>
<lat1> <lon1> <lat2> <lon2> -> get all public stations in the area of <lat1> <lon2> <lat2> <lon2> if <address> is given then list stations in the area of this address. can be given as 5 digit german postal code or a: followed by a textual address. all spaces have to be replaced by a +.
<lat> <lon> values can also be entered as a single coordinates parameter <lat>,<lon>
DEVICE/MODULE/FORECAST/PUBLIC/HOME/PERSON/RELAY/THERMOSTAT
update
update the device readings / events
updateAll
update the device readings after deleting all current readings
CAMERA
ping
ping the camera and get the local command url
live/_local
get the playlist for live video (internet or local network)
video/_local <video_id>
get the playlist for a video id (internet or local network)
snapshot
get the url for a live still image
Attributes interval (all)
the interval in seconds used to check for new values. (ALL)
disable
1 -> stop polling (ALL)
addresslimit
maximum number of addresses to resolve in public station searches (ACCOUNT - default: 10)
videoquality
video quality for playlists (HOME - default: medium)
ignored_device_ids
ids of devices to ignore during autocreate (ACCOUNT)
setpoint_duration
default duration for temperature setpoints in minutes (THERMOSTAT)