https://play.google.com/store/apps/deta ... dcallbuddy
URL som ändrar status på en device i NexaHome.
<nexahome_ip_adress>:<port_nummer>/nexahome?psw=<lösenord>&device=<device_namn>&cmd=on
<nexahome_ip_adress>:<port_nummer>/nexahome?psw=<lösenord>&device=<device_namn>&cmd=on
Namn = Ding Dong
Enhet = 'Nexa --> Self Learning on/off'
Fjärrkontrollskod = genererad (Slumpa)
Namn = Missat Samtal
Enhet = 'Nexa --> Self Learning on/off'
Fjärrkontrollskod = genererad (Slumpa)
Starta om NexaHome och skapa en bsh fil med samma namn som 'Missat Samtal' enhetens id, t.ex. 48.bshNamn = Dörrklocka
Enhet/Fjärrkontrollskod = inläst (Scanna)
Code: Select all
missedcall_device = "Missat Samtal";
dingdong_device = "Ding Dong";
on_timer = "dingdong_on";
off_timer = "dingdong_off";
on_seconds = 600; // 10 minutes
off_seconds = 5;
if (timerIsRunning(on_timer)) {
stopTimer(on_timer);
}
if (deviceIsOn(missedcall_device)) {
echo(missedcall_device);
setData("ding_dong_ctr", "0");
deviceOn(dingdong_device);
startTimer(off_timer, off_seconds);
startTimer(on_timer, on_seconds);
}
Code: Select all
missedcall_device = "Missat Samtal";
dingdong_device = "Ding Dong";
on_timer = "dingdong_on";
off_timer = "dingdong_off";
on_seconds = 600; // 10 minutes
off_seconds = 5;
if (deviceIsOn(missedcall_device)) {
ding_dong_ctr = getData("ding_dong_ctr");
if (ding_dong_ctr == null) {
ding_dong_ctr = "0";
}
ctr = Integer.parseInt(ding_dong_ctr);
if (ctr < 30) {
setData("ding_dong_ctr", "" + (ctr + 1));
deviceOn(dingdong_device);
startTimer(off_timer, off_seconds);
startTimer(on_timer, on_seconds);
} else {
deviceOff(missedcall_device);
}
}
Code: Select all
dingdong_device = "Ding Dong";
deviceOff(dingdong_device);
Code: Select all
missedcall_device = "Missat Samtal";
if (executedByUpdate() && deviceIsOn(missedcall_device)) {
deviceOff(missedcall_device);
}