I have the following test event;
Code: Select all
return {
on = {
timer = {'every 15 minutes'},
devices = {'Badkamer verlichting'}
},
execute = function(domoticz, device, triggerInfo)
if(device.isDevice)then
domoticz.variables('BadkVerwarmingOnTime').set(os.time())
domoticz.variables('BadkVerwarmingOffTime').set(os.time())
device.dump()
end
end
}
When switching the device Off, nothing happens.
I tried to debug with some notifications and the loggin page and from execute line till the last "}", all notifications are send/received.
Also tried to dump the "device" variable and I noticed that only when the device is switch On, the paramater isDevice is precence.
When switch off, the parameter isScene is precence with the value "False".
So it looks like there's something wrong with this.
Don't no whats going on and/or what i'm doing wrong....
Hope somebody can help
Here's an log from switching the device on;
Code: Select all
2019-01-28 12:13:54.998 Status: dzVents: > hour: 12
2019-01-28 12:13:54.998 Status: dzVents: > isUTC: false
2019-01-28 12:13:54.998 Status: dzVents: > daysAgo: 0
2019-01-28 12:13:54.998 Status: dzVents: > isToday: true
2019-01-28 12:13:54.998 Status: dzVents: > minutes: 13
2019-01-28 12:13:54.998 Status: dzVents: > hoursAgo: 0
2019-01-28 12:13:54.998 Status: dzVents: > kodiPause()
2019-01-28 12:13:54.998 Status: dzVents: > updateTempHumBaro()
2019-01-28 12:13:54.998 Status: dzVents: > kodiStop()
2019-01-28 12:13:54.998 Status: dzVents: > baseType: device
2019-01-28 12:13:54.998 Status: dzVents: > hardwareID: 9
2019-01-28 12:13:54.998 Status: dzVents: > play()
2019-01-28 12:13:54.998 Status: dzVents: > setKelvin()
2019-01-28 12:13:54.999 Status: dzVents: > updateRadiation()
2019-01-28 12:13:54.999 Status: dzVents: > signalLevel: 12
2019-01-28 12:13:54.999 Status: dzVents: > armAway()
2019-01-28 12:13:54.999 Status: dzVents: > updateCustomSensor()
2019-01-28 12:13:54.999 Status: dzVents: > setWhiteMode()
2019-01-28 12:13:54.999 Status: dzVents: > updateVoltage()
2019-01-28 12:13:54.999 Status: dzVents: > updateVisibility()
2019-01-28 12:13:54.999 Status: dzVents: > updateP1()
2019-01-28 12:13:54.999 Status: dzVents: > icon: lightbulb
2019-01-28 12:13:54.999 Status: dzVents: > updateText()
2019-01-28 12:13:54.999 Status: dzVents: > timedOut: false
2019-01-28 12:13:54.999 Status: dzVents: > setRGB()
2019-01-28 12:13:54.999 Status: dzVents: > dump()
2019-01-28 12:13:54.999 Status: dzVents: > setNightMode()
2019-01-28 12:13:54.999 Status: dzVents: > changed: true
2019-01-28 12:13:54.999 Status: dzVents: > isDevice: true
2019-01-28 12:13:54.999 Status: dzVents: > hardwareName: Zwave
2019-01-28 12:13:54.999 Status: dzVents: > name: Badkamer verlichting
2019-01-28 12:13:54.999 Status: dzVents: > playFavorites()
2019-01-28 12:13:54.999 Status: dzVents: > active: true
2019-01-28 12:13:54.999 Status: dzVents: > updateWetness()
2019-01-28 12:13:54.999 Status: dzVents: > updateSoilMoisture()
2019-01-28 12:13:54.999 Status: dzVents: > armHome()
2019-01-28 12:13:54.999 Status: dzVents: > updateTempBaro()
2019-01-28 12:13:54.999 Status: dzVents: > decreaseBrightness()
2019-01-28 12:13:54.999 Status: dzVents: > rawData:
2019-01-28 12:13:54.999 Status: dzVents: > 1: 0
2019-01-28 12:13:54.999 Status: dzVents: > increaseBrightness()
2019-01-28 12:13:54.999 Status: dzVents: > updateMode()
2019-01-28 12:13:54.999 Status: dzVents: > updateRain()
2019-01-28 12:13:54.999 Status: dzVents: > updatePercentage()
2019-01-28 12:13:54.999 Status: dzVents: > _data:
2019-01-28 12:13:54.999 Status: dzVents: > lastUpdate: 2019-01-28 12:13:04
2019-01-28 12:13:54.999 Status: dzVents: > rawData:
2019-01-28 12:13:54.999 Status: dzVents: > 1: 0
2019-01-28 12:13:54.999 Status: dzVents: > baseType: device
2019-01-28 12:13:54.999 Status: dzVents: > deviceType: Light/Switch
2019-01-28 12:13:55.000 Status: dzVents: > signalLevel: 12
2019-01-28 12:13:55.000 Status: dzVents: > subType: Switch
2019-01-28 12:13:55.000 Status: dzVents: > switchTypeValue: 0
2019-01-28 12:13:55.000 Status: dzVents: > description: Alexa_Name: bathroom lights
2019-01-28 12:13:55.000 Status: dzVents: > timedOut: false
2019-01-28 12:13:55.000 Status: dzVents: > lastLevel: 0
2019-01-28 12:13:55.000 Status: dzVents: > changed: true
2019-01-28 12:13:55.000 Status: dzVents: > data:
2019-01-28 12:13:55.000 Status: dzVents: > _state: On
2019-01-28 12:13:55.000 Status: dzVents: > icon: lightbulb
2019-01-28 12:13:55.000 Status: dzVents: > hardwareType: OpenZWave USB
2019-01-28 12:13:55.000 Status: dzVents: > hardwareID: 9
2019-01-28 12:13:55.000 Status: dzVents: > usedByCamera: false
2019-01-28 12:13:55.000 Status: dzVents: > maxDimLevel: 100
2019-01-28 12:13:55.000 Status: dzVents: > hardwareName: Zwave
2019-01-28 12:13:55.000 Status: dzVents: > protected: false
2019-01-28 12:13:55.000 Status: dzVents: > _nValue: 1
2019-01-28 12:13:55.000 Status: dzVents: > hardwareTypeValue: 21
2019-01-28 12:13:55.000 Status: dzVents: > levelVal: 0
2019-01-28 12:13:55.000 Status: dzVents: > unit: 1
2019-01-28 12:13:55.000 Status: dzVents: > name: Badkamer verlichting
2019-01-28 12:13:55.000 Status: dzVents: > batteryLevel: 255
2019-01-28 12:13:55.000 Status: dzVents: > switchType: On/Off
2019-01-28 12:13:55.000 Status: dzVents: > deviceID: 00000801
2019-01-28 12:13:55.000 Status: dzVents: > id: 237
2019-01-28 12:13:55.000 Status: dzVents: > updateGas()
2019-01-28 12:13:55.000 Status: dzVents: > updateUV()
2019-01-28 12:13:55.000 Status: dzVents: > setDiscoMode()
2019-01-28 12:13:55.000 Status: dzVents: > bState: true
2019-01-28 12:13:55.000 Status: dzVents: > startPlaylist()
2019-01-28 12:13:55.000 Status: dzVents: > kodiSwitchOff()
2019-01-28 12:13:55.000 Status: dzVents: > stop()
2019-01-28 12:13:55.000 Status: dzVents: > deviceType: Light/Switch
2019-01-28 12:13:55.000 Status: dzVents: > updateTemperature()
2019-01-28 12:13:55.000 Status: dzVents: > updateElectricity()
2019-01-28 12:13:55.000 Status: dzVents: > hardwareType: OpenZWave USB
2019-01-28 12:13:55.000 Status: dzVents: > updateSetPoint()
2019-01-28 12:13:55.000 Status: dzVents: > updateHumidity()
2019-01-28 12:13:55.000 Status: dzVents: > switchOff()
2019-01-28 12:13:55.000 Status: dzVents: > levelVal: 0
2019-01-28 12:13:55.000 Status: dzVents: > updateDistance()
2019-01-28 12:13:55.000 Status: dzVents: > updateCounter()
2019-01-28 12:13:55.000 Status: dzVents: > state: On
2019-01-28 12:13:55.001 Status: dzVents: > usedByCamera: false
2019-01-28 12:13:55.001 Status: dzVents: > updateBarometer()
2019-01-28 12:13:55.001 Status: dzVents: > idx: 237
2019-01-28 12:13:55.001 Status: dzVents: > isSecurity: false
2019-01-28 12:13:55.001 Status: dzVents: > unit: 1
2019-01-28 12:13:55.209 Status: Set UserVariable BadkVerwarmingOnTime = 1548674035
2019-01-28 12:13:55.210 Status: Set UserVariable BadkVerwarmingOffTime = 1548674035
2019-01-28 12:13:57.242 (Zwave) General/kWh (kWh Meter)
2019-01-28 12:13:59.931 (Zwave) General/kWh (kWh Meter)
And here from switching it off;
Code: Select all
2019-01-28 12:25:33.650 Status: dzVents: > switchOn()
2019-01-28 12:25:33.650 Status: dzVents: > kodiStop()
2019-01-28 12:25:33.650 Status: dzVents: > setHotWater()
2019-01-28 12:25:33.650 Status: dzVents: > _adapters:
2019-01-28 12:25:33.651 Status: dzVents: > 1: Switch device adapter
2019-01-28 12:25:33.651 Status: dzVents: > updateTemperature()
2019-01-28 12:25:33.651 Status: dzVents: > updateMode()
2019-01-28 12:25:33.651 Status: dzVents: > setWhiteMode()
2019-01-28 12:25:33.651 Status: dzVents: > updateWind()
2019-01-28 12:25:33.651 Status: dzVents: > updateDistance()
2019-01-28 12:25:33.651 Status: dzVents: > updateRain()
2019-01-28 12:25:33.651 Status: dzVents: > updateYouless()
2019-01-28 12:25:33.651 Status: dzVents: > stop()
2019-01-28 12:25:33.651 Status: dzVents: > isGroup: false
2019-01-28 12:25:33.651 Status: dzVents: > updateWaterflow()
2019-01-28 12:25:33.651 Status: dzVents: > updateUV()
2019-01-28 12:25:33.651 Status: dzVents: > play()
2019-01-28 12:25:33.651 Status: dzVents: > updateTempBaro()
2019-01-28 12:25:33.651 Status: dzVents: > updateTempHum()
2019-01-28 12:25:33.651 Status: dzVents: > updateP1()
2019-01-28 12:25:33.651 Status: dzVents: > isSecurity: false
2019-01-28 12:25:33.651 Status: dzVents: > signalLevel: 12
2019-01-28 12:25:33.651 Status: dzVents: > deviceId: 00000801
2019-01-28 12:25:33.651 Status: dzVents: > armHome()
2019-01-28 12:25:33.651 Status: dzVents: > setState()
2019-01-28 12:25:33.651 Status: dzVents: > isVariable: false
2019-01-28 12:25:33.651 Status: dzVents: > disarm()
2019-01-28 12:25:33.651 Status: dzVents: > pause()
2019-01-28 12:25:33.651 Status: dzVents: > switchOff()
2019-01-28 12:25:33.651 Status: dzVents: > armAway()
2019-01-28 12:25:33.651 Status: dzVents: > updateCounter()
2019-01-28 12:25:33.651 Status: dzVents: > setDiscoMode()
2019-01-28 12:25:33.651 Status: dzVents: > _data:
2019-01-28 12:25:33.651 Status: dzVents: > changed: true
2019-01-28 12:25:33.651 Status: dzVents: > deviceID: 00000801
2019-01-28 12:25:33.651 Status: dzVents: > subType: Switch
2019-01-28 12:25:33.651 Status: dzVents: > description: Alexa_Name: bathroom lights
2019-01-28 12:25:33.651 Status: dzVents: > data:
2019-01-28 12:25:33.651 Status: dzVents: > _nValue: 0
2019-01-28 12:25:33.651 Status: dzVents: > icon: lightbulb
2019-01-28 12:25:33.651 Status: dzVents: > usedByCamera: false
2019-01-28 12:25:33.651 Status: dzVents: > hardwareName: Zwave
2019-01-28 12:25:33.651 Status: dzVents: > protected: false
2019-01-28 12:25:33.651 Status: dzVents: > hardwareTypeValue: 21
2019-01-28 12:25:33.651 Status: dzVents: > unit: 1
2019-01-28 12:25:33.651 Status: dzVents: > maxDimLevel: 100
2019-01-28 12:25:33.651 Status: dzVents: > hardwareType: OpenZWave USB
2019-01-28 12:25:33.651 Status: dzVents: > levelVal: 0
2019-01-28 12:25:33.651 Status: dzVents: > _state: Off
2019-01-28 12:25:33.652 Status: dzVents: > hardwareID: 9
2019-01-28 12:25:33.652 Status: dzVents: > rawData:
2019-01-28 12:25:33.652 Status: dzVents: > 1: 0
2019-01-28 12:25:33.652 Status: dzVents: > lastUpdate: 2019-01-28 12:17:30
2019-01-28 12:25:33.652 Status: dzVents: > signalLevel: 12
2019-01-28 12:25:33.652 Status: dzVents: > switchTypeValue: 0
2019-01-28 12:25:33.652 Status: dzVents: > switchType: On/Off
2019-01-28 12:25:33.652 Status: dzVents: > lastLevel: 0
2019-01-28 12:25:33.652 Status: dzVents: > batteryLevel: 255
2019-01-28 12:25:33.652 Status: dzVents: > baseType: device
2019-01-28 12:25:33.652 Status: dzVents: > timedOut: false
2019-01-28 12:25:33.652 Status: dzVents: > id: 237
2019-01-28 12:25:33.652 Status: dzVents: > name: Badkamer verlichting
2019-01-28 12:25:33.652 Status: dzVents: > deviceType: Light/Switch
2019-01-28 12:25:33.652 Status: dzVents: > baseType: device
2019-01-28 12:25:33.652 Status: dzVents: > timedOut: false
2019-01-28 12:25:33.652 Status: dzVents: > updateCustomSensor()
2019-01-28 12:25:33.652 Status: dzVents: > setRGB()
2019-01-28 12:25:33.652 Status: dzVents: > hardwareID: 9
2019-01-28 12:25:33.652 Status: dzVents: > changed: true
2019-01-28 12:25:33.652 Status: dzVents: > updateVoltage()
2019-01-28 12:25:33.652 Status: dzVents: > cancelQueuedCommands()
2019-01-28 12:25:33.652 Status: dzVents: > icon: lightbulb
2019-01-28 12:25:33.652 Status: dzVents: > hardwareId: 9
2019-01-28 12:25:33.652 Status: dzVents: > idx: 237
2019-01-28 12:25:33.652 Status: dzVents: > setKelvin()
2019-01-28 12:25:33.652 Status: dzVents: > maxDimLevel: 100
2019-01-28 12:25:33.652 Status: dzVents: > isTimer: false
2019-01-28 12:25:33.652 Status: dzVents: > hardwareTypeValue: 21
2019-01-28 12:25:33.652 Status: dzVents: > updateVisibility()
2019-01-28 12:25:33.652 Status: dzVents: > active: false
2019-01-28 12:25:33.652 Status: dzVents: > updateSoundLevel()
2019-01-28 12:25:33.652 Status: dzVents: > updateLux()
2019-01-28 12:25:33.652 Status: dzVents: > playFavorites()
2019-01-28 12:25:33.652 Status: dzVents: > description: Alexa_Name: bathroom lights
2019-01-28 12:25:33.652 Status: dzVents: > isScene: false
2019-01-28 12:25:33.652 Status: dzVents: > decreaseBrightness()
2019-01-28 12:25:33.652 Status: dzVents: > protected: false
2019-01-28 12:25:33.652 Status: dzVents: > increaseBrightness()
2019-01-28 12:25:33.652 Status: dzVents: > updateRadiation()
2019-01-28 12:25:33.652 Status: dzVents: > switchType: On/Off
2019-01-28 12:25:33.652 Status: dzVents: > updateWetness()
2019-01-28 12:25:33.652 Status: dzVents: > unit: 1
2019-01-28 12:25:33.653 Status: dzVents: > bState: false
2019-01-28 12:25:33.653 Status: dzVents: > _state: Off
2019-01-28 12:25:33.653 Status: dzVents: > updateSetPoint()
2019-01-28 12:25:33.653 Status: dzVents: > updateBarometer()
2019-01-28 12:25:33.653 Status: dzVents: > setVolume()
2019-01-28 12:25:33.653 Status: dzVents: > kodiSwitchOff()
2019-01-28 12:25:33.653 Status: dzVents: > _nValue: 0
2019-01-28 12:25:33.653 Status: dzVents: > deviceType: Light/Switch
2019-01-28 12:25:34.858 OpenZWave: Domoticz has send a Switch command! NodeID: 6 (0x06)
2019-01-28 12:25:34.872 (Zwave) Usage (Badkamer Verwarming(Watt))
2019-01-28 12:25:34.922 (Zwave) General/kWh (Badkamer Verwarming(kWh))
2019-01-28 12:25:34.930 (Zwave) Light/Switch (Badkamer Verwarming)
some extra info;
Running version 4.10362
Raspbian;
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Hardware:
Raspberry Pi 3 Model B Plus Rev 1.3