Aller au contenu

sebcbien

Membres confirmés
  • Compteur de contenus

    4 189
  • Inscription

  • Dernière visite

  • Jours gagnés

    85

Tout ce qui a été posté par sebcbien

  1. Voici la nouvelle version qui permet ne ne pas avoir de lampe "always on": --[[ %% autostart %% properties %% globals Simu_presence --]] --------------------------------- -- YAPS Presence Simulator local version = "2.6.2"; -- SebcBien -- Avril 2015 --------------------------------- --V2.6.2 -- Added the possibility to not have an always on lamp --V2.6.1 -- Added naming of devices in the debug during simulation --V2.6.0 -- Added the possibility to select always on light during simulation --V2.5.0 -- fixed simulation starting if restarted between endtime & midnight --v2.4.1 -- fixed big bug simulator restarting after end time --V2.3.1 -- small notification and debug changes --V2.3 -- Rewriting the engine -- now relaunch automatically the next day, even if Simu_presence has not changed --V2.2 -- Added Manual Stop variable -- added list of mobiles if (fibaro:countScenes() > 1) then --fibaro:debug("More than one scene active, exiting!"); fibaro:abort(); end --------------------- USER SETTINGS -------------------------------- local id = { LAMPE_SDB = 16, LAMPE_CH_AMIS = 24, LAMPE_SALON = 45, LAMPE_BUREAU = 49, LAMPE_HALL = 52, LAMPE_CELLIER = 56, LAMPE_CH_EMILIEN= 58, PHONE_SEB = 1323, PHONE_GG = 1327, } local stop_hour = "01"; -- Hour when you want simulation to stop local stop_minute = "10"; -- Minute of the hour you want simulation to stop -- note 1: the script will not exit while waiting the random time of the last light turned on. So end time can be longer than specified end time -- note 2: if the global variable changes during the same wait time as above, it will exit immediately (when back home while simulation runs) local rndmaxtime = 20; -- random time of light change in minutes --> here each device is on maximum 30min local ID_devices_lights_always_on = {id["LAMPE_BUREAU"]} -- IDs of lights who will always stay on during simulation - leave empty array if none -> {} local ID_devices_lights = {id["LAMPE_SDB"],id["LAMPE_HALL"],id["LAMPE_CELLIER"],id["LAMPE_CH_AMIS"]} -- IDs of lights to use in simulation --local ID_devices_lights = {id["LAMPE_BUREAU"],id["LAMPE_CELLIER"]} -- Reduced set for test purposes local activatePush = true; -- activate push when simulation starts and stops --local ID_Smartphones = {id["PHONE_SEB"],id["PHONE_GG"]}; local ID_Smartphones = {id["PHONE_SEB"]}; -- list of device receiving Push local ID_On_After_Simu = 0; -- If next line is commented, no light will turn on after simulation ends local ID_On_After_Simu = id["LAMPE_HALL"]; -- Only One ID of a light to turn on after simulation ends. Comment this line to turn off this feature --------------------- USER SETTINGS END ---------------------------- ----------------------ADVANCED SETTINGS----------------------------- local showStandardDebugInfo = true; -- Debug shown in white local showExtraDebugInfo = false; -- Debug shown in orange local numbers_lights = #ID_devices_lights; -- numbers of light devices listed above local manualOveride = fibaro:getGlobal("overideSimuSunset"); -- if = 1 then the simulation is forced -------------------------------------------------------------------- -------------------- DO NOT CHANGE CODE BELOW ---------------------- -------------------------------------------------------------------- local simu = fibaro:getGlobal("Simu_presence"); --value of the global value: simulation is on or off local start_simu = fibaro:getValue(1, "sunsetHour"); --Start simulation when sunset local endtime; local wait_for_tomorrow = 1; local NotifLoop = 30; SimulatorPresenceEngine = {}; -- FONCTIONS Debug = function ( color, message ) fibaro:debug(string.format('<%s style="color:%s;">%s</%s>', "span", color, message, "span")); end ExtraDebug = function (debugMessage) if ( showExtraDebugInfo ) then Debug( "orange", debugMessage); end end StandardDebug = function (debugMessage) if ( showStandardDebugInfo ) then Debug( "white", debugMessage); end end round = function (num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end -- Push message to mobile pushMessage = function (sendPush) if (activatePush) then for i=1, #ID_Smartphones do fibaro:call(tonumber(ID_Smartphones[i]), 'sendPush', sendPush); ExtraDebug("Push message ("..sendPush..") sent to mobile: "..tonumber(ID_Smartphones[i])); end end end -- Calculate endtime function SimulatorPresenceEngine:EndTimeCalc() local start = os.date("%H:%M") local time = os.time() local date = os.date("*t", time) local year = date.year local month = date.month local day = date.day endtime = os.time{year=year, month=month, day=day, hour=stop_hour, min=stop_minute, sec=sec} -- to calculate when it's daytime local currentHour = os.date("*t") local sunrise = tonumber(string.sub (fibaro:getValue(1,'sunriseHour'), 1 , 2) ) * 60 + tonumber(string.sub(fibaro:getValue(1,'sunriseHour'), 4) ) local sunset = tonumber(string.sub (fibaro:getValue(1,'sunsetHour'), 1 , 2) ) * 60 + tonumber(string.sub(fibaro:getValue(1,'sunsetHour'), 4) ) local now = currentHour.hour * 60 + currentHour.min; --ExtraDebug ("debug info: Sunrise : " .. sunrise .. " Sunset : "..sunset .. " Now : " ..now); --ExtraDebug ("debug info: Current OS Time" ..os.time()) --ExtraDebug ("debug info: Original planed EndTime " ..endtime) --ExtraDebug ("debug info: os.date: "..os.date("%H:%M").. " sunrisehour: "..fibaro:getValue(1, "sunriseHour")) if ((wait_for_tomorrow == 0) and (endtime < os.time())) then -- if endtime is gone and it's the first launch of simulator endtime = endtime + 24*60*60 -- add 24h at endtime after the night is gone start_simu = fibaro:getValue(1, "sunsetHour"); -- recalculate for next day ExtraDebug ("Added 24H to Endtime (first start ending after midnignt)"); ExtraDebug ("Recalculated Simulation StartHour (Sunset): " .. start_simu); wait_for_tomorrow = 1 end if (wait_for_tomorrow == 1 and (endtime < os.time()) and ((now >= sunrise) and (now <= sunset))) then -- if it looping days and endtime is gone and we are daytime endtime = endtime + 24*60*60 -- add 24h at endtime after the night is gone start_simu = fibaro:getValue(1, "sunsetHour"); -- recalculate for next day ExtraDebug ("Added One Day to Endtime: " .. endtime); ExtraDebug ("Recalculated Simulation StartHour (Sunset): " .. start_simu); end --ExtraDebug ("debug info: Recalculated planed EndTime " ..endtime) end -- Simulate Presence Main function SimulatorPresenceEngine:Launch() pushMessage("Lights simulation started, will stop at: "..stop_hour..":"..stop_minute) ExtraDebug("Lights simulation started, will stop at: "..stop_hour..":"..stop_minute ); if ID_devices_lights_always_on[1] ~= nil then SimulatorPresenceEngine:TurnOn(ID_devices_lights_always_on); end while ((os.time() <= endtime) and (simu == "1")) or ((manualOveride == "1")) do -- original code: while ((os.time() <= endtime) and (simu == "1")) or ((os.time() <= endtime) and (simu == "1") and (manualOveride == "1")) do if time == endtime then StandardDebug("time and endtime same value -> end") end local random_light = tonumber(ID_devices_lights[math.random(numbers_lights)]) --choose a random light in the list local lightstatus = fibaro:getValue(random_light, 'value') --get the value of the random light in the list -- turn on the light if off or turn off if on if tonumber(lightstatus) == 0 then fibaro:call(random_light, 'turnOn') else fibaro:call(random_light, 'turnOff') end fibaro:sleep(1000); --necessary to get back the new status, because HC2 is too fast :-) lightstatus = fibaro:getValue(random_light, 'value') --get the value of the random light after his update StandardDebug('light ID:'.. fibaro:getName(random_light) ..' status:'..lightstatus); local sleeptime = math.random(rndmaxtime*60000) --random sleep StandardDebug("entering loop of " .. round(sleeptime/60000,2) .. " minutes"); -- This modification allows to exit the scene if the Simu_presence global var changes to 0 during the random sleep local counterexitsimu = 200 while (counterexitsimu > 0) do counterexitsimu = counterexitsimu - 1; test_presence_state = fibaro:getGlobal("Simu_presence"); simu = tonumber(test_presence_state); --verify the global value, if the virtual device is deactivated, the scene stops. --fibaro:debug("simu var state : " .. simu); if simu == 0 then counterexitsimu = 0 end fibaro:sleep(sleeptime/200); end StandardDebug("exiting loop of " .. round(sleeptime/60000,2) .. " minutes"); local sleeptimemin = math.abs(sleeptime/60000) --StandardDebug('sleeptime:'..sleeptimemin); simu = fibaro:getGlobal("Simu_presence"); --verify the global value, if the virtual device is deactivated, the scene stops. manualOveride = fibaro:getGlobalValue("overideSimuSunset"); end end function SimulatorPresenceEngine:EndSimulation() if ID_devices_lights_always_on[1] ~= nil then SimulatorPresenceEngine:TurnOff(ID_devices_lights,ID_devices_lights_always_on); end Debug("red","Simulation is deactivated"); if (simu == "1") then Debug("grey", "Presence Simulator will Restart tomorrow around ".. fibaro:getValue(1, "sunsetHour")); pushMessage("Presence Simulator will Restart tomorrow around ".. fibaro:getValue(1, "sunsetHour")); wait_for_tomorrow = 1 -- will make EndTimeCalc add 24h to endtime during daytime end end function SimulatorPresenceEngine:ExitSimulation() Debug("red","Presence Simulator is Terminated"); pushMessage("Presence Simulator is Terminated"); end -- Switch off devices in the list function SimulatorPresenceEngine:TurnOff(group,group2) Debug("red","TurnOff All lights!"); local name, id2; local ID_devices_group = group; for i=1, #ID_devices_group do id2 = tonumber(ID_devices_group[i]); fibaro:call(id2, "turnOff"); name = fibaro:getName(id2); if (name == nil or name == string.char(0)) then name = "Unknown" end StandardDebug("Device: " .. name .. " Off "); end local ID_devices_group = group2; for i=1, #ID_devices_group do id2 = tonumber(ID_devices_group[i]); fibaro:call(id2, "turnOff"); name = fibaro:getName(id2); if (name == nil or name == string.char(0)) then name = "Unknown" end StandardDebug("Device: " .. name .. " Off "); end if ID_On_After_Simu ~= 0 then fibaro:call(ID_On_After_Simu, "turnOn"); name = fibaro:getName(ID_On_After_Simu); if (name == nil or name == string.char(0)) then name = "Unknown" end Debug("red","Manual Light Settings: Turned On light: " .. name); end end -- Switch on devices in the list function SimulatorPresenceEngine:TurnOn(group) Debug("red","Turning On always on lights:"); local name, id2; local ID_devices_group = group; for i=1, #ID_devices_group do id2 = tonumber(ID_devices_group[i]); fibaro:call(id2, "turnOn"); name = fibaro:getName(id2); if (name == nil or name == string.char(0)) then name = "Unknown" end StandardDebug("Device: " .. name .. " On "); end Debug("red","Now randomizing other lights..."); end Debug("green", "Presence Simulator | v" .. version ); Debug( "green", "--------------------------------"); if tonumber(stop_hour) <= 12 then wait_for_tomorrow = 0 end -- if stop hour is between 00 and 12h then will consider that stop hour is before midnight ------------------------ Main Loop ---------------------------------- if (simu == "0") then Debug("red","Not starting Simulation (Simu_presence = 0)"); SimulatorPresenceEngine:ExitSimulation(); fibaro:abort(); end pushMessage("Scheduled Simulation starting time: " .. start_simu); ExtraDebug("Today's sunset is at "..fibaro:getValue(1, "sunsetHour").." - End of Simulation at "..stop_hour..":"..stop_minute); while (simu=="1" or simu=="0" ) do SimulatorPresenceEngine:EndTimeCalc(); -- local start_simu = "00:01" -- uncomment this line when testing to force a start hour (for the first loop) if (os.date("%H:%M") >= start_simu) then -- define if nighttime (sunset) sunset = 1 else sunset = 0 end if (simu == "1") then if sunset == 1 and (os.time() <= endtime) then Debug("grey", "It's sunset time -> Simulation ON"); SimulatorPresenceEngine:Launch(); SimulatorPresenceEngine:EndSimulation(); end if manualOveride == "1" then Debug("grey", "Manual Override Activated -> Simulation ON"); SimulatorPresenceEngine:Launch(); SimulatorPresenceEngine:EndSimulation(); end --fibaro:debug("sunset: "..sunset .. "endtime: " .. endtime .. "ostime: " .. os.time()); if manualOveride == "0" and sunset == 0 and NotifLoop == 30 then Debug("grey", "Waiting for next Sunset: " .. start_simu .. " -> Simulation OFF."); end end if sunset == 1 and (os.time() >= endtime) and (os.time() <= (endtime + 60)) then Debug("grey","Simulation ended for this night."); end if (simu == "0") then -- Condition to end simulation SimulatorPresenceEngine:ExitSimulation(); Debug("red","Simu = 0, Exit from scene"); fibaro:abort(); end if NotifLoop <= 30 then if NotifLoop == 30 then NotifLoop = 0 end if NotifLoop == 0 then ExtraDebug("Looping to check for changes every 2min") end NotifLoop = NotifLoop + 1 end fibaro:sleep(2*60*1000); simu = fibaro:getGlobal("Simu_presence"); manualOveride = fibaro:getGlobal("overideSimuSunset"); end
  2. sebcbien

    Analyseur Zwave Network

    Il y a aussi mon tuto (en signature) ce n'est pas un outil d'analyse mais une méthode d'amélioration du réseau zwave
  3. Une bonne installation en KNX, c'est un autre budget et c'est moins malléable par la suite, mais question fiabilité, je pense que c'est le top !
  4. Bonjour Zack et bienvenue. Attention que le système fibaro est un système do it yourself ... Non fiable a 100%. Personnellement je réfléchirait a deux fois avant d'installer ce genre de domotique chez des clients... Le sav risque de vous prendre énormément de temps et de soucis. En effet un bug est acceptable en do it yourself mais je ne l'accepterait pas d'un système qui m'aurais été vendu installé..
  5. sebcbien

    Support Gea

    Shyrka973 à été plus vite que moi pour mettre à jour gea sur github. Version 5.34 mise à jour donc
  6. Effectivement je n'ai pas prévu le cas ou il n'y en a pas... En attendant une nouvelle version, tu peux juste commenter les lignes 145 et 179 Exemple: SimulatorPresenceEngine:TurnOn(ID_devices_lights_always_on); devient: --SimulatorPresenceEngine:TurnOn(ID_devices_lights_always_on); Pour la variable overideSimuSunset , tu peux la mettre dans l'entête, mais ce n'est pas nécessaire, sa valeur est testée dans la boucle d'attente.
  7. sebcbien

    Thermostat Netatmo

    comme promis, voici le code et les explications: http://www.domotique-fibaro.fr/index.php/topic/3929-yagda-yet-another-graphic-data-analyser-netatmo-vmc-emoncms-json-viewer/page-2
  8. Ton problème vient de la section suivante ans le php: $module_interne = $json_devices["body"]["devices"][0]["_id"]; $module_externe = $json_devices["body"]["modules"][1]["_id"]; $module_interne2 = $json_devices["body"]["modules"][2]["_id"]; $module_interne3 = $json_devices["body"]["modules"][3]["_id"]; $module_interne4 = $json_devices["body"]["modules"][4]["_id"]; voir post ci-dessus pour plus d'infos.
  9. Et voici le nouveau code PHP (fichier termtatmo.php) Mode d'emploi: Remplir les valeurs personelles: XXXXXXXXXXXXXXXXX dans le code ci-dessous Losqu'il est exécuté sans paramètre, une page d'aide apparait: Exemple de retour avec http:// 192.165.10.102 /netatmo/thermtatmo.php (192.165.10.102 étant l'adressi IP de mon serveur Web) Available parameters: For Netatmo thermostat: http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_viewer_therm'>http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_viewer_therm http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=xml_therm http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_therm'>http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_therm http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=names_therm'>http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=names_therm http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=therm1 http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=therm1_set_away http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=therm1_set_program For Netatmo Weather: http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_viewer http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=names http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=selected_modules http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=int http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=ext http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=mod2 http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=mod3 http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=mod4 le parametre jsonviewer permet de "débuger" et va retourner le json reçu par netatmo et l'afficher dans un json viewer. Voici mon retour de la page http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_viewer Avec le json viewer il est plus facile de s'y retrouver Ainsi vous pourrez modifier la section pour l'adapter à votre setup (j'ai des valeurs différentes car j'ai deux stations de base netatmo et donc les ID changent) Allez-y mollo avec les exécutions car l'api de netatmo bloque après trop de demandes par minutes... $module_interne = $json_devices["body"]["devices"][0]["_id"]; $module_externe = $json_devices["body"]["modules"][1]["_id"]; $module_interne2 = $json_devices["body"]["modules"][2]["_id"]; $module_interne3 = $json_devices["body"]["modules"][3]["_id"]; $module_interne4 = $json_devices["body"]["modules"][4]["_id"]; Script PHP: thermtatmo.zip <?php //ini_set('display_errors', false); //set_exception_handler('ReturnError'); $parameter=$_GET['parameter']; $password="XXXXXXXXXXXXXX"; // netatmo password $username="XXXXXXXXXXX@XXXXXXXXXXXXXXX.com"; // netatmo username $app_id = "XXXXXXXXXXXXXXXXXXXXXX"; // netatmo $app_secret = "XXXXXXXXXXXXXXXXXXXXXX"; // netatmo $token_url = "https://api.netatmo.net/oauth2/token"; $postdata = http_build_query( array( 'grant_type' => "password", 'client_id' => $app_id, 'client_secret' => $app_secret, 'username' => $username, 'password' => $password, 'scope' => 'read_station read_thermostat write_thermostat' ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ) ); $context = stream_context_create($opts); $response = file_get_contents($token_url, false, $context); $params = null; $params = json_decode($response, true); // Section For Thermostat -------------------------------------- $therm_api_url = "https://api.netatmo.net/api/getuser?access_token=" . $params['access_token']."&app_type=app_thermostat"; $therm_requete = @file_get_contents($therm_api_url); $therm_url_devices = "https://api.netatmo.net/api/devicelist?access_token=" . $params['access_token']."&app_type=app_thermostat"; $therm_resulat_device = @file_get_contents($therm_url_devices); $therm_json_devices = json_decode($therm_resulat_device,true); $therm1_device = $therm_json_devices["body"]["modules"][0]["_id"]; $therm1_relay = $therm_json_devices["body"]["devices"][0]["_id"]; if ($parameter == "json_viewer_therm") { print(' <html> <style type="text/css"> body { font: 11pt arial; } #jsoneditor { width: 800px; height: 2000px; } </style> <head> <title><YAGDA></title> </head> <body> '); echo "nombre de devices Thermostat: " . count($therm_json_devices["body"]["devices"]) . "<br>"; for ($i = 0; $i <= count($therm_json_devices["body"]["devices"]) - 1; $i++) { echo "Station Name: " . $therm_json_devices["body"]["devices"][$i]["station_name"]; echo " - Device No: " . $i ." id: " . $therm_json_devices["body"]["devices"][$i]["_id"] . " Name: " . $therm_json_devices["body"]["devices"][$i]["module_name"] . "<br>"; } echo "<br>nombre de modules Thermostat: " . count($therm_json_devices["body"]["modules"]) . "<br>"; for ($i = 0; $i <= count($therm_json_devices["body"]["modules"]) - 1; $i++) { echo "Parent Device: " . $therm_json_devices["body"]["modules"][$i]["main_device"]; echo " - Module No: " . $i ." id: " . $therm_json_devices["body"]["modules"][$i]["_id"] . " Name: " . $therm_json_devices["body"]["modules"][$i]["module_name"] . "<br>"; } print(' <br> <link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor.css"/> <script src="jsoneditor/jsoneditor.js"></script> <div id="jsoneditor"></div> <script> var container = document.getElementById(\'jsoneditor\'); var options = { mode: "view" }; var json = '); echo $therm_resulat_device; print(' var editor = new jsoneditor.JSONEditor(container, options, json); </script> '); } if ($parameter == "xml_therm") { // setup Station continue $device1 = $therm_json_devices["body"]["modules"][0]["main_device"]; $module1 = $therm_json_devices["body"]["modules"][0]["_id"]; //$device2 = $therm_json_devices["body"]["modules"][1]["main_device"]; //$module2 = $therm_json_devices["body"]["modules"][1]["_id"]; //$device3 = $therm_json_devices["body"]["modules"][2]["main_device"]; //$module3 = $therm_json_devices["body"]["modules"][2]["_id"]; $url_thermostat1="http://api.netatmo.net/api/getthermstate?access_token=" . $params['access_token']."&device_id=".$device1."&module_id=".$module1; $value_thermostat1= file_get_contents($url_thermostat1); $json_mesures_thermostat1 = json_decode($value_thermostat1, true); $temperature_thermostat1 = $json_mesures_thermostat1["body"]["measured"]["temperature"]; $run_thermostat1 = $json_mesures_thermostat1["body"]["therm_relay_cmd"]; $setpoint_thermostat1=$json_mesures_thermostat1["body"]["measured"]["setpoint_temp"]; //$url_thermostat2="http://api.netatmo.net/api/getthermstate?access_token=" . $params['access_token']."&device_id=".$device2."&module_id=".$module2; //$value_thermostat2= file_get_contents($url_thermostat2); //$temperature_thermostat2 = $json_mesures_thermostat2["body"]["measured"]["temperature"]; //$run_thermostat2 = $json_mesures_thermostat2["body"]["therm_relay_cmd"]; //$setpoint_thermostat2=$json_mesures_thermostat2["body"]["measured"]["setpoint_temp"]; //$url_thermostat3="http://api.netatmo.net/api/getthermstate?access_token=" . $params['access_token']."&device_id=".$device3."&module_id=".$module3; //$value_thermostat3= file_get_contents($url_thermostat3); //$json_mesures_thermostat3 = json_decode($value_thermostat3, true); //$temperature_thermostat3 = $json_mesures_thermostat3["body"]["measured"]["temperature"]; //$run_thermostat3 = $json_mesures_thermostat3["body"]["therm_relay_cmd"]; //$setpoint_thermostat3=$json_mesures_thermostat3["body"]["measured"]["setpoint_temp"]; echo '<?xml version="1.0" encoding="utf8" ?>'; echo "<netatmo>"; echo "<Temp_Thermo_1>" . $temperature_thermostat1 . "</Temp_Thermo_1>"; echo "<Etat_Thermo_1>" . $run_thermostat1 . "</Etat_Thermo_1>"; // Etat du thermostat, 0 chaudiere a l'arret, 100 chaudiere en marche echo "<Consigne_Thermo_1>" . $setpoint_thermostat1 . "</Consigne_Thermo_1>"; //echo "<Temp_Thermo_2>" . $temperature_thermostat2 . "</Temp_Thermo_2>"; //echo "<Etat_Thermo_2>" . $run_thermostat2 . "</Etat_Thermo_2>"; //echo "<Consigne_Thermo_2>" . $setpoint_thermostat2 . "</Consigne_Thermo_2>"; //echo "<Temp_Thermo_3>" . $temperature_thermostat3 . "</Temp_Thermo_3>"; //echo "<Etat_Thermo_3>" . $run_thermostat3 . "</Etat_Thermo_3>"; //echo "<Consigne_Thermo_3>" . $setpoint_thermostat3 . "</Consigne_Thermo_3>"; echo "</netatmo>"; } if ($parameter == "json_therm") { echo $therm_resulat_device; } if ($parameter == "names_therm") { echo "nombre de devices: " . count($therm_json_devices["body"]["devices"]) . "<br>"; for ($i = 0; $i <= count($therm_json_devices["body"]["devices"]) - 1; $i++) { echo "Station Name: " . $therm_json_devices["body"]["devices"][$i]["station_name"]; echo " - Device No: " . $i ." id: " . $therm_json_devices["body"]["devices"][$i]["_id"] . " Name: " . $therm_json_devices["body"]["devices"][$i]["module_name"] . "<br>"; } echo "<br>nombre de modules: " . count($therm_json_devices["body"]["modules"]) . "<br>"; for ($i = 0; $i <= count($therm_json_devices["body"]["modules"]) - 1; $i++) { echo "Parent Device: " . $therm_json_devices["body"]["modules"][$i]["main_device"]; echo " - Module No: " . $i ." id: " . $therm_json_devices["body"]["modules"][$i]["_id"] . " Name: " . $therm_json_devices["body"]["modules"][$i]["module_name"] . "<br>"; } } if ($parameter == "therm1") { $url_mesures_therm1 = "https://api.netatmo.net/api/getthermstate?access_token=" . $params['access_token'] . "&device_id=" . $therm1_relay . "&module_id=".$therm1_device; $mesures_therm1 = file_get_contents($url_mesures_therm1); echo $mesures_therm1 ; } if ($parameter == "therm1_set_away") { $url_set_therm1 = "https://api.netatmo.net/api/setthermpoint?access_token=" . $params['access_token'] . "&device_id=" . $therm1_relay . "&module_id=" . $therm1_device. "&setpoint_mode=away"; $set_therm1 = file_get_contents($url_set_therm1); echo $set_therm1 ; } if ($parameter == "therm1_set_program") { $url_set_therm1 = "https://api.netatmo.net/api/setthermpoint?access_token=" . $params['access_token'] . "&device_id=" . $therm1_relay . "&module_id=" . $therm1_device. "&setpoint_mode=program"; $set_therm1 = file_get_contents($url_set_therm1); echo $set_therm1 ; } // Section For Weather Station ----------------------------------- $api_url = "https://api.netatmo.net/api/getuser?access_token=" . $params['access_token']; $requete = file_get_contents($api_url); $url_devices = "https://api.netatmo.net/api/devicelist?access_token=" . $params['access_token']; $resulat_device = file_get_contents($url_devices); $json_devices = json_decode($resulat_device,true); $json_objects = json_decode($resulat_device); $module_interne = $json_devices["body"]["devices"][0]["_id"]; $module_externe = $json_devices["body"]["modules"][1]["_id"]; $module_interne2 = $json_devices["body"]["modules"][2]["_id"]; $module_interne3 = $json_devices["body"]["modules"][3]["_id"]; $module_interne4 = $json_devices["body"]["modules"][4]["_id"]; if ($parameter == "json") { echo $resulat_device; } if ($parameter == "json_viewer") { print(' <html> <style type="text/css"> body { font: 11pt arial; } #jsoneditor { width: 800px; height: 2000px; } </style> <head> <title><YAGDA></title> </head> <body> '); echo "nombre de devices: " . count($json_devices["body"]["devices"]) . "<br>"; for ($i = 0; $i <= count($json_devices["body"]["devices"]) - 1; $i++) { echo "Station Name: " . $json_devices["body"]["devices"][$i]["station_name"]; echo " - Device No: " . $i ." id: " . $json_devices["body"]["devices"][$i]["_id"] . " Name: " . $json_devices["body"]["devices"][$i]["module_name"] . "<br>"; } echo "<br>nombre de modules: " . count($json_devices["body"]["modules"]) . "<br>"; for ($i = 0; $i <= count($json_devices["body"]["modules"]) - 1; $i++) { echo "Parent Device: " . $json_devices["body"]["modules"][$i]["main_device"]; echo " - Module No: " . $i ." id: " . $json_devices["body"]["modules"][$i]["_id"] . " Name: " . $json_devices["body"]["modules"][$i]["module_name"] . "<br>"; } print(' <br> <link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor.css"/> <script src="jsoneditor/jsoneditor.js"></script> <div id="jsoneditor"></div> <script> var container = document.getElementById(\'jsoneditor\'); var options = { mode: "view" }; var json = '); echo $resulat_device; print(' var editor = new jsoneditor.JSONEditor(container, options, json); </script> '); } if ($parameter == "names") { echo "nombre de devices: " . count($json_devices["body"]["devices"]) . "<br>"; for ($i = 0; $i <= count($json_devices["body"]["devices"]) - 1; $i++) { echo "Station Name: " . $json_devices["body"]["devices"][$i]["station_name"]; echo " - Device No: " . $i ." id: " . $json_devices["body"]["devices"][$i]["_id"] . " Name: " . $json_devices["body"]["devices"][$i]["module_name"] . "<br>"; } echo "<br>nombre de modules: " . count($json_devices["body"]["modules"]) . "<br>"; for ($i = 0; $i <= count($json_devices["body"]["modules"]) - 1; $i++) { echo "Parent Device: " . $json_devices["body"]["modules"][$i]["main_device"]; echo " - Module No: " . $i ." id: " . $json_devices["body"]["modules"][$i]["_id"] . " Name: " . $json_devices["body"]["modules"][$i]["module_name"] . "<br>"; } } if ($parameter == "selected_modules") { echo "Selected Modules: <br>"; echo "mod interne ----- (int): " . $module_interne . "<br>"; echo "mod externe ---- (ext): " . $module_externe . "<br>"; echo "mod interne2 (mod2): " . $module_interne2 . "<br>"; echo "mod interne3 (mod3): " . $module_interne3 . "<br>"; echo "mod interne4 (mod4): " . $module_interne4 . "<br>"; } if ($parameter == "int") { $url_mesures_internes = "https://api.netatmo.net/api/getmeasure?access_token=" . $params['access_token'] . "&device_id=" . $module_interne . "&scale=max&type=Temperature,CO2,Humidity,Pressure,Noise&date_end=last"; $mesures_internes = file_get_contents($url_mesures_internes); echo $mesures_internes ; } if ($parameter == "ext") { $url_mesures_externes = "https://api.netatmo.net/api/getmeasure?access_token=" . $params['access_token'] . "&device_id=" . $module_interne . "&module_id=" . $module_externe . "&scale=max&type=Temperature,Humidity&date_end=last"; $mesures_externes = file_get_contents($url_mesures_externes); echo $mesures_externes ; } if ($parameter == "mod2") { $url_mesures_internes2 = "https://api.netatmo.net/api/getmeasure?access_token=" . $params['access_token'] . "&device_id=" . $module_interne . "&module_id=" . $module_interne2 . "&scale=max&type=Temperature,Humidity,CO2&date_end=last"; $mesures_internes2 = file_get_contents($url_mesures_internes2); echo $mesures_internes2 ; } if ($parameter == "mod3") { $url_mesures_internes3 = "https://api.netatmo.net/api/getmeasure?access_token=" . $params['access_token'] . "&device_id=" . $module_interne . "&module_id=" . $module_interne3 . "&scale=max&type=Temperature,Humidity,CO2&date_end=last"; $mesures_internes3 = file_get_contents($url_mesures_internes3); echo $mesures_internes3 ; } if ($parameter == "mod4") { $url_mesures_internes4 = "https://api.netatmo.net/api/getmeasure?access_token=" . $params['access_token'] . "&device_id=" . $module_interne . "&module_id=" . $module_interne4 . "&scale=max&type=Temperature,Humidity,CO2&date_end=last"; $mesures_internes4 = file_get_contents($url_mesures_internes4); echo $mesures_internes4 ; } // Section Infos if ($parameter == "") { print(' <html> <style type="text/css"> body { font: 11pt arial; } </style> <head> <title><YAGDA></title> </head> <body> <br> Available parameters: <br><br> For Netatmo thermostat: <br><br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_viewer_therm'>http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_viewer_therm<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=xml_therm<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_therm'>http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_therm<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=names_therm'>http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=names_therm<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=therm1<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=therm1_set_away<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=therm1_set_program<br> <br><br> For Netatmo Weather:<br><br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=json_viewer<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=names<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=selected_modules<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=int<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=ext<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=mod2<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=mod3<br> http://XXX.XXX.XXX.XXX/netatmo/thermtatmo.php?parameter=mod4<br> '); } ?>
  10. Réservé LUA Vfib Comme promis, voici une nouvelle version, qui intègre aussi la possibilité de commander et lire les valeurs du thermostat Netatmo. Il y a en effet deux nouveaux boutons et deux lignes d'infos en plus. Ils permettent de commander le thermostat (j'utilise les boutons away/program avec le mode away/present de la maison, ainsi quand je ne suis pas là , pas de chauffage, c'est automatique, une chose de moins à penser, UNE !) Afin de permettre une migration facile, j'ai créé un fichier php différent (thermtatmo.php) et vous pouvez charger le nouveau virtual device en plus de votre setup actuel. Une fois que tout marchera, modifiez simplement la ligne local EmonCMS_Prefix = "NETATMO_TEST_REMOVE_WHEN_OK_" en local EmonCMS_Prefix = "NETATMO_" et désactivez (ou effacez) l'ancien Virtual device. (N'oubliez pas de modifier le script qui appuye toutes les 5 minutes sur le bouton update..) Vos graphiques emoncms continueront à être mis à jour comme si de rien n'était, sans coupure. Voici le virtual device: Netatmo_Thermostat.vfib Screenshot: Pour cette version, il faut utiliser le nouveau code php (thermtatmo.php) qui ajoute plein de fonction et une "aide" intégrée. Voir post suivant. Code principal (bouton update): J'ai essayé de commenter le code le plus possible, normalement avec ces commentaires, l'utilisation de ces scripts ne devrait pas trop poser de problème. Si vous avez besoin de précisions, demandez ----------------------------------------------------------------------------------------- -- Thermtatmo v3 -- Retreive Netatmo values for more than 2 modules, compute CO2 and push to EmonCMS -- Sebastien Jauquet -- Février 2015 -- Thanks to cedriclocqueneux, krikroff, i-magin and all contibutors to the netatmo code ----------------------------------------------------------------------------------------- -- Instructions: -- Create an free emoncms.org account -- Retrieve your Write API Key from it -- Create a Global variable (undefined) -> CO2_Max_Value to store the max value of CO2 of the house - if you dont need this, set CO2 to false (default: 0) -- Install my thermtatmo.php in your webserver and write his address in the ip Address of this module -- for each value you want to be pushed to emoncms, modify the section -- Push To EMONCMS -- below -- Create a block scene or use gea to click this button each 10 minutes (to avoid rejection from the api of Netatmo) -- V2.01 -- First released version -- V2.2 -- doesn't push to emonCMS if netatmo query return false -- V2.3 -- added push message to phone if error -- V3 -- changed name and added Netatmo thermostat retrieve and push modes away and program -- V3.1 -- Added customisation options for code Sharing local id = { PHONE_SEB = 1323, PHONE_GG = 53 } -- Prefix of the id of the inputs to be created in emoncms -- Use this for testing to not mess your current feeds with wrong values while testing -- When everything is ok, restore original prefix. I suggest "NETATMO_" and delete on emoncms the inputs created for testing -- local EmonCMS_Prefix = "NETATMO_" local EmonCMS_Prefix = "NETATMO_TEST_REMOVE_WHEN_OK_" ------------------------------------------------------------------------- local PushToEmonCMS = true -- true = push to emoncms - false = do not push local Thermostat = true -- true = get thermostat values - false = do not get them local VMC = true -- true = set in Global variable CO2_Max_Value the Max CO2 Value local selfId = fibaro:getSelfId(); local thismodule=fibaro:getSelfId() local domaine = fibaro:get(selfId, 'IPAddress') local PushItem local DoNotPush_Error = false local activatePush = true; -- activate push when netatmo error detected local ID_Smartphones = {id["PHONE_SEB"]}; -- list of device receiving Push local CO2_Max_Value_Local = 0 -- if you dont need this, set CO2 to false (default: 0) local emoncms = Net.FHttp("emoncms.org",80) local emoncms_api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -- your EMONCMS WRITE api Key EmonCMS = {}; if (temperature_exterieure==nil) then temperature_exterieure = ""; end if (humidite_exterieure==nil) then humidite_exterieure = ""; end if (temperature_interieure==nil) then temperature_interieure = ""; end if (humidite_interieure==nil) then humidite_interieure = ""; end if (co2==nil) then co2 = ""; end if (pression==nil) then pression = ""; end if (bruit==nil) then bruit = ""; end if (temperature_int_mod2==nil) then temperature_int_mod2 = ""; end if (humidite_int_mod2==nil) then humidite_int_mod2 = ""; end if (co2_mod2==nil) then co2_mod2 = ""; end if (temperature_int_mod3==nil) then temperature_int_mod3 = ""; end if (humidite_int_mod3==nil) then humidite_int_mod3 = ""; end if (co2_mod3==nil) then co2_mod3 = ""; end if (temperature_int_mod4==nil) then temperature_int_mod4 = ""; end if (humidite_int_mod4==nil) then humidite_int_mod4 = ""; end if (co2_mod4==nil) then co2_mod4 = ""; end if (temperature_therm1==nil) then temperature_therm1 = ""; end if (temperature_setpoint_therm1==nil) then temperature_setpoint_therm1 = ""; end if (relay_therm1==nil) then relay_therm1 = ""; end if (temperature_max==nil) then temperature_max = ""; end if (temperature_min==nil) then temperature_min = ""; end if(refreshUI==nil) then -- Loads in memory only the first occurence function refreshUI(therm, therm1, ext, bruit, titre, tempmod, co2mod, humidmod, lastupdate, laststatus) fibaro:call(selfId,"setProperty","ui.thermstatus.value",therm); fibaro:call(selfId,"setProperty","ui.thermostat1.value",therm1); fibaro:call(selfId,"setProperty","ui.ext.value",ext); fibaro:call(selfId,"setProperty","ui.bruit.value",bruit); fibaro:call(selfId,"setProperty","ui.titre.value",titre); fibaro:call(selfId,"setProperty","ui.tempmod.value",tempmod); fibaro:call(selfId,"setProperty","ui.co2mod.value",co2mod); fibaro:call(selfId,"setProperty","ui.humidmod.value",humidmod); fibaro:call(selfId,"setProperty","ui.lastupdate.value",lastupdate); fibaro:call(selfId,"setProperty","ui.laststatus.value",laststatus); end; end pushMessage = function (sendPush) if (activatePush) then for i=1, #ID_Smartphones do fibaro:call(tonumber(ID_Smartphones[i]), 'sendPush', sendPush); fibaro:debug(string.format('<%s style="color:%s;">%s</%s>', "span", "orange", "Push message ("..sendPush..") sent to mobile: "..tonumber(ID_Smartphones[i]), "span")); end end end if(getTherm1==nil) then -- Loads in memory only the first occurence function getTherm1(retry) retry = retry or 0 -- Setting up the connection data local FHTE = Net.FHttp(domaine, 80); -- Netatmo extérieur local response = FHTE:GET("/netatmo/thermtatmo.php?parameter=therm1"); -- decoding json string to table if (response~= nil) then local result = nil; result = json.decode(response); if (result ~= nil) then -- prevent: attempt to index field 'body' (a nil value) if (result.body ~= nil) then temperature_therm1 = result.body.measured.temperature or "n.c"; --fibaro:debug(temperature_therm1) temperature_setpoint_therm1 = result.body.measured.setpoint_temp or "n.c"; --fibaro:debug(temperature_setpoint_therm1) relay_therm1 = result.body.therm_relay_cmd or "n.c"; --fibaro:debug(relay_therm1) -- variable globale pour info sms local msg = "Température Thermostat 1 : "..temperature_therm1.."°C"; --fibaro:setGlobal("tempext", msg); return true; else fibaro:debug("Netatmo Therm1: erreur le " .. os.date()); if (result.error ~= nil) then fibaro:debug("error code: "..result.error.code..", message: "..result.error.message); end end else fibaro:debug("Netatmo Therm1: erreur decodage json le " .. os.date()); end else fibaro:debug("Netatmo Therm1:la reponse est null !"); end if ((retry or 5)< 5) then fibaro:debug("Retry #"..retry.."process, please wait..."); fibaro:sleep(5000); return getInt(tonumber(retry+1)); else return false; end end; end if(getExt==nil) then -- Loads in memory only the first occurence function getExt(retry) retry = retry or 0 -- Setting up the connection data local FHTE = Net.FHttp(domaine, 80); -- Netatmo extérieur local response = FHTE:GET("/netatmo/thermtatmo.php?parameter=ext"); -- decoding json string to table if (response~= nil) then local result = nil; result = json.decode(response); if (result ~= nil) then -- prevent: attempt to index field 'body' (a nil value) if (result.body ~= nil) then temperature_exterieure = result.body[1].value[1][1] or "n.c"; humidite_exterieure =result.body[1].value[1][2] or "n.c"; -- variable globale pour info sms local msg = "Température extérieure : "..temperature_exterieure.."°C"; fibaro:setGlobal("tempext", msg); return true; else fibaro:debug("Netatmo EXT: erreur le " .. os.date()); if (result.error ~= nil) then fibaro:debug("error code: "..result.error.code..", message: "..result.error.message); end end else fibaro:debug("Netatmo EXT: erreur decodage json le " .. os.date()); end else fibaro:debug("Netatmo EXT:la reponse est null !"); end if ((retry or 5)< 5) then fibaro:debug("Retry #"..retry.."process, please wait..."); fibaro:sleep(5000); return getInt(tonumber(retry+1)); else return false; end end; end if(getInt==nil) then -- Loads in memory only the first occurence function getInt(retry) retry = retry or 0; -- Setting up the connection data local FHTE = Net.FHttp(domaine, 80); -- Netatmo intérieur local response = FHTE:GET("/netatmo/thermtatmo.php?parameter=int"); -- decoding json string to table if (response~= nil) then local result = nil; result = json.decode(response); if (result ~= nil) then -- prevent: attempt to index field 'body' (a nil value) if (result.body ~= nil) then temperature_interieure = result.body[1].value[1][1] or "n.c"; humidite_interieure = result.body[1].value[1][3] or "n.c"; co2 = result.body[1].value[1][2] or "n.c"; pression = result.body[1].value[1][4] or "n.c"; bruit = result.body[1].value[1][5] or "n.c"; -- variable globale pour info sms fibaro:setGlobal("tempint", "Température intérieure : "..temperature_interieure.."°C"); return true; else fibaro:debug("Netatmo INT: erreur le " .. os.date()); if (result.error ~= nil) then fibaro:debug("error code: "..result.error.code..", message: "..result.error.message); end end else fibaro:debug("Netatmo INT: erreur decodage json le " .. os.date()); end else fibaro:debug("Netatmo INT:la reponse est null !"); end if ((retry or 5)< 5) then fibaro:debug("Retry #"..retry.."process, please wait..."); fibaro:sleep(5000); return getExt(tonumber(retry+1)); else return false; end end; end if(getMod2==nil) then -- Loads in memory only the first occurence function getMod2(retry) retry = retry or 0; -- Setting up the connection data local FHTE = Net.FHttp(domaine, 80); -- Netatmo intérieur local response = FHTE:GET("/netatmo/thermtatmo.php?parameter=mod2"); -- decoding json string to table if (response~= nil) then local result = nil; result = json.decode(response); if (result ~= nil) then -- prevent: attempt to index field 'body' (a nil value) if (result.body ~= nil) then temperature_int_mod2 = result.body[1].value[1][1] or "n.c"; humidite_int_mod2 = result.body[1].value[1][2] or "n.c"; co2_mod2 = result.body[1].value[1][3] or "n.c"; -- variable globale pour info sms -- fibaro:setGlobal("tempint", "Température intérieure : "..temperature_interieure.."°C"); return true; else fibaro:debug("Netatmo INT_mod2: erreur le " .. os.date()); if (result.error ~= nil) then fibaro:debug("error code: "..result.error.code..", message: "..result.error.message); end end else fibaro:debug("Netatmo INT_mod2: erreur decodage json le " .. os.date()); end else fibaro:debug("Netatmo INT_mod2:la reponse est null !"); end if ((retry or 5)< 5) then fibaro:debug("Retry #"..retry.."process, please wait..."); fibaro:sleep(5000); return getExt(tonumber(retry+1)); else return false; end end; end if(getMod3==nil) then -- Loads in memory only the first occurence function getMod3(retry) retry = retry or 0; -- Setting up the connection data local FHTE = Net.FHttp(domaine, 80); -- Netatmo intérieur local response = FHTE:GET("/netatmo/thermtatmo.php?parameter=mod3"); -- decoding json string to table if (response~= nil) then local result = nil; result = json.decode(response); if (result ~= nil) then -- prevent: attempt to index field 'body' (a nil value) if (result.body ~= nil) then temperature_int_mod3 = result.body[1].value[1][1] or "n.c"; humidite_int_mod3 = result.body[1].value[1][2] or "n.c"; co2_mod3 = result.body[1].value[1][3] or "n.c"; -- variable globale pour info sms -- fibaro:setGlobal("tempint", "Température intérieure : "..temperature_interieure.."°C"); return true; else fibaro:debug("Netatmo INT_mod3: erreur le " .. os.date()); if (result.error ~= nil) then fibaro:debug("error code: "..result.error.code..", message: "..result.error.message); end end else fibaro:debug("Netatmo INT_mod3: erreur decodage json le " .. os.date()); end else fibaro:debug("Netatmo INT_mod3:la reponse est null !"); end if ((retry or 5)< 5) then fibaro:debug("Retry #"..retry.."process, please wait..."); fibaro:sleep(5000); return getExt(tonumber(retry+1)); else return false; end end; end if(getMod4==nil) then -- Loads in memory only the first occurence function getMod4(retry) retry = retry or 0; -- Setting up the connection data local FHTE = Net.FHttp(domaine, 80); -- Netatmo intérieur local response = FHTE:GET("/netatmo/thermtatmo.php?parameter=mod4"); -- decoding json string to table if (response~= nil) then local result = nil; result = json.decode(response); if (result ~= nil) then -- prevent: attempt to index field 'body' (a nil value) if (result.body ~= nil) then temperature_int_mod4 = result.body[1].value[1][1] or "n.c"; humidite_int_mod4 = result.body[1].value[1][2] or "n.c"; co2_mod4 = result.body[1].value[1][3] or "n.c"; -- variable globale pour info sms -- fibaro:setGlobal("tempint", "Température intérieure : "..temperature_interieure.."°C"); return true; else fibaro:debug("Netatmo INT_mod4: erreur le " .. os.date()); if (result.error ~= nil) then fibaro:debug("error code: "..result.error.code..", message: "..result.error.message); end end else fibaro:debug("Netatmo INT_mod4: erreur decodage json le " .. os.date()); end else fibaro:debug("Netatmo INT_mod4:la reponse est null !"); end if ((retry or 5)< 5) then fibaro:debug("Retry #"..retry.."process, please wait..."); fibaro:sleep(5000); return getExt(tonumber(retry+1)); else return false; end end; end function EmonCMS:Push(payloademon) payloademon = "/input/post.json?json={" .. EmonCMS_Prefix .. payloademon .. "}&apikey=" .. emoncms_api_key response, status, errorCode = emoncms:GET(payloademon); fibaro:debug("Payload: " .. payloademon) ; fibaro:debug("response: " .. response .. " Status: " .. status .. " errorcode: " .. errorCode) ; fibaro:sleep(500); end local function main() -- retrieve values from thermtatmo.php (res = result) add or remove the one you need local resTherm1, resInt, resExt, resMod2, resMod3, resMod4 = false, false, false, false, false, false; if Thermostat == true then local status, err = pcall(function () resTherm1 = getTherm1(); end); fibaro:debug("Récupération des valeurs du Thermostat 1: " .. tostring(resTherm1)); if (status == false) then DoNotPush_Error = true; fibaro:debug("err: "..tostring(err or 'n.c')); end end local status, err = pcall(function () resInt = getInt(); end); fibaro:debug("Récupération des données intérieures: " .. tostring(resInt)); if (status == false) then DoNotPush_Error = true; fibaro:debug("err: "..tostring(err or 'n.c')); end local status, err = pcall(function () resExt = getExt(); end); fibaro:debug("Récupération des données extérieures : " .. tostring(resExt)); if (status == false) then DoNotPush_Error = true; fibaro:debug("err: "..tostring(err or 'n.c')); end local status, err = pcall(function () resMod2 = getMod2(); end); fibaro:debug("Récupération des données intérieures Mod2: " .. tostring(resMod2)); if (status == false) then DoNotPush_Error = true; fibaro:debug("err: "..tostring(err or 'n.c')); end local status, err = pcall(function () resMod3 = getMod3(); end); fibaro:debug("Récupération des données intérieures Mod3: " .. tostring(resMod3)); if (status == false) then DoNotPush_Error = true; fibaro:debug("err: "..tostring(err or 'n.c')); end local status, err = pcall(function () resMod4 = getMod4(); end); fibaro:debug("Récupération des données intérieures Mod4: " .. tostring(resMod4)); if (status == false) then DoNotPush_Error = true; fibaro:debug("err: "..tostring(err or 'n.c')); end fibaro:debug("1") if DoNotPush_Error == false then -- if no retreive values error from netatmo, then display values in the virtual device and push to emon cms -- add or remove in the right order and separated by comma the definition of the display in the VD (definition of the array for the refresh ui function) -- calculate Min and Max temperature: if Thermostat == false then fibaro:debug("not calculating Temp Max & Min Values") else temperature_max = temperature_interieure if temperature_int_mod2 > temperature_max then temperature_max = temperature_int_mod2 end if temperature_int_mod3 > temperature_max then temperature_max = temperature_int_mod3 end if temperature_int_mod4 > temperature_max then temperature_max = temperature_int_mod4 end temperature_min = temperature_interieure if temperature_int_mod2 < temperature_min then temperature_min = temperature_int_mod2 end if temperature_int_mod3 < temperature_min then temperature_min = temperature_int_mod3 end if temperature_int_mod4 < temperature_min then temperature_min = temperature_int_mod4 end end -- call function refresh ui with retreived parameters: refreshUI( "T° Therm - SetPoint - Max - Min", temperature_therm1.." Relais: "..relay_therm1.." - "..temperature_setpoint_therm1.." - "..temperature_max.." - "..temperature_min, "Ext: "..temperature_exterieure.." °C - "..humidite_exterieure.." % - "..pression.." mbar", "Bruit Rez: "..bruit.." dB", "Rez - Emilien - Thomas - Parents", temperature_interieure.." - "..temperature_int_mod2.." - "..temperature_int_mod3.." - "..temperature_int_mod4.." °C ", co2.." - "..co2_mod2.." - "..co2_mod3.." - "..co2_mod4.." ppm", humidite_interieure.." - "..humidite_int_mod2.." - "..humidite_int_mod3.." - "..humidite_int_mod4.." % ", os.date("%H:%M"), tostring(resInt).." "..tostring(resExt).." "..tostring(resMod2).." "..tostring(resMod3).." "..tostring(resMod4) ); -- Push To EMONCMS -- -- Syntax: payload = set label of input on emoncms .. variable containing the value if PushToEmonCMS == true then if Thermostat == true then payloademon = "temperature_1er:"..temperature_therm1 EmonCMS:Push(payloademon); payloademon = "temperature_set_point_1er:".. temperature_setpoint_therm1 EmonCMS:Push(payloademon); payloademon = "relais_chaudiere_1er:".. relay_therm1 EmonCMS:Push(payloademon); end payloademon = "temperature_exterieure:"..temperature_exterieure EmonCMS:Push(payloademon); payloademon = "humidite_exterieure:".. humidite_exterieure EmonCMS:Push(payloademon); payloademon = "pression:".. pression EmonCMS:Push(payloademon); payloademon = "bruit:".. bruit EmonCMS:Push(payloademon); payloademon = "temperature_interieure_Rez:".. temperature_interieure EmonCMS:Push(payloademon); payloademon = "temperature_int_mod2_Emilien:".. temperature_int_mod2 EmonCMS:Push(payloademon); payloademon = "temperature_int_mod3_Thomas:".. temperature_int_mod3 EmonCMS:Push(payloademon); payloademon = "temperature_int_mod4_Parents:".. temperature_int_mod4 EmonCMS:Push(payloademon); payloademon = "humidite_interieure_Rez:".. humidite_interieure EmonCMS:Push(payloademon); payloademon = "humidite_int_mod2_Emilien:".. humidite_int_mod2 EmonCMS:Push(payloademon); payloademon = "humidite_int_mod3_Thomas:".. humidite_int_mod3 EmonCMS:Push(payloademon); payloademon = "humidite_int_mod4_Parents:".. humidite_int_mod4 EmonCMS:Push(payloademon); payloademon = "co2_Rez:".. co2 EmonCMS:Push(payloademon); payloademon = "co2_mod2_Emilien:".. co2_mod2 EmonCMS:Push(payloademon); payloademon = "co2_mod3_Thomas:".. co2_mod3 EmonCMS:Push(payloademon); payloademon = "co2_mod4_Parents:".. co2_mod4 EmonCMS:Push(payloademon); end if VMC == true then -- Compute Value MAX CO2 Maison, store in global variable (to adjust the VMC Speed in another VD) if CO2_Max_Value_Local == false then fibaro:debug("not calculating nor storing CO2 Max Value") else CO2_Max_Value_Local = co2 if CO2_Max_Value_Local < co2_mod2 then CO2_Max_Value_Local = co2_mod2 end if CO2_Max_Value_Local < co2_mod3 then CO2_Max_Value_Local = co2_mod3 end if CO2_Max_Value_Local < co2_mod4 then CO2_Max_Value_Local = co2_mod4 end if tonumber(fibaro:getGlobalValue("CO2_Max_Value")) == CO2_Max_Value_Local then CO2_Max_Value_Local = CO2_Max_Value_Local +1; fibaro:debug("added 1 to Max CO2"); end -- so CO2_Max_Value_Local is not the same between measures and global var is modified and can be detected in other scenes fibaro:setGlobal("CO2_Max_Value", CO2_Max_Value_Local ) fibaro:debug("CO2_Max_Value: ".. CO2_Max_Value_Local ) end end else -- if error detected, to not push to emoncms and push message to phone fibaro:debug("push error") pushMessage("Error with netatmo device. resInt:" .. tostring(resInt).." resExt:"..tostring(resExt).." resMod2:"..tostring(resMod2).." resMod3:"..tostring(resMod3).." resMod4:"..tostring(resMod4).." resTherm1:"..tostring(resTherm1)); end end -- launch main();
  11. Je me posais la même question a la àlecture de ce fil...Sans doute un truc spécifique a la v4...
  12. Salut casino, je vais bientôt publier une nouvelle version.
  13. C simple pourtant, le fil rouge sur le bouton rouge, le fil vert sur le bouton vert...
  14. sebcbien

    Support Gea

    J'ai un drole de bug en gea, ça arrive une fois tous les 15 jours environ. Tout marche bien, puis j'ai une erreur: --> number must not be negative <-- ... et gea plante... ??? Voici le debug, et les seule lignes de ce gea (schedule only) Si quelqu'un à une idée, je suis preneur... vu que comme ça n'arrive jamais, je me vois mal activer le full debug. J'ai la dernière version de gea mais ça fait le problème depuis un gros mois je dirais.. Merci ! ------------------------ SCHEDULER ------------------------------------ -- Mise à jour des Présences par détection d'adresses MAC toutes les minutes -- Check dead nodes wakeup and email GEA.add(true, 1*60, "",{{"VirtualDevice", id["VD_PRESENCE_SEB"], "1"},{"VirtualDevice", id["VD_PRESENCE_GG"], "1"},{"Scenario",id["SCENE_EMAIL_DNODES"]},{"Repeat"}}) -- Schedule le check consomation toutes les 28 secondes si Away GEA.add(true, 1*60, "",{{"VirtualDevice", id["VD_CHECK_CONSO"], "1"},{"If", {{"Global", "PresentState", "Away"}}},{"Repeat"}}) -- Maj de l'EcoDevice Eau et Gaz toutes les 2 minutes GEA.add(true, 2*60, "",{{"VirtualDevice", id["VD_ECODEVICE_E_G"], "3"},{"Repeat"}}) -- Maj des graphiques ThingSpeak toutes les 6 minutes GEA.add(true, 6*60, "",{{"VirtualDevice", id["VD_THINGSPEAK"], "1"},{"Repeat"}}) -- Maj des graphiques EmonCMS toutes les 5 minutes GEA.add(true, 5*60, "",{{"VirtualDevice", id["VD_EMONCMS"], "1"},{"Repeat"}}) -- Maj des valeurs Netatmo et push to emoncms GEA.add(true, 5*60, "",{{"VirtualDevice", id["VD_NETATMO"], "1"},{"Repeat"}}) -- Maj des graphiques EmonCMS VMC si valeur CO2_Max_Value from VD_NETATMO change GEA.add({"Global!", "CO2_Max_Value", "100" }, -1, "",{{"Slider", id["VD_VMC"], "1", 50},{"Repeat"}}) Debug: [DEBUG] 23:51:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:51:23: [ Toujours ] sendActions : traitement des actions (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:51:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 60,3 (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : traitement des actions (ID:5) [VirtualDevice,75,1] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 75,1 (ID:5) [VirtualDevice,75,1] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : traitement des actions (ID:6) [VirtualDevice,1331,1] [Repeat] [DEBUG] 23:52:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 1331,1 (ID:6) [VirtualDevice,1331,1] [Repeat] [DEBUG] 23:52:24: Durée des traitements : 1s nouveau délai : 29s / tourne depuis 45h 45m 8s [DEBUG] 23:52:47: [ CO2_Max_Value=100 ] Add Global : ajout de la tache pour lancement instantané (ID:7) [Slider,78,1,50] [Repeat] [DEBUG] 23:52:47: GEA Version 5.33 : en exécution... [DEBUG] 23:52:47: [ CO2_Max_Value=100 ] sendActions : traitement des actions (ID:7) [Slider,78,1,50] [Repeat] [DEBUG] 23:52:47: [ CO2_Max_Value=100 ] sendActions : !ACTION! : Slider 78,1=50 (ID:7) [Slider,78,1,50] [Repeat] [DEBUG] 23:53:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:53:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:53:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:53:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:53:23: [ Toujours ] sendActions : traitement des actions (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:53:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 60,3 (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:54:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:54:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:54:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:54:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : traitement des actions (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 60,3 (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : traitement des actions (ID:4) [VirtualDevice,35,1] [Repeat] [DEBUG] 23:55:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 35,1 (ID:4) [VirtualDevice,35,1] [Repeat] [DEBUG] 23:56:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:56:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:56:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:56:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : traitement des actions (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 60,3 (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : traitement des actions (ID:5) [VirtualDevice,75,1] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 75,1 (ID:5) [VirtualDevice,75,1] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : traitement des actions (ID:6) [VirtualDevice,1331,1] [Repeat] [DEBUG] 23:57:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 1331,1 (ID:6) [VirtualDevice,1331,1] [Repeat] [DEBUG] 23:57:23: Durée des traitements : 0s nouveau délai : 30s / tourne depuis 45h 50m 7s [DEBUG] 23:57:44: [ CO2_Max_Value=100 ] Add Global : ajout de la tache pour lancement instantané (ID:7) [Slider,78,1,50] [Repeat] [DEBUG] 23:57:44: GEA Version 5.33 : en exécution... [DEBUG] 23:57:44: [ CO2_Max_Value=100 ] sendActions : traitement des actions (ID:7) [Slider,78,1,50] [Repeat] [DEBUG] 23:57:44: [ CO2_Max_Value=100 ] sendActions : !ACTION! : Slider 78,1=50 (ID:7) [Slider,78,1,50] [Repeat] [DEBUG] 23:58:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:58:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:58:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:58:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:59:23: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:59:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:59:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:59:23: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 23:59:23: [ Toujours ] sendActions : traitement des actions (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 23:59:23: [ Toujours ] sendActions : !ACTION! : VirtualDevice 60,3 (ID:3) [VirtualDevice,60,3] [Repeat] [DEBUG] 00:00:54: [ Toujours ] sendActions : traitement des actions (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 00:00:54: [ Toujours ] sendActions : !ACTION! : VirtualDevice 109,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 00:00:54: [ Toujours ] sendActions : !ACTION! : VirtualDevice 110,1 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [DEBUG] 00:00:54: [ Toujours ] sendActions : !ACTION! : Scene 71 (ID:1) [VirtualDevice,109,1] [VirtualDevice,110,1] [Scenario,71] [Repeat] [ERROR] 00:00:55: number must not be negative
  15. YYYYYYYYYYYYYEEEEEEEEEEEEEEESSSSSSSSSSSSSSSSSSSSS !!!! Quand ce sera réglé, il ne me restera plus que le(s) dernier(s) bug(s) Satel et je vous rejoindrai en V4
  16. Apparement il faudrait que quelqu'un leur envoie le template... voici la demande dans bugzilla: http://bugzilla.fibaro.com/view.php?id=2960
  17. Merci Krikroff, Voici ce que j'ai commandé hier soir pour étendre mon installation: Satel BR-STD-1 Proximity tag Satel GREY Plus Compact dual technology PIR+MW detector with MW antimask Satel KT-STD-1 Proximity card Satel B-4M Magnetic detector (metal housing, screened wiring) Satel INT-IORS DIN rail compatible 8-zones and 8-relay outputs module Satel INT-SCR-BL Multi-function keypad with proximity card reader Satel ACU-270 ABAX controller Satel APT-100 ABAX bidirectional remote control keyfob 12V 18Ah battery Satel APS-412 12V 4A Satel OPU-3P Enclosure Ca va me permettre d'activer/désactiver l'alarme avec une télécommande à retour d'état D'activer la porte de garage avec cette même télécommande (5 fonctions) D'ajouter des détecteurs de mouvement etc... (Voir besoin décrit ci-dessus) Je reçois ça mardi et j'espère m'attaquer à l'installation le WE...
  18. sebcbien

    Thermostat Netatmo

    Non, désolé, pas de thermostat NEST :-/ Ils ne sont pas assez flexible pour moi et le netatmo me convenait parfaitement. La base est la suivante: http://www.domotique-fibaro.fr/index.php/topic/3929-yagda-yet-another-graphic-data-analyser-netatmo-vmc-emoncms-json-viewer/#entry56852 mais grandement améliorée Je dois juste préciser une chose, c'est que j'ai très peu de temps libre à dédier et que donc je ne garantis pas un support de haut niveau... J'ai mis beaucoup de paramètres modifiables, rien de sorcier normalement, mais pour un archi-nul en lua et php, ça risque de ne pas le faire s'il faut modifier quelquechose
  19. sebcbien

    Thermostat Netatmo

    Bon, j'ai réussi àpiloter mon thermostat netatmo via la HC2 (je met et enlève le mode away quand je suis absent/présent) Je récupère aussi la T° Setpoint, la T° ambiante et l'état de l'actionneur. Si ça intéresse quelqu'un je peux partager. Ce script gère aussi la récupération de ma station netatmo avec 3 modules additionnels
  20. J'ai encore beaucoup travaillé sur le script php et lua, je peux maintenant gérer aussi le thermostat netatmo et récupérer ses données.
  21. Si, moi j'ai fait ça, et je remonte le tout sur emoncms. ça marche bien
  22. Bienvenue ! Pour les portes de garage, j'ai peur être un chouette script pour toi
  23. Bienvenue !
  24. Bienvenue !
  25. sebcbien

    Hello

    Bienvenue !
×
×
  • Créer...