-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi
How to run the sirene ? i use this code
<?php
$Netatmo_app_id = 'xxxxx';
$Netatmo_app_secret= 'xxxx';
require($_SERVER['DOCUMENT_ROOT']."/netatmo/splNetatmoAPI.php");
$_splNetatmo = new splNetatmoAPI($Netatmo_app_id, $Netatmo_app_secret);
if (isset($_splNetatmo->error)) die($_splNetatmo->error);
$Cam=$_GET['Cam'];
if (!$Cam) $Cam="Welcome";
$Arg=$_GET['Arg'];
$Arg2=$_GET['Arg2'];
echo $Cam."<br>".$Arg."<br>".$Arg2."<hr>";
switch($Arg)
{
// ++++++++++++++++++++++++++ PRESENCE +++++++++++++++++++++++++++++
// Sirene Presence
case 'setSirene':
$sirene = $_splNetatmo->setSirenStatus($Cam, $Arg2);
//You can always echo answer to check result ok, or error:
echo "<pre>sirene:<br>".json_encode($sirene, JSON_PRETTY_PRINT)."</pre><br>";
break;
`
I use
http://192.168.xx.xx/camera-netatmo.php?Cam=Garage&Arg=setSirene&Arg2=1
Result
Garage
setSirene
1
sirene:
null
Metadata
Metadata
Assignees
Labels
No labels