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

  1. loicdeschamps commented on Oct 9, 2024

    @loicdeschamps
    Author

    Nobody help me ?

  2. KiboOst commented on Oct 9, 2024

    @KiboOst
    Owner

    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...

  3. loicdeschamps commented on Oct 9, 2024

    @loicdeschamps
    Author
  4. KiboOst commented on Oct 9, 2024

    @KiboOst
    Owner

    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

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