Get nil from Uservariable  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
azonneveld
Posts: 189
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Get nil from Uservariable

Post by azonneveld »

Image

What is happening here!??!!?
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe (sems&modbus) - open weather map - wol - BBQ detection - rsync backup - zendure
User avatar
waltervl
Posts: 7011
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Get nil from Uservariable  [Solved]

Post by waltervl »

I would remove all the fuzz with tonumber and the extra log function in the execute part:

Code: Select all

 local WekkerTime = dz.variables('yourvariable').value
 dz.log(WekkerTime)
Edit: added .value and typo
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
jvdz
Posts: 2476
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Get nil from Uservariable

Post by jvdz »

... or try dz.variables('variablename').value
User avatar
waltervl
Posts: 7011
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Get nil from Uservariable

Post by waltervl »

jvdz wrote: Friday 31 July 2026 8:28 ... or try dz.variables('variablename').value
and try :)
I missed that one....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
azonneveld
Posts: 189
Joined: Wednesday 02 October 2019 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Get nil from Uservariable

Post by azonneveld »

That seems to work
Thanks!
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe (sems&modbus) - open weather map - wol - BBQ detection - rsync backup - zendure
Post Reply