Hi in dzVents I use syntax for textdevice like:
domoticz.devices(1554).updateText('humidityTmin5: ' .. humidityTmin5)
That's OK. But what's a LUA syntax to update the textdevice?
Why? Well I am trying to use the domoticz LUA script for vent regulation based upon humidity but it fails.
Now I want to monitor the VAR's using a textdevice like:
domoticz.devices(1554).updateText('humidityTmin5: ' .. humidityTmin5 .. 'humidityTmin10: ' .. humidityTmin10 .. 'Humidity delta: ' .. delta .. 'humCounter:' .. humCounter .. 'fanFollowsProgram:' .. fanFollowsProgram )
TIA
-Bart
LUA syntax for textdevice
Moderator: leecollings
-
- Posts: 347
- Joined: Sunday 03 July 2016 16:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.3
- Location: Netherlands
- Contact:
LUA syntax for textdevice
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: LUA syntax for textdevice
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- habahabahaba
- Posts: 190
- Joined: Saturday 18 March 2023 14:44
- Target OS: Windows
- Domoticz version: 2024.4
- Contact:
Re: LUA syntax for textdevice
Code: Select all
local device = domoticz.devices(40) -- text device
local text = 'Str1 <br/> Str2 <br/> Str3'
local style = '<span style="color: red;">' .. text .. '</span>'
device.updateText(style)
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: LUA syntax for textdevice
This is the dzvents syntax, not the Lua syntax.habahabahaba wrote: ↑Tuesday 07 May 2024 20:04Code: Select all
local device = domoticz.devices(40) -- text device local text = 'Str1 <br/> Str2 <br/> Str3' local style = '<span style="color: red;">' .. text .. '</span>' device.updateText(style)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 347
- Joined: Sunday 03 July 2016 16:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.3
- Location: Netherlands
- Contact:
Re: LUA syntax for textdevice
@Waltervl
Thanks for pointing in direction for solution.
Should someone has converted the dz LUA script already in dzVents?
-Bart
Thanks for pointing in direction for solution.
Should someone has converted the dz LUA script already in dzVents?
-Bart
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: LUA syntax for textdevice
What script are you talking about? link?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 347
- Joined: Sunday 03 July 2016 16:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.3
- Location: Netherlands
- Contact:
Re: LUA syntax for textdevice
https://www.domoticz.com/wiki/Humidity_control
meanwhile I face strange behaviour with this script (in fact with the fanswitch)
it happened today that the fan got a switch-on command. The fan-switch icon showd fan is running. When I checked the fan itselves it appeared fan was not running.
Than I manually switched off the fan (via dz fan-icon) and switched on again causing the fan to start as expected.
Meanwhile later on same situation. Now I didnot do any thing manual . A few minutes later dz switched off the fan.
Weird control for me...
meanwhile I face strange behaviour with this script (in fact with the fanswitch)
it happened today that the fan got a switch-on command. The fan-switch icon showd fan is running. When I checked the fan itselves it appeared fan was not running.
Than I manually switched off the fan (via dz fan-icon) and switched on again causing the fan to start as expected.
Meanwhile later on same situation. Now I didnot do any thing manual . A few minutes later dz switched off the fan.
Weird control for me...
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
Arduino
KAKU
RfxCom
Zwave
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 espeasy
MQTT
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: LUA syntax for textdevice
Here the equivalent for dzvents is discussed: https://www.domoticz.com/forum/viewtopic.php?t=16765
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 0 guests