Skip to content

Camera Presence / Sirene impossible #19

Description

@loicdeschamps

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions