Search found 129 matches
- Monday 20 January 2025 16:54
- Forum: dzVents
- Topic: Something stupid , a dummy problem "actualWatt"
- Replies: 11
- Views: 1138
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 ...
- Wednesday 15 January 2025 15:17
- Forum: dzVents
- Topic: global_data creating global constants
- Replies: 2
- Views: 646
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: 842
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: 1028
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: 1602
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: 341
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 ...
- Wednesday 22 May 2024 10:41
- Forum: dzVents
- Topic: DZvents bug in handling httpResponses?
- Replies: 2
- Views: 867
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: 868
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 ...
- Monday 08 April 2024 15:19
- Forum: dzVents
- Topic: math.rand gives same results [solved]
- Replies: 7
- Views: 633
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 c ...
- Wednesday 20 March 2024 10:04
- Forum: dzVents
- Topic: reading environment variables
- Replies: 2
- Views: 277
- Sunday 21 January 2024 17:52
- Forum: Suggestions
- Topic: dzvents wiki
- Replies: 2
- Views: 1520
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 ...
- 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: 1094
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: 3103
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: 1305
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"}, } -- test ...
- Wednesday 10 January 2024 15:21
- Forum: Other questions and discussions
- Topic: help with possible script
- Replies: 12
- Views: 13454
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: 44975
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: 474
- Views: 289668
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 to use ...
- Friday 05 January 2024 11:43
- Forum: Z-Wave
- Topic: Z-wave JS UI failed to open serial port
- Replies: 38
- Views: 44975
Re: Z-wave JS UI failed to open serial port
/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: 44975
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
- Thursday 04 January 2024 16:38
- Forum: Z-Wave
- Topic: Z-wave JS UI failed to open serial port
- Replies: 38
- Views: 44975
Re: Z-wave JS UI failed to open serial port
in the field “Serial Port” of your zwave JS (the one on port 8091/#/settings), there you should only put ”/dev/zwave”
the docker compose file tells to map external (out of docker) usb device by ID to internal (where zwave js runs) /dev/zwave
the docker compose file tells to map external (out of docker) usb device by ID to internal (where zwave js runs) /dev/zwave