Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////////////////////////
- //
- // Geschrieben von Thomas Weiß, 28.02.2021, Verion 1.0
- //
- // Das Modul steuert Pool und Klimaanlage
- //
- ///////////////////////////////////////////////////////////////////////////////////////////
- // -------------------------------------------------------------------------------
- // ---- Einstellungen
- // -------------------------------------------------------------------------------
- var bDebug = 1
- // -------------------------------------------------------------------------------
- // ---- Hilfsvariablen
- // -------------------------------------------------------------------------------
- // -------------------------------------------------------------------------------
- // ---- Netatmo Thermnostate haben die API verändert, das Biding kann nicht mehr einlesen
- // -------------------------------------------------------------------------------
- // -------------------------------------------------------------------------------
- // ---- Bad
- // -------------------------------------------------------------------------------
- rule "GetNetatmoData1"
- when Time cron "0 0/1 * 1/1 * ? *" or // ( http://www.cronmaker.com/ )
- System started
- then
- var String fileContent = sendHttpGetRequest("http://192.168.220.101:8080/static/netatmo_therm_bath_data.json")
- if (bDebug==1) logInfo("GetNetatmoData", fileContent)
- //Werte
- var sValue = transform("JSONPATH", "body.home.rooms..therm_setpoint_temperature", fileContent.toString) //Sollwert
- var sValue2 = transform("JSONPATH", "body.home.rooms..therm_measured_temperature", fileContent.toString) //Istwert
- var sValue3 = transform("JSONPATH", "body.home.rooms..therm_setpoint_mode", fileContent.toString) //Status
- if (bDebug==1) logInfo("GetNetatmoData", "Sollwert Bad =" + sValue + " / Istwert Bad =" + sValue2 + " / Status Bad =" + sValue3)
- //Übergabe
- sendCommand("RaumthermostatBad_Temperatur", sValue2.toString )
- sendCommand("RaumthermostatBad_Setpoint", sValue.toString )
- sendCommand("ThermostatModuleFlur_SetpointMode", sValue3.toString )
- // -------------------------------------------------------------------------------
- // ---- Küche
- // -------------------------------------------------------------------------------
- // -------------------------------------------------------------------------------
- // ---- Wohnzimmer
- // -------------------------------------------------------------------------------
- // -------------------------------------------------------------------------------
- // ---- Flur
- // -------------------------------------------------------------------------------
- end
Add Comment
Please, Sign In to add comment