can anyone help with my kumoapp - Please those with programming skills

58 views
Skip to first unread message

steve

unread,
Feb 26, 2016, 7:45:36 AM2/26/16
to Wireless Sensor Tags
Hi all

I hope some of you could help me get this kumo app working. i have two parts that work perfectly  but i do not know how to join them.


var sensors = <#PIR sensor_[72]_N#>;
var phones = <~phone to notify on/off~>;
var wemo = <#WeMo_[82]_1#>;
var sounds = ["Quack","Single Click","Sosumi","Temple","Uh oh","Voltage","Whit","Wild Eep", "moof","Bip","Boing","ChuToy","Clink-Klank","Droplet","Indigo","Laugh", "Monkey"];
var timedOutHandlers=[], detectedHandlers=[];
for(var i=0;i<sensors.length;i++){
    timedOutHandlers[i]=function () {
            if (sensors.every(function (s) { return s.isTimedout; })){
                wemo.lightOff();
                phones.push(wemo.name + " is turned off", "", sounds[i]);
            }
        };
    detectedHandlers[i]=function () {
            wemo.lightOn();
            phones.push(wemo.name + " is turned on","",sounds[i]);
        };
}
    for(var i=0;i<sensors.length;i++){
        sensors[i].timedOut = timedOutHandlers[i];
        sensors[i].detected = detectedHandlers[i];
    }

this  works when pir triggers it turns on wemo switch and turns off when it times out. but i need to make it work with the schedule function.

var phones = <~phone to notify on/off~>;
    timedOutHandlers1=function () {
KumoApp.Log("Starting to push schedule 1");
                phones.push("schedule ran 1");
KumoApp.Log("DONE 1");
        };
    timedOutHandlers2=function () {
KumoApp.Log("Starting to push schedule 2");
                phones.push("schedule ran 2");
KumoApp.Log("DONE 2");
        };
<@Enable at@>.Task = function(){
timedOutHandlers1();
}
<@Disable at@>.Task = function(){
timedOutHandlers2();
}

this schedule funtion works but i cannot them to work together. Please help

Many thanks

Steve

steve

unread,
Feb 28, 2016, 8:24:33 AM2/28/16
to Wireless Sensor Tags
can no one help me with scheduling? Support?

Simon Ward

unread,
Feb 28, 2016, 11:31:57 AM2/28/16
to Wireless Sensor Tags
You could just use IFTTT to sheduke the kumo app?

S

steve

unread,
Feb 29, 2016, 2:59:48 AM2/29/16
to Wireless Sensor Tags
Hi Simon

thanks for the reply. I have looked at IFTTT to schedule the kumoapp (days of week and times)  but there is not one. i asked support to add it as a trigger but they said it could not be done as its very difficult and time consuming to change anything in IFTTT and be approved.

thanks

Steve

steve

unread,
Feb 29, 2016, 3:03:19 AM2/29/16
to Wireless Sensor Tags
Hi Simon

I looked at other IFTTT channels and might be able to do it with the date and time function. will give it a go. thanks Steve
Reply all
Reply to author
Forward
0 new messages