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
Copy file name to clipboardExpand all lines: dzVents/documentation/README.md
+15-9Lines changed: 15 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Just to give you an idea! Everything in your Domoticz system is now logically av
70
70
71
71
# Using dzVents with Domoticz
72
72
In Domoticz go to **Setup > Settings > Other** and in the section EventSystem make sure the checkbox 'dzVents disabled' is not checked.
73
-
Also make sure that in the Security section in the settings you allow `127.0.0.1` to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in **Setup > Settings > System > Location**, otherwise there is no way to determine nighttime/daytime state.
73
+
Also make sure that in the Security section in the settings **(Setup > Settings > System > Local Networks (no username/password)**you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in **Setup > Settings > System > Location**, otherwise there is no way to determine nighttime/daytime state.
74
74
75
75
There are two ways of creating dzVents event scripts in Domoticz:
76
76
@@ -1092,7 +1092,6 @@ Use this in combination with the various dzVents time attributes:
1092
1092
print(t.compare(anotherTime).secs) -- diff in seconds between t and anotherTime.
1093
1093
1094
1094
```
1095
-
1096
1095
### Time properties and methods
1097
1096
1098
1097
Creation:
@@ -1102,16 +1101,19 @@ local now = Time() -- current time
1102
1101
local someTime = Time('2017-12-31 22:19:15')
1103
1102
local utcTime = Time('2017-12-31 22:19:15', true)
1104
1103
```
1105
-
1104
+
-**civTwilightEndInMinutes**: *Number*. Minutes from midnight until civTwilightEnd.
1105
+
-**civTwilightStartInMinutes**:*Number*. Minutes from midnight until civTwilightStart.
1106
1106
-**compare(time)**: *Function*. Compares the current time object with another time object. *Make sure you pass a Time object!* Returns a table (all values are *positive*, use the compare property to see if *time* is in the past or future):
1107
-
+**milliseconds**: Total difference in milliseconds.
1108
-
+**seconds**: Total difference in whole seconds.
1109
-
+**minutes**: Total difference in whole minutes.
1110
-
+**hours**: Total difference in whole hours.
1111
-
+**days**: Total difference in whole days.
1112
-
+**compare**: 0 = both are equal, 1 = *time* is in the future, -1 = *time* is in the past.
1107
+
-**milliseconds**: Total difference in milliseconds.
1108
+
-**seconds**: Total difference in whole seconds.
1109
+
-**minutes**: Total difference in whole minutes.
1110
+
-**hours**: Total difference in whole hours.
1111
+
-**days**: Total difference in whole days.
1112
+
-**compare**: 0 = both are equal, 1 = *time* is in the future, -1 = *time* is in the past.
1113
1113
-**day**: *Number*
1114
+
-**ayAbbrOfWeek**: *String*. sun,mon,tue,wed,thu,fri or sat
1114
1115
-**daysAgo**: *Number*
1116
+
-**dDate**: *Number*. timestamp (seconds since 01/01/1970 00:00)
1115
1117
-**getISO**: *Function*. Returns the ISO 8601 formatted date.
1116
1118
-**hour**: *Number*
1117
1119
-**hoursAgo**: *Number*. Number of hours since the last update.
@@ -1129,6 +1131,8 @@ local utcTime = Time('2017-12-31 22:19:15', true)
1129
1131
-**seconds**: *Number*
1130
1132
-**secondsSinceMidnight**: *Number*
1131
1133
-**secondsAgo**: *Number*. Number of seconds since the last update.
1134
+
-**sunsetInMinutes**: *Number*. Minutes from midnight until sunset.
1135
+
-**sunriseInMinutes**: *Number*. Minutes from midnight until sunrise.
1132
1136
-**utcSystemTime**: *Table*. UTC system time (only when in UTC mode):
1133
1137
-**day**: *Number*
1134
1138
-**hour**: *Number*
@@ -1144,6 +1148,8 @@ local utcTime = Time('2017-12-31 22:19:15', true)
1144
1148
-**seconds**: *Number*
1145
1149
-**year**: *Number*
1146
1150
-**year**: *Number*
1151
+
-**wday**: *Number*
1152
+
-**week**: *Number*
1147
1153
1148
1154
**Note: it is currently not possible to change a time object instance.**
Copy file name to clipboardExpand all lines: dzVents/documentation/README.wiki
+16-7Lines changed: 16 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ Just to give you an idea! Everything in your Domoticz system is now logically av
66
66
67
67
= Using dzVents with Domoticz =
68
68
69
-
In Domoticz go to '''Setup > Settings > Other''' and in the section EventSystem make sure the checkbox 'dzVents disabled' is not checked. Also make sure that in the Security section in the settings you allow <code>127.0.0.1</code> to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in '''Setup > Settings > System > Location''', otherwise there is no way to determine nighttime/daytime state.
69
+
In Domoticz go to '''Setup > Settings > Other''' and in the section EventSystem make sure the checkbox 'dzVents disabled' is not checked. Also make sure that in the Security section in the settings '''(Setup > Settings > System > Local Networks (no username/password)'''you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in '''Setup > Settings > System > Location''', otherwise there is no way to determine nighttime/daytime state.
70
70
71
71
There are two ways of creating dzVents event scripts in Domoticz:
72
72
@@ -1176,15 +1176,19 @@ Creation:
1176
1176
local now = Time() -- current time
1177
1177
local someTime = Time('2017-12-31 22:19:15')
1178
1178
local utcTime = Time('2017-12-31 22:19:15', true)</pre>
1179
+
* '''civTwilightEndInMinutes''': ''Number''. Minutes from midnight until civTwilightEnd.
1180
+
* '''civTwilightStartInMinutes''':''Number''. Minutes from midnight until civTwilightStart.
1179
1181
* '''compare(time)''': ''Function''. Compares the current time object with another time object. ''Make sure you pass a Time object!'' Returns a table (all values are ''positive'', use the compare property to see if ''time'' is in the past or future):
1180
-
* '''milliseconds''': Total difference in milliseconds.
1181
-
* '''seconds''': Total difference in whole seconds.
1182
-
* '''minutes''': Total difference in whole minutes.
1183
-
* '''hours''': Total difference in whole hours.
1184
-
* '''days''': Total difference in whole days.
1185
-
* '''compare''': 0 = both are equal, 1 = ''time'' is in the future, -1 = ''time'' is in the past.
1182
+
** '''milliseconds''': Total difference in milliseconds.
1183
+
** '''seconds''': Total difference in whole seconds.
1184
+
** '''minutes''': Total difference in whole minutes.
1185
+
** '''hours''': Total difference in whole hours.
1186
+
** '''days''': Total difference in whole days.
1187
+
** '''compare''': 0 = both are equal, 1 = ''time'' is in the future, -1 = ''time'' is in the past.
1186
1188
* '''day''': ''Number''
1189
+
* '''ayAbbrOfWeek''': ''String''. sun,mon,tue,wed,thu,fri or sat
1187
1190
* '''daysAgo''': ''Number''
1191
+
* '''dDate''': ''Number''. timestamp (seconds since 01/01/1970 00:00)
1188
1192
* '''getISO''': ''Function''. Returns the ISO 8601 formatted date.
1189
1193
* '''hour''': ''Number''
1190
1194
* '''hoursAgo''': ''Number''. Number of hours since the last update.
@@ -1202,6 +1206,9 @@ local utcTime = Time('2017-12-31 22:19:15', true)</pre>
1202
1206
* '''seconds''': ''Number''
1203
1207
* '''secondsSinceMidnight''': ''Number''
1204
1208
* '''secondsAgo''': ''Number''. Number of seconds since the last update.
1209
+
* '''sunsetInMinutes''': ''Number''. Minutes from midnight until sunset.
1210
+
* '''sunriseInMinutes''': ''Number''. Minutes from midnight until sunrise.<br />
1211
+
1205
1212
* '''utcSystemTime''': ''Table''. UTC system time (only when in UTC mode):
1206
1213
** '''day''': ''Number''
1207
1214
** '''hour''': ''Number''
@@ -1217,6 +1224,8 @@ local utcTime = Time('2017-12-31 22:19:15', true)</pre>
1217
1224
** '''seconds''': ''Number''
1218
1225
** '''year''': ''Number''
1219
1226
* '''year''': ''Number''
1227
+
* '''wday''': ''Number''
1228
+
* '''week''': ''Number''
1220
1229
1221
1230
'''Note: it is currently not possible to change a time object instance.'''
0 commit comments