maybe stop using ai generated code and read the doc?
https://wiki.domoticz.com/DzVents:_next ... nd_methods
none of that attributes you are reading exist…
Search found 130 matches
- Saturday 27 September 2025 14:29
- Forum: dzVents
- Topic: dzVents domoticz.time object is completely nil (isWeekend, weekday, etc. all nil)
- Replies: 1
- Views: 39
- Monday 20 January 2025 16:54
- Forum: dzVents
- Topic: Something stupid , a dummy problem "actualWatt"
- Replies: 11
- Views: 1543
Re: Something stupid , a dummy problem "actualWatt"
first fix the basic error between
execute = function(dz, devices)
and
local kpmtt = domoticz.devices('Tot_Fornuis') -- Tot_Fornuis is a dummy. But .usage or .actualWatt doesn´t work !
use either domoticz or dz everywhere but not a mix
then follow the advice and find the type of the device to ...
execute = function(dz, devices)
and
local kpmtt = domoticz.devices('Tot_Fornuis') -- Tot_Fornuis is a dummy. But .usage or .actualWatt doesn´t work !
use either domoticz or dz everywhere but not a mix
then follow the advice and find the type of the device to ...
- Wednesday 15 January 2025 15:17
- Forum: dzVents
- Topic: global_data creating global constants
- Replies: 2
- Views: 738
Re: global_data creating global constants
the globalData table is the table set as `data` in your lua file. Move your constants table there (with `lastStateUserGPS`)
or put your PUSHOVER table inside helpers and access it with `domoticz.helpers.PUSHOVER.USERS.FAMILIE`
or put your PUSHOVER table inside helpers and access it with `domoticz.helpers.PUSHOVER.USERS.FAMILIE`
- Sunday 12 January 2025 16:31
- Forum: Z-Wave
- Topic: Fibaro Double Switch 2 don't trigger Script
- Replies: 7
- Views: 1378
Re: Fibaro Double Switch 2 don't trigger Script
check device name :
- is it unique? (did you rename the old switch with the ozw hardware?)
- check capitalization and trailing spaces too
- is it unique? (did you rename the old switch with the ozw hardware?)
- check capitalization and trailing spaces too
- Thursday 09 January 2025 16:17
- Forum: LUA
- Topic: return multiple values from function
- Replies: 7
- Views: 1540
Re: return multiple values from function
your skeleton function only initialize the first local variables, all other are nil.
Code: Select all
function ExtractElectrics(dev_switch, dev_volt, dev_watt, dev_kwh)
local switch, volt, watt, kwh = "a", "b", "c", "d"
return switch, volt, watt, kwh
end
- Friday 27 December 2024 22:56
- Forum: dzVents
- Topic: compare time from fixing time..
- Replies: 6
- Views: 1637
Re: compare time from fixing time..
have you just tried:andrehj wrote: But how can one compare two time objects named for instance "Time1" and "Time2"?![]()
Code: Select all
-- compare two times
print(Time1.compare(Time2).minutes)- Monday 16 December 2024 10:46
- Forum: dzVents
- Topic: Ikea Remote N2 dimming in DzVents
- Replies: 1
- Views: 350
Re: Ikea Remote N2 dimming in DzVents
add a `customEvents` trigger to your script.
On V4 trigger, set a persistent data, user variable or dummy switch to ON. Then call `domoticz.emitEvent(custom_trigger_name).afterSec(0.5)` to reenter your sript later. On custom event, check your dummy/variable, if still on, change level on your bulb ...
On V4 trigger, set a persistent data, user variable or dummy switch to ON. Then call `domoticz.emitEvent(custom_trigger_name).afterSec(0.5)` to reenter your sript later. On custom event, check your dummy/variable, if still on, change level on your bulb ...
- Wednesday 22 May 2024 10:41
- Forum: dzVents
- Topic: DZvents bug in handling httpResponses?
- Replies: 2
- Views: 916
Re: DZvents bug in handling httpResponses?
you should share both scripts. not much can be done without that (you explained the issue well, but i don't think anybody will look at the issue with just that)
- Thursday 25 April 2024 11:13
- Forum: dzVents
- Topic: invalid device active state after switchOn or switchOff
- Replies: 2
- Views: 887
Re: invalid device active state after switchOn or switchOff
this have been told several time. changes to device states (and probably user variables) are done after the script execution. (that's a good way to avoid infinite loops by the way)
during the execution of the script the states are fixed. if you want to track your changes for later use in the same ...
during the execution of the script the states are fixed. if you want to track your changes for later use in the same ...
- Monday 08 April 2024 15:19
- Forum: dzVents
- Topic: math.rand gives same results [solved]
- Replies: 7
- Views: 668
Re: math.rand gives same results
Your use of math.randomseed seems… random. It might overflow integer value and result in a no-op. Or the same value rounded every time so same sequence of generated numbers. Ideally, you should use math.randomseed(os.time()) only once before the whole disco commands.
Also lots of redundancy in your ...
Also lots of redundancy in your ...
- Wednesday 20 March 2024 10:04
- Forum: dzVents
- Topic: reading environment variables
- Replies: 2
- Views: 301
- Sunday 21 January 2024 17:52
- Forum: Suggestions
- Topic: dzvents wiki
- Replies: 2
- Views: 1570
Re: dzvents wiki
dzVents is a Lua API to domoticz (as explained in the wiki introduction)
the wiki is there to explain the API and domoticz specifics, not Lua syntax. if you want to learn Lua, you can find lots of web resources, but first there is https://www.lua.org/pil/contents.html as a good starting point
(maybe ...
the wiki is there to explain the API and domoticz specifics, not Lua syntax. if you want to learn Lua, you can find lots of web resources, but first there is https://www.lua.org/pil/contents.html as a good starting point
(maybe ...
- Saturday 20 January 2024 17:04
- Forum: dzVents
- Topic: Get rid of 'Couldn't connect to server' in log when httpResponses server is down
- Replies: 11
- Views: 1143
Re: Get rid of 'Couldn't connect to server' in log when httpResponses server is down
Maybe newly created devices are not “yet” available in dzVents. It might be a bug. You can try to either restart domoticz or disable/reenable scripts/dzvents in Parameters.
- Friday 19 January 2024 15:28
- Forum: Heating/cooling
- Topic: Nest integration
- Replies: 7
- Views: 3698
Re: Nest integration
I think Nest API stopped to work a few years ago when it was bought by Google. If there is a new API, nobody did port it to the domoticz plugin.
- Monday 15 January 2024 16:25
- Forum: dzVents
- Topic: Help on a script involving .filter() or ipairs()
- Replies: 2
- Views: 1350
Re: Help on a script involving .filter() or ipairs()
I'd do something like that:
local PIR = {
["Body Sensor Scala"] = {"switch1","switch2"},
["Body Sensor Camera"] = {"switch3","switch4"},
["Body Sensor Bagno"] = {"switch5","switch6"},
["Body Sensor Cucina"] = {"switch7","switch8"},
["Body Sensor Sottotetto"] = {"switch9","switch10 ...
local PIR = {
["Body Sensor Scala"] = {"switch1","switch2"},
["Body Sensor Camera"] = {"switch3","switch4"},
["Body Sensor Bagno"] = {"switch5","switch6"},
["Body Sensor Cucina"] = {"switch7","switch8"},
["Body Sensor Sottotetto"] = {"switch9","switch10 ...
- Wednesday 10 January 2024 15:21
- Forum: Other questions and discussions
- Topic: help with possible script
- Replies: 12
- Views: 13604
Re: help with possible script
Code: Select all
if (deviceName in pairs(switches)) then- Friday 05 January 2024 15:54
- Forum: Z-Wave
- Topic: Z-wave JS UI failed to open serial port
- Replies: 38
- Views: 46813
Re: Z-wave JS UI failed to open serial port
In your mosquitto directory, the docker compose file should be completely different and should look like
https://github.com/vvatelot/mosquitto-d ... mpose.yaml
https://github.com/vvatelot/mosquitto-d ... mpose.yaml
- Friday 05 January 2024 11:48
- Forum: Z-Wave
- Topic: Easiest way to migrate Openzwave to ZWave-JS-UI
- Replies: 493
- Views: 295179
Re: Easiest way to migrate Openzwave to ZWave-JS-UI
so in short: if you cant use /dev/serial/by-id you are screwed and cant use the zwave anymore??
You can still use default devices names (could change if you plug something more and reboot) or use persistent usb devices,
https://www.domoticz.com/wiki/PersistentUSBDevices
if zwave is so hard ...
- Friday 05 January 2024 11:43
- Forum: Z-Wave
- Topic: Z-wave JS UI failed to open serial port
- Replies: 38
- Views: 46813
Re: Z-wave JS UI failed to open serial port
remko2000 wrote: Friday 05 January 2024 11:13 Tried it and fill ' /dev/serial/by-id/usb-0658_0200-if00' in in the zwave js ui. Still the same error.............
/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave should be in your docker compose file in the ports section
/dev/zwave should be in you zwave js ui
- Thursday 04 January 2024 16:44
- Forum: Z-Wave
- Topic: Z-wave JS UI failed to open serial port
- Replies: 38
- Views: 46813
Re: Z-wave JS UI failed to open serial port
also not sure about your MQTT server. It should have its docker compose file in its own directory (if you go that way like described in the wiki).
those are 2 different docker images
those are 2 different docker images