From cdcbb1340de92683f4926066e207664b5a44c1c7 Mon Sep 17 00:00:00 2001 From: Nate Clark Date: Thu, 16 Apr 2020 23:15:04 -0400 Subject: [PATCH] fix momentary when times is null --- src/lfs/aws_iot.lua | 2 +- src/lfs/device.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lfs/aws_iot.lua b/src/lfs/aws_iot.lua index 811eeb8..85d53a2 100644 --- a/src/lfs/aws_iot.lua +++ b/src/lfs/aws_iot.lua @@ -88,7 +88,7 @@ c:on('message', function(_, topic, message) table.insert(sensorPut, endState) -- set state back to initial after momentary is complete - if payload.momentary and payload.times > 0 then + if payload.momentary and payload.times ~= -1 then revertIn = (payload.momentary + payload.pause) * payload.times - payload.pause tmr.create():alarm(revertIn, tmr.ALARM_SINGLE, function() local revertState = { pin = endState.pin, state = endState.state == 0 and 1 or 0} diff --git a/src/lfs/device.lua b/src/lfs/device.lua index 44f4347..37f3d1a 100644 --- a/src/lfs/device.lua +++ b/src/lfs/device.lua @@ -2,7 +2,7 @@ local me = { id = "uuid:8f655392-a778-4fee-97b9-4825918" .. string.format("%x", node.chipid()), name = "Konnected", hwVersion = "2.3.0", - swVersion = "2.3.4", + swVersion = "2.3.5", http_port = math.floor(node.chipid()/1000) + 8000, urn = "urn:schemas-konnected-io:device:Security:1" }