Code: Select all
dev = indigo.devices[1596829398] #radio alarm clock
time = (dev.states["startTime"])
indigo.variable.updateValue(1352903259, str(time))
thanks!
Code: Select all
dev = indigo.devices[1596829398] #radio alarm clock
time = (dev.states["startTime"])
indigo.variable.updateValue(1352903259, str(time))
Code: Select all
dev = indigo.devices[1596829398] #radio alarm clock
t = (dev.states["startTime"])
indigo.variable.updateValue(1352903259, str(t[11:16]))
Code: Select all
using terms from application "IndigoServer"
tell application "IndigoServer"
set HomeReadout to value of variable "Home" as string
set value of variable "HomeReadout" to (characters 17 through -1 of HomeReadout) as text
end tell
end using terms fromCode: Select all
HomeReadout = indigo.variables[306104832].value #HomeReadout
Home = indigo.variables[1596654921].value #Home
indigo.variable.updateValue(HomeReadout, str(Home[17:-1]))Code: Select all
Script Error embedded script: No module named variable_watcher
Script Error Exception Traceback (most recent call shown last):
embedded script, line 1, at top level
ImportError: No module named variable_watcherCode: Select all
Script Error embedded script: invalid syntax
Script Error around line 31 - "pass"Change last line toHomeReadout = indigo.variables[306104832].value #HomeReadout
Home = indigo.variables[1596654921].value #Home
indigo.variable.updateValue(HomeReadout, str(Home[17:-1]))
Code: Select all
indigo.variable.updateValue(306104832, str(Home[17:-1]))Code: Select all
EPS - Alarm Clock Error Error in plugin execution ExecuteAction:
Traceback (most recent call last):
File "plugin.py", line 114, in deviceActions
KeyError: key not found in databaseThat's a different error...hamw wrote:I don't think you can turn off all days. It's not just Wednesday, it's the last one you try to turn off.
Code: Select all
EPS - Alarm Clock Error Control page attempted to turn off every day of the week, this isn't possible. It's easier to just turn off the alarm!Code: Select all
from datetime import datetime
alarmClock = indigo.devices[402185762]
newTime = "05:30" # replace later with a variable or something
oldDelta = alarmClock.durationMinutes
newDelta = newTime - alarmClock.startTime # will need to convert newTime to a datetime object
diference = newDelta - oldDelta
if diference > 0: # add time to duration
pluginId = "com.eps.indigoplugin.alarm-clock"
alarmClockPlugin = indigo.server.getPlugin(pluginId)
if alarmClockPlugin.isEnabled():
alarmClockPlugin.executeAction("increaseDuration", deviceId=402185762, props={'stepIncrement':diference})
else: # difference is a negative number, so subtract from current duration
pluginId = "com.eps.indigoplugin.alarm-clock"
alarmClockPlugin = indigo.server.getPlugin(pluginId)
if alarmClockPlugin.isEnabled():
alarmClockPlugin.executeAction("decreaseDuration", deviceId=402185762, props={'stepIncrement':diference})