FHEM - Hausautomations-Systeme > Sonstige Systeme

Netatmo Modul - 38_netatmo.pm (Support)

(1/251) > >>

Markus M.:
Letztes Update: 2018-09-20
38_netatmo: fixed changed values and deprecated API calls



Unterstützung für:
- Alle Wetter-Module (incl. Regen, Wind)
- Public Stationen mit allen Werten
- Dashboard Readings der eigenen Geräte (Temp min/max, abs. Pressure, Trends, Wind max)
- Wettervorhersage der eigenen Station (7 Tage)
- Welcome (Homes, Kameras samt Tags und Personen mit Events, Snapshots und Video Playlists, Webhook)
- Presence (Licht und Settings, Events, Snapshots und Video Playlists, Timelapse, Webhook)
- Thermostat (Readings Thermostat und Relay, Setzen von Programmen, Modi und Temperaturpunkten)
- Healthy Home Coach

Zusätzliche Features:
- Erweiterte Werte wie Battery, RF/WiFi Status
- Durchschnittsberechnung der Umgebungswerte über Koordinaten
- Less-blocking bei DNS Ausfall, Rate limit
- Dynamische Updateintervalle

Hinweise:
- Um das dewpoint Modul nutzen zu können, muss dort das Attribut max_timediff auf 660 gesetzt werden.





Viele Grüsse,
Markus

Anhang:
2018-09-20 - fixed changed values and deprecated API calls
2018-01-05 - status 'dead' to better see disconnections > 2h
Beta 30 - Fixed crash on error response
Beta 29 - Fixed crash on invalid login
Beta 28 - New offline handling (DNS blocking)
Beta 27 - Offline camera ping prevention, bugfixes
Beta 26 - Update timing, Homecoach Temperature
Beta 25 - Webhook, API rate limit
Beta 24 - Presence Events
Beta 23 - Presence Camera
Beta 22 - Healthy Home Coach
Beta 21 - Presence test
Beta 20 - Account encryption fixed
Beta 19 - Welcome Tags
Beta 18 - Account Encryption, Reconnect/Update Fix
Beta 17 - database units fix, dewpoint workaround entfernt
Beta 16 - dewpoint workaround
Beta 15 - Readings umbenannt, Alias utf8
Beta 14 - Bugfix für Token Update und globale Werte
Beta 13 - Token Änderungen
Beta 12 - battery_percent als Reading
Beta 11 - Thermostat Daten erweitert, battery ok/low für alle Geräte
Beta 10 - Air Quality als air_.*, Camera Events verbessert
Beta 09 - Fix für Temp/Hum bei Windmesser, max_wind_str aus Dashboard
Beta 08 - Forecast, Fix für Invalid Readings, Battery
Beta 07 - Person Updates, Camera Settings, Ignored Devices (Autocreate), Bugfixing
Beta 06 - Thermostat & Relay
Beta 05 - PUBLIC berechnet Durchschnittswerte der Netatmo Weathermap
Beta 04 - Set Person away / Home empty, Camera on/off mit PIN, Public Station Define Screen
Beta 03 - UTF8, autocreate Fixes
Beta 02 - weniger Logging, keine unbekannten Personen im Autocreate
Beta 01 - initiale Version

Markus M.:
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)


Set

ACCOUNT

    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


Get

ACCOUNT

    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)

Markus M.:
Bekannte Bugs:
 - Pressure Werte landen in Noise (wird abgefangen, Logeintrag)
   Liegt an fehlerhaften dataTypes Einträgen, nicht reproduzierbar

Todo:
 - ?

Streichliste:
 - Wochenprogramme für Thermostate


Icons im Anhang

domschl:
Das Modul laeuft bei mir prima mit drei Wetterstationen (2x innen, 1x aussen) und der Welcome-Kamera.

Es hat einiger Restarts bedurft, bis ein Autocreate tatsaechlich die Kamera angelegt hat. Als der Autocreate dann funktioniert hat, war er gleich etwas uebereifrig und hat 38 User "Unknown" angelegt. (Ich hatte 38 verschiedene noch nicht identifizierte Aufnahmen).

Nach kurzem Aufraeumen scheint jetzt alles bestens!

Dom.

Markus M.:
Unknown sollten theoretisch nicht angelegt werden.
Ich werde das nochmal überarbeiten so dass generell nur ein Unknown Device angelegt wird in das dann alle Snapshots und Video IDs aus Events mit unbekannten Gesichtern abgelegt werden.


-> Erledigt

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln