KumoApp.tick question

34 views
Skip to first unread message

john simano

unread,
Oct 9, 2018, 3:59:02 PM10/9/18
to Wireless Sensor Tags
I am new to Kumo apps and have no experience with Javascript before this. The code below is just from me getting used to KumoApps and is not entirely useful as-is.

Can someone explain two things:

1) why does this code always output CurrTime as "0001-01-01T00:00:00", and not the actual date/time?
2) why is tag.name sometimes "null"?

Code:
var tags = <#tags_[12|13|32|52|62|72|21]_N#>;
tags.forEach(
function (tag){
    tag.updated = function(){
        if((new Date()).getHours()==9){
            var CurrTime=KumoApp.FormatDateTime(KumoApp.tick,"s")
            KumoApp.Log(CurrTime+": "+tag.name+": "+tag.temperature);
        }
    }
}
);


Sample log:
10/9/2018 5:54 AM    0001-01-01T00:00:00: thermostat: 22.77777777777778
10/9/2018 5:53 AM    0001-01-01T00:00:00: null: 22.77777777777778
10/9/2018 5:51 AM    0001-01-01T00:00:00: attic: 21.304888513353138
10/9/2018 5:51 AM    0001-01-01T00:00:00: thermostat: 22.77777777777778

john simano

unread,
Oct 23, 2018, 10:32:45 AM10/23/18
to Wireless Sensor Tags
No one with experience on using KumoApp.tick? has anyone seen this issue? has any used it successfully?

john simano

unread,
Nov 16, 2018, 2:25:33 PM11/16/18
to Wireless Sensor Tags
If anyone is using KumoApp.tick successfully today, or if you are familiar with KumoApps and know what I am doing wrong, it would be great if you can provide feedback.

Thanks

Zhiheng Cao

unread,
Nov 16, 2018, 3:04:14 PM11/16/18
to john simano, wireless-s...@googlegroups.com
It is KumoApp.Tick not "tick". In Javascript, the case of
variable/property matters.
On Fri, Nov 16, 2018 at 11:25 AM john simano <jason.p...@gmail.com> wrote:
>
> If anyone is using KumoApp.tick successfully today, or if you are familiar with KumoApps and know what I am doing wrong, it would be great if you can provide feedback.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups "Wireless Sensor Tags" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wireless-sensor-...@googlegroups.com.
> To post to this group, send email to wireless-s...@googlegroups.com.
> Visit this group at https://groups.google.com/group/wireless-sensor-tags.
> For more options, visit https://groups.google.com/d/optout.

john simano

unread,
Nov 16, 2018, 3:48:34 PM11/16/18
to Wireless Sensor Tags
Thanks. That helped!
There was somewhere I thought I saw lowercase "tick", so that is why I used lowercase. But now I can't figure out where I saw that.

Thanks again.
Reply all
Reply to author
Forward
0 new messages