Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera Presence / Sirene impossible #19

Open
loicdeschamps opened this issue Aug 29, 2024 · 4 comments
Open

Camera Presence / Sirene impossible #19

loicdeschamps opened this issue Aug 29, 2024 · 4 comments

Comments

@loicdeschamps
Copy link

loicdeschamps commented Aug 29, 2024

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

@loicdeschamps
Copy link
Author

Nobody help me ?

@KiboOst
Copy link
Owner

KiboOst commented Oct 9, 2024

Sorry, I don't have siren anymore. Anyway I'm not sure echoing the $sirene status wwould be updated, but I guess you don't hear it ringing...

@loicdeschamps
Copy link
Author

loicdeschamps commented Oct 9, 2024 via email

@KiboOst
Copy link
Owner

KiboOst commented Oct 9, 2024

j'avais une presence avec sirene (qui a lachée) quand j'ai fais cette fonction et elle marchait très bien.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants