Skip to content

Commit 454811f

Browse files
authored
Merge pull request #3015 from rwaaren/development
dzVents documentation update
2 parents 929f23e + 019c726 commit 454811f

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

dzVents/documentation/README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Just to give you an idea! Everything in your Domoticz system is now logically av
7070

7171
# Using dzVents with Domoticz
7272
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.
7474

7575
There are two ways of creating dzVents event scripts in Domoticz:
7676

@@ -1092,7 +1092,6 @@ Use this in combination with the various dzVents time attributes:
10921092
print(t.compare(anotherTime).secs) -- diff in seconds between t and anotherTime.
10931093
10941094
```
1095-
10961095
### Time properties and methods
10971096

10981097
Creation:
@@ -1102,16 +1101,19 @@ local now = Time() -- current time
11021101
local someTime = Time('2017-12-31 22:19:15')
11031102
local utcTime = Time('2017-12-31 22:19:15', true)
11041103
```
1105-
1104+
- **civTwilightEndInMinutes**: *Number*. Minutes from midnight until civTwilightEnd.
1105+
- **civTwilightStartInMinutes**:*Number*. Minutes from midnight until civTwilightStart.
11061106
- **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.
11131113
- **day**: *Number*
1114+
- **ayAbbrOfWeek**: *String*. sun,mon,tue,wed,thu,fri or sat
11141115
- **daysAgo**: *Number*
1116+
- **dDate**: *Number*. timestamp (seconds since 01/01/1970 00:00)
11151117
- **getISO**: *Function*. Returns the ISO 8601 formatted date.
11161118
- **hour**: *Number*
11171119
- **hoursAgo**: *Number*. Number of hours since the last update.
@@ -1129,6 +1131,8 @@ local utcTime = Time('2017-12-31 22:19:15', true)
11291131
- **seconds**: *Number*
11301132
- **secondsSinceMidnight**: *Number*
11311133
- **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.
11321136
- **utcSystemTime**: *Table*. UTC system time (only when in UTC mode):
11331137
- **day**: *Number*
11341138
- **hour**: *Number*
@@ -1144,6 +1148,8 @@ local utcTime = Time('2017-12-31 22:19:15', true)
11441148
- **seconds**: *Number*
11451149
- **year**: *Number*
11461150
- **year**: *Number*
1151+
- **wday**: *Number*
1152+
- **week**: *Number*
11471153

11481154
**Note: it is currently not possible to change a time object instance.**
11491155

dzVents/documentation/README.wiki

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Just to give you an idea! Everything in your Domoticz system is now logically av
6666

6767
= Using dzVents with Domoticz =
6868

69-
In Domoticz go to '''Setup &gt; Settings &gt; 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 &gt; Settings &gt; System &gt; Location''', otherwise there is no way to determine nighttime/daytime state.
69+
In Domoticz go to '''Setup &gt; Settings &gt; 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 &gt; Settings &gt; System &gt; 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 &gt; Settings &gt; System &gt; Location''', otherwise there is no way to determine nighttime/daytime state.
7070

7171
There are two ways of creating dzVents event scripts in Domoticz:
7272

@@ -1176,15 +1176,19 @@ Creation:
11761176
local now = Time() -- current time
11771177
local someTime = Time('2017-12-31 22:19:15')
11781178
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.
11791181
* '''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.
11861188
* '''day''': ''Number''
1189+
* '''ayAbbrOfWeek''': ''String''. sun,mon,tue,wed,thu,fri or sat
11871190
* '''daysAgo''': ''Number''
1191+
* '''dDate''': ''Number''. timestamp (seconds since 01/01/1970 00:00)
11881192
* '''getISO''': ''Function''. Returns the ISO 8601 formatted date.
11891193
* '''hour''': ''Number''
11901194
* '''hoursAgo''': ''Number''. Number of hours since the last update.
@@ -1202,6 +1206,9 @@ local utcTime = Time('2017-12-31 22:19:15', true)</pre>
12021206
* '''seconds''': ''Number''
12031207
* '''secondsSinceMidnight''': ''Number''
12041208
* '''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+
12051212
* '''utcSystemTime''': ''Table''. UTC system time (only when in UTC mode):
12061213
** '''day''': ''Number''
12071214
** '''hour''': ''Number''
@@ -1217,6 +1224,8 @@ local utcTime = Time('2017-12-31 22:19:15', true)</pre>
12171224
** '''seconds''': ''Number''
12181225
** '''year''': ''Number''
12191226
* '''year''': ''Number''
1227+
* '''wday''': ''Number''
1228+
* '''week''': ''Number''
12201229
12211230
'''Note: it is currently not possible to change a time object instance.'''
12221231

0 commit comments

Comments
 (0)