You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit tested with V2020.2 (12706) without errors
When dzVents debug mode is active, a summary line with clock and CPU time
will be added to module.log for every script executed.
Copy file name to clipboardExpand all lines: dzVents/documentation/README.md
+27-14Lines changed: 27 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -615,7 +615,7 @@ Keywords recognized are "at, between, every, except, in, on " ( except supported
615
615
'on -3/4,4/7-', -- before 3/4 or after 4/7
616
616
617
617
'at 12:45-21:15 except at 18:00-18:30', -- between 12:45 and 21:15 but not between 18:00 and 18:30 ( except supported from 3.0.16 onwards )
618
-
'at daytime except on sun', -- between sunrise and sunset but not on Sundays
618
+
'at daytime except on sun', -- between sunrise and sunset but not on Sundays
619
619
620
620
-- or if you want to go really wild and combine them:
621
621
'at nighttime at 21:32-05:44 every 5 minutes on sat, sun except at 04:00', -- except supported from 3.0.16 onwards
@@ -700,8 +700,8 @@ The domoticz object holds all information about your Domoticz system. It has glo
700
700
-**time**: *[Time Object](#Time_object)*: Current system time. Additional to Time object attributes:
701
701
- **isDayTime**: *Boolean*
702
702
- **isNightTime**: *Boolean*
703
-
- **isCivilDayTime**: *Boolean*.
704
-
- **isCivilNightTime**: *Boolean*.
703
+
- **isCivilDayTime**: *Boolean*.
704
+
- **isCivilNightTime**: *Boolean*.
705
705
- **isToday**: *Boolean*. Indicates if the device was updated today
706
706
- **sunriseInMinutes**: *Number*. Number of minutes since midnight when the sun will rise.
707
707
- **sunsetInMinutes**: *Number*. Number of minutes since midnight when the sun will set.
@@ -927,7 +927,7 @@ If for some reason you miss a specific attribute or data for a device, then like
927
927
-**timedOut**: *Boolean*. Is true when the device couldn't be reached.
928
928
-**unit**: *Number*. Device unit. See device list in Domoticz' settings for the unit.
929
929
-**update(< params >)**: *Function*. Generic update method. Accepts any number of parameters that will be sent back to Domoticz. There is no need to pass the device.id here. It will be passed for you. Example to update a temperature: `device.update(0,12)`. This will eventually result in a commandArray entry `['UpdateDevice']='<idx>|0|12'`. Supports [command options](#Command_options_.28delay.2C_duration.2C_event_triggering.29).
930
-
930
+
931
931
### Device attributes and methods for specific devices
932
932
Note that if you do not find your specific device type here you can always inspect what is in the `rawData` attribute. Please let us know that it is missing so we can write an adapter for it (or you can write your own and submit it). Calling `myDevice.dump()` will dump all attributes and values for myDevice to the Domoticz log.
933
933
@@ -984,7 +984,7 @@ Note that if you do not find your specific device type here you can always inspe
984
984
-**untilDate**: *string in ISO 8601 format* or n/a .
985
985
-**updateSetPoint(setPoint, mode, until)**: *Function*. Update set point. Mode can be domoticz.EVOHOME_MODE_AUTO, domoticz.EVOHOME_MODE_TEMPORARY_OVERRIDE, domoticz.EVOHOME_MODE_FOLLOW_SCHEDULE or domoticz.EVOHOME_MODE_PERMANENT_OVERRIDE. You can provide an until date (in ISO 8601 format e.g.: `os.date("!%Y-%m-%dT%TZ")`). Supports [command options](#Command_options_.28delay.2C_duration.2C_event_triggering.29).
986
986
987
-
#### Evohome (controller)
987
+
#### Evohome (controller)
988
988
-**mode**: *string* <sup>3.0.0</sup>.
989
989
-**setMode(mode, dparm, action, ooc )**: *Function*. set mode for controller. Mode can be domoticz.EVOHOME_MODE_AUTO, domoticz.EVOHOME_MODE_AUTOWITHRESET, domoticz.EVOHOME_MODE_AUTOWITHECO, domoticz.EVOHOME_MODE_AWAY, domoticz.EVOHOME_MODE_DAYOFF, domoticz.EVOHOME_MODE_CUSTOM or domoticz.EVOHOME_MODE_HEATINGOFF. dParm <optional> can be a future time string (in ISO 8601 format e.g.: `os.date("!%Y-%m-%dT%TZ")`), a future time object, a future time as number of seconds since epoch or a number representing a positive offset in minutes (max 1 year). action <optional> (1 = run on action script, 0 = disable), ooc <optional> (1 = only trigger the event & log on change, 0 = always trigger & log)
990
990
@@ -1234,10 +1234,10 @@ There are many switch-like devices. Not all methods are applicable for all switc
1234
1234
-**direction**: *Number*. Degrees.
1235
1235
-**directionString**: *String*. Formatted wind direction like N, SE.
1236
1236
-**gust**: *Number*. ( in meters / second, might change in future releases to Meters/Counters settings for Wind Meter )
1237
-
-**gustMs**: *Number*. Gust ( in meters / second )
1237
+
-**gustMs**: *Number*. Gust ( in meters / second )
1238
1238
-**temperature**: *Number*
1239
1239
-**speed**: *Number*. Windspeed ( in the unit set in Meters/Counters settings for Wind Meter )
1240
-
-**speedMs**: *Number*. Windspeed ( in meters / second )
1240
+
-**speedMs**: *Number*. Windspeed ( in meters / second )
1241
1241
-**updateWind(bearing, direction, speed, gust, temperature, chill)**: *Function*. Bearing in degrees, direction in N, S, NNW etc, speed in m/s, gust in m/s, temperature and chill in Celsius. Use `domoticz.toCelsius()` to convert a Fahrenheit temperature to Celsius. Supports [command options](#Command_options_.28delay.2C_duration.2C_event_triggering.29).
1242
1242
1243
1243
#### Youless meter
@@ -1540,7 +1540,7 @@ local someTime = domoticz.time.makeTime() -- someTime = new domoticz time object
1540
1540
mmm-- abbreviated monthname(e.g. Sep) language depends on locale
1541
1541
mm-- month [01-12]
1542
1542
yyyy-- 4 digit year
1543
-
yy-- 2 digit year
1543
+
yy-- 2 digit year
1544
1544
hh-- hour 24-hour clock
1545
1545
ii-- hour 12-hour clock
1546
1546
MM-- minute
@@ -1576,7 +1576,7 @@ local someTime = domoticz.time.makeTime() -- someTime = new domoticz time object
1576
1576
-**millisecondsAgo**: *Number*. Number of milliseconds since the last update.
1577
1577
-**minutes**: *Number*
1578
1578
-**minutesAgo**: *Number*. Number of minutes since the last update.
1579
-
-**minutesSinceMidnight**: *Number*
1579
+
-**minutesSinceMidnight**: *Number*
1580
1580
-**month**: *Number*
1581
1581
-**monthAbbrName**: String. jan, feb, mar, etc
1582
1582
-**monthName**: *String*. January, February, etc
@@ -1599,7 +1599,7 @@ local someTime = domoticz.time.makeTime() -- someTime = new domoticz time object
1599
1599
domoticz.time.timestampToDate(60,'ddd mm mmm yyyy ii:MM mer','date time') --> 'Thu 01 Jan 1970 01:01 AM''
1600
1600
domoticz.time.timestampToDate(1598077445,'dd/mm/yy ii:MM mer nZero') --> '22/08/20 8:24 AM'
1601
1601
```
1602
-
1602
+
1603
1603
-**toUTC(string | table,[offset])**: *domoticz time object*. <sup>3.0.9</sup> returns domoticz time object based on first parameter (time as table or string) string format must be 'yyyy-mm-dd hh:mm:ss'. offset defaults to 0.
1604
1604
-**utcSystemTime**: *Table*. UTC system time (only when in UTC mode):
1605
1605
- **day**: *Number*
@@ -2096,7 +2096,7 @@ For every script file that defines persisted variables (using the `data={ … }`
2096
2096
2097
2097
domoticz/
2098
2098
scripts/
2099
-
dzVents/
2099
+
dzVents/
2100
2100
data/
2101
2101
__data_yourscript1.lua
2102
2102
__data_yourscript2.lua
@@ -2352,7 +2352,7 @@ Settings for dzVents are found in the Domoticz GUI: **Setup > Settings > Other >
2352
2352
- *Errors*,
2353
2353
- *Errors + minimal execution info*: Errors and some minimal information about which script is being executed and why,
2354
2354
- *Errors + minimal execution info + generic info*. Even more information about script execution and a bit more log formatting.
2355
-
- *Debug*. Shows everything and dzVents will create a file `domoticzData.lua` in the dzVents folder. This is a dump of all the data received by dzVents from Domoticz.. These data are used to create the entire dzVents data structure.
2355
+
- *Debug*. Shows everything and dzVents will create the files `domoticzData.lua` and `module.log` in the scripts/dzVents folder. `domoticzData.lua` is a dump of all the data received by dzVents from Domoticz and `module.log` is a summary of the execution time and CPU usage of the user scripts active during the debug period.
2356
2356
- *No logging*. As silent as possible.
2357
2357
2358
2358
# Troubleshooting
@@ -2367,9 +2367,22 @@ Make sure the active section in your script is set to `true`: `active = true`.
2367
2367
### Turn on debug logging
2368
2368
Activate debug logging in the settings (see above). This will produce a lot of extra messages in the Domoticz log (don't forget to turn it off when you are done troubleshooting!). It is best to monitor the log through the command line, as the log in the browser sometimes tends to not always show all log messages. See the Domoticz manual for how to do that.
2369
2369
2370
-
When debug logging is enabled, every time dzVents kicks into action (Domoticz throws an event) it will log it, and it will create a file `/path/to/domoticz/scripts/dzVents/domoticzData.lua` with a dump of the data sent to dzVents. These data lie at the core of the dzVents object model. You can open this file in an editor to see if your device/variable/scene/group/hardware is in there. Note that the data in the file are not exactly the same as what you will get when you interact with dzVents, but it is a good start. If your object is not in the data file, then you will not have access to it in dzVents and dzVents will not be able to match triggers with that object. Something's wrong if you expect your object to be in there but it is not (is the object active/used?).
2370
+
When debug logging is enabled, every time dzVents kicks into action (Domoticz throws an event) it will log it, and it will create the files `domoticzData.lua` and `module.log` in `/path/to/domoticz/scripts/dzVents`. `domoticzData.lua` is a dump of all the data received by dzVents from Domoticz. This data lie at the core of the dzVents object model. You can open this file in an editor to see if your device/variable/scene/group/hardware is in there. Note that the data in the file are not exactly the same as what you will get when you interact with dzVents, but it is a good start. If your object is not in the data file, then you will not have access to it in dzVents and dzVents will not be able to match triggers with that object. Something's wrong if you expect your object to be in there but it is not (is the object active/used?).
2371
+
`module.log` is a summary of the execution time and CPU usage of the user scripts active during the debug period.with a dump of the data sent to dzVents.
2372
+
2373
+
Example content of `module.log`
2374
+
```
2375
+
Startdate time - End date time (clk - CPU ) module / scriptname << type: "trigger"
Copy file name to clipboardExpand all lines: dzVents/documentation/README.wiki
+15-5Lines changed: 15 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -592,7 +592,7 @@ There are several options for time triggers. It is important to know that Domoti
592
592
'on -3/4,4/7-', -- before 3/4 or after 4/7
593
593
594
594
'at 12:45-21:15 except at 18:00-18:30', -- between 12:45 and 21:15 but not between 18:00 and 18:30 ( except supported from 3.0.16 onwards )
595
-
'at daytime except on sun', -- between sunrise and sunset but not on Sundays
595
+
'at daytime except on sun', -- between sunrise and sunset but not on Sundays
596
596
597
597
-- or if you want to go really wild and combine them:
598
598
'at nighttime at 21:32-05:44 every 5 minutes on sat, sun except at 04:00', -- except supported from 3.0.16 onwards
@@ -1525,7 +1525,7 @@ local someTime = domoticz.time.makeTime() -- someTime = new domoticz time object
1525
1525
mmm -- abbreviated monthname(e.g. Sep) language depends on locale
1526
1526
mm -- month [01-12]
1527
1527
yyyy -- 4 digit year
1528
-
yy -- 2 digit year
1528
+
yy -- 2 digit year
1529
1529
hh -- hour 24-hour clock
1530
1530
ii -- hour 12-hour clock
1531
1531
MM -- minute
@@ -2296,7 +2296,7 @@ Settings for dzVents are found in the Domoticz GUI: '''Setup > Settings >
2296
2296
** ''Errors'',
2297
2297
** ''Errors + minimal execution info'': Errors and some minimal information about which script is being executed and why,
2298
2298
** ''Errors + minimal execution info + generic info''. Even more information about script execution and a bit more log formatting.
2299
-
** ''Debug''. Shows everything and dzVents will create a file <code>domoticzData.lua</code> in the dzVents folder. This is a dump of all the data received by dzVents from Domoticz.. These data are used to create the entire dzVents data structure.
2299
+
** ''Debug''. Shows everything and dzVents will create the files <code>domoticzData.lua</code> and <code>module.log</code> in the scripts/dzVents folder. <code>domoticzData.lua</code> is a dump of all the data received by dzVents from Domoticz and <code>module.log</code> is a summary of the execution time and CPU usage of the user scripts active during the debug period.
2300
2300
** ''No logging''. As silent as possible.
2301
2301
2302
2302
= Troubleshooting =
@@ -2315,9 +2315,19 @@ Make sure the active section in your script is set to <code>true</code>: <code>a
2315
2315
2316
2316
Activate debug logging in the settings (see above). This will produce a lot of extra messages in the Domoticz log (don’t forget to turn it off when you are done troubleshooting!). It is best to monitor the log through the command line, as the log in the browser sometimes tends to not always show all log messages. See the Domoticz manual for how to do that.
2317
2317
2318
-
When debug logging is enabled, every time dzVents kicks into action (Domoticz throws an event) it will log it, and it will create a file <code>/path/to/domoticz/scripts/dzVents/domoticzData.lua</code> with a dump of the data sent to dzVents. These data lie at the core of the dzVents object model. You can open this file in an editor to see if your device/variable/scene/group/hardware is in there. Note that the data in the file are not exactly the same as what you will get when you interact with dzVents, but it is a good start. If your object is not in the data file, then you will not have access to it in dzVents and dzVents will not be able to match triggers with that object. Something’s wrong if you expect your object to be in there but it is not (is the object active/used?).
2318
+
When debug logging is enabled, every time dzVents kicks into action (Domoticz throws an event) it will log it, and it will create the files <code>domoticzData.lua</code> and <code>module.log</code> in <code>/path/to/domoticz/scripts/dzVents</code>. <code>domoticzData.lua</code> is a dump of all the data received by dzVents from Domoticz. This data lie at the core of the dzVents object model. You can open this file in an editor to see if your device/variable/scene/group/hardware is in there. Note that the data in the file are not exactly the same as what you will get when you interact with dzVents, but it is a good start. If your object is not in the data file, then you will not have access to it in dzVents and dzVents will not be able to match triggers with that object. Something’s wrong if you expect your object to be in there but it is not (is the object active/used?). <code>module.log</code> is a summary of the execution time and CPU usage of the user scripts active during the debug period.with a dump of the data sent to dzVents.
2319
2319
2320
-
Every time Domoticz starts dzVents and debug logging is enabled you should see these lines:
2320
+
Example content of <code>module.log</code>
2321
+
2322
+
<pre> Startdate time - End date time (clk - CPU ) module / scriptname << type: "trigger"
0 commit comments