Und wie führt man diese Befehle aus IPS direkt aus?
so:
<?
$username = "admin";
$password = "0000";
$url = "http://192.168.2.167/jsondata.cgi";
//start
$post_data = 'data=[["settaggi",11,1]]';
//stop + go home
//$post_data = 'data=[["settaggi",12,1]]';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/x-www-form-urlencoded'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
print_r(json_decode($result));
?>
ausser start/stop+home laesst sich scheinbar nichts steuern.
Theoretisch koennte man die Timer programmieren. Ich moechte allerdings IPS entscheiden lassen.
Je nach Wetterlage
Und btw. Ich habe 2 Schleifen gelegt und schalte diese IPS gesteuert ueber einen Relaiskontakt um. Funktioniert problemlos.
Als naechstes kommen noch ein elektrischer Maehergaragentorantrieb und eine elektrische Zaundurchfahrtsklappe.
Gruss, Michael