Skip to content

Commit 3cdeb7e

Browse files
committed
Merge branch 'proxyasynctcp' into proxycereal
2 parents e2619b2 + ec90ca6 commit 3cdeb7e

18 files changed

+132
-121
lines changed

History.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Version 4.xxxx (October xxth 2018)
66
- Implemented: RFXMeter, Option to specify meter divider
77
- Implemented: Starting implementation of Taiwanese language (big thanks to berry lin!)
88
- Fixed: Philips Hue, should work correctly now again
9-
- Updated: Dzvents (version 2.4.7, See dzVents/documentation/history.md)
9+
- Updated: Dzvents (version 2.4.8, See dzVents/documentation/history.md )
1010

1111
Version 4.9700 (June 23th 2018)
1212
- Implemented: Blockly, now possible to directly add/update Text devices

dzVents/documentation/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,7 @@ The domoticz object has these constants available for use in your code e.g. `dom
623623
- **HUM_COMFORTABLE**, **HUM_DRY**, **HUM_NORMAL**, **HUM_WET**: constant for humidity status.
624624
- **INTEGER**, **FLOAT**, **STRING**, **DATE**, **TIME**: variable types.
625625
- **LOG_DEBUG**, **LOG_ERROR**, **LOG_INFO**, **LOG_FORCE**: for logging messages. LOG_FORCE is at the same level as LOG_ERROR.
626-
- **NSS_GOOGLE_CLOUD_MESSAGING**, **NSS_HTTP**,
627-
**NSS_KODI**, **NSS_LOGITECH_MEDIASERVER**, **NSS_NMA**,**NSS_PROWL**, **NSS_PUSHALOT**, **NSS_PUSHBULLET**, **NSS_PUSHOVER**, **NSS_PUSHSAFER**: for notification subsystem
626+
- **NSS_GOOGLE_CLOUD_MESSAGING**, **NSS_HTTP**, **NSS_KODI**, **NSS_LOGITECH_MEDIASERVER**, **NSS_NMA**,**NSS_PROWL**, **NSS_PUSHALOT**, **NSS_PUSHBULLET**, **NSS_PUSHOVER**, **NSS_PUSHSAFER**, **NSS_TELEGRAM** <sup>2.4.8</sup>: for notification subsystem
628627
- **PRIORITY_LOW**, **PRIORITY_MODERATE**, **PRIORITY_NORMAL**, **PRIORITY_HIGH**, **PRIORITY_EMERGENCY**: for notification priority.
629628
- **SECURITY_ARMEDAWAY**, **SECURITY_ARMEDHOME**, **SECURITY_DISARMED**: for security state.
630629
- **SOUND_ALIEN** , **SOUND_BIKE**, **SOUND_BUGLE**, **SOUND_CASH_REGISTER**, **SOUND_CLASSICAL**, **SOUND_CLIMB** , **SOUND_COSMIC**, **SOUND_DEFAULT** , **SOUND_ECHO**, **SOUND_FALLING** , **SOUND_GAMELAN**, **SOUND_INCOMING**, **SOUND_INTERMISSION**, **SOUND_MAGIC** , **SOUND_MECHANICAL**, **SOUND_NONE**, **SOUND_PERSISTENT**, **SOUND_PIANOBAR** , **SOUND_SIREN** , **SOUND_SPACEALARM**, **SOUND_TUGBOAT** , **SOUND_UPDOWN**: for notification sounds.
@@ -1954,6 +1953,9 @@ On the other hand, you have to make sure that dzVents can access the json withou
19541953

19551954
# Change log
19561955

1956+
[2.4.8]
1957+
- Added telegram as option for domoticz.notify
1958+
19571959
##[2.4.7]
19581960
- Added support for civil twilight in rules
19591961

dzVents/documentation/README.wiki

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,14 @@ There are several options for time triggers. It is important to know that Domoti
429429
'on mon,tue', -- on Mondays and Tuesdays
430430
'every hour on sat', -- you guessed it correctly
431431
'at sunset', -- uses sunset/sunrise info from Domoticz
432-
'at sunrise',
432+
'at sunrise',
433+
'at civiltwilightstart', -- uses civil twilight start/end info from Domoticz
434+
'at civiltwilightend',
433435
'at sunset on sat,sun',
436+
'xx minutes before civiltwilightstart',
437+
'xx minutes after civiltwilightstart',
438+
'xx minutes before civiltwilightend',
439+
'xx minutes after civiltwilightend',
434440
'xx minutes before sunset',
435441
'xx minutes after sunset',
436442
'xx minutes before sunrise',
@@ -439,6 +445,8 @@ There are several options for time triggers. It is important to know that Domoti
439445
-- aa/bb can be sunrise/sunset
440446
-- aa/bb can be 'xx minutes before/after
441447
sunrise/sunset'
448+
'at civildaytime', -- between civil twilight start and civil twilight end
449+
'at civilnighttime', -- between civil twilight end and civil twilight start
442450
'at nighttime', -- between sunset and sunrise
443451
'at daytime', -- between sunrise and sunset
444452
'at daytime on mon,tue', -- between sunrise and sunset
@@ -513,11 +521,15 @@ The domoticz object holds all information about your Domoticz system. It has glo
513521
* '''startTime''': ''[[#Time_object|Time Object]]''. Returns the startup time of the Domoticz service.
514522
* '''systemUptime''': ''Number''. Number of seconds the system is up.
515523
* '''time''': ''[[#Time_object|Time Object]]'': Current system time. Additional to Time object attributes:
516-
** '''isDayTime'''
517-
** '''isNightTime'''
524+
** '''isDayTime''': ''Boolean''
525+
** '''isNightTime''': ''Boolean''
526+
** '''isCivilDayTime''': ''Boolean''. <sup>2.4.7</sup>
527+
** '''isCivilNightTime''': ''Boolean''. <sup>2.4.7</sup>
518528
** '''isToday''': ''Boolean''. Indicates if the device was updated today
519529
** '''sunriseInMinutes''': ''Number''. Number of minutes since midnight when the sun will rise.
520530
** '''sunsetInMinutes''': ''Number''. Number of minutes since midnight when the sun will set.
531+
** '''civTwilightStartInMinutes''': ''Number''. <sup>2.4.7</sup> Number of minutes since midnight when the civil twilight will start.
532+
** '''civTwilightEndInMinutes''': ''Number''. <sup>2.4.7</sup> Number of minutes since midnight when the civil twilight will end.
521533
* '''utils''': <sup>2.4.0</sup>. A subset of handy utilities:
522534
* _: Lodash. This is an entire collection with very handy Lua functions. Read more about [[#Lodash_for_Lua|Lodash]]. E.g.: <code>domoticz.utils._.size({'abc', 'def'}))</code> Returns 2.
523535
* '''fileExists(path)''': ''Function'': <sup>2.4.0</sup> Returns <code>true</code> if the file (with full path) exists.
@@ -602,7 +614,7 @@ The domoticz object has these constants available for use in your code e.g. <cod
602614
* '''HUM_COMFORTABLE''', '''HUM_DRY''', '''HUM_NORMAL''', '''HUM_WET''': constant for humidity status.
603615
* '''INTEGER''', '''FLOAT''', '''STRING''', '''DATE''', '''TIME''': variable types.
604616
* '''LOG_DEBUG''', '''LOG_ERROR''', '''LOG_INFO''', '''LOG_FORCE''': for logging messages. LOG_FORCE is at the same level as LOG_ERROR.
605-
* '''NSS_GOOGLE_CLOUD_MESSAGING''', '''NSS_HTTP''', '''NSS_KODI''', '''NSS_LOGITECH_MEDIASERVER''', '''NSS_NMA''','''NSS_PROWL''', '''NSS_PUSHALOT''', '''NSS_PUSHBULLET''', '''NSS_PUSHOVER''', '''NSS_PUSHSAFER''': for notification subsystem
617+
* '''NSS_GOOGLE_CLOUD_MESSAGING''', '''NSS_HTTP''', '''NSS_KODI''', '''NSS_LOGITECH_MEDIASERVER''', '''NSS_NMA''','''NSS_PROWL''', '''NSS_PUSHALOT''', '''NSS_PUSHBULLET''', '''NSS_PUSHOVER''', '''NSS_PUSHSAFER''', '''NSS_TELEGRAM''' <sup>2.4.8</sup>: for notification subsystem
606618
* '''PRIORITY_LOW''', '''PRIORITY_MODERATE''', '''PRIORITY_NORMAL''', '''PRIORITY_HIGH''', '''PRIORITY_EMERGENCY''': for notification priority.
607619
* '''SECURITY_ARMEDAWAY''', '''SECURITY_ARMEDHOME''', '''SECURITY_DISARMED''': for security state.
608620
* '''SOUND_ALIEN''' , '''SOUND_BIKE''', '''SOUND_BUGLE''', '''SOUND_CASH_REGISTER''', '''SOUND_CLASSICAL''', '''SOUND_CLIMB''' , '''SOUND_COSMIC''', '''SOUND_DEFAULT''' , '''SOUND_ECHO''', '''SOUND_FALLING''' , '''SOUND_GAMELAN''', '''SOUND_INCOMING''', '''SOUND_INTERMISSION''', '''SOUND_MAGIC''' , '''SOUND_MECHANICAL''', '''SOUND_NONE''', '''SOUND_PERSISTENT''', '''SOUND_PIANOBAR''' , '''SOUND_SIREN''' , '''SOUND_SPACEALARM''', '''SOUND_TUGBOAT''' , '''SOUND_UPDOWN''': for notification sounds.
@@ -2026,6 +2038,12 @@ In 2.x it is no longer needed to make timed json calls to Domoticz to get extra
20262038
20272039
= Change log =
20282040
2041+
[2.4.8] - Added telegram as option for domoticz.notify
2042+
2043+
== [2.4.7] ==
2044+
2045+
* Added support for civil twilight in rules
2046+
20292047
== [2.4.6] ==
20302048
20312049
* Added Youless device

dzVents/documentation/history.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[2.4.8]
2+
- Added telegram as option for domoticz.notify
3+
14
[2.4.7]
25
- Added support for civil twilight in rules
36

dzVents/runtime/Domoticz.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ local function Domoticz(settings)
136136
['NSS_PUSHBULLET'] = 'pushbullet',
137137
['NSS_PUSHOVER'] = 'pushover',
138138
['NSS_PUSHSAFER'] = 'pushsafer',
139+
['NSS_TELEGRAM'] = 'telegram',
139140
['BASETYPE_DEVICE'] = 'device',
140141
['BASETYPE_SCENE'] = 'scene',
141142
['BASETYPE_GROUP'] = 'group',

dzVents/runtime/Utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function self.log(msg, level)
103103

104104

105105
if (level == self.LOG_ERROR) then
106-
marker = marker .. 'Error (2.4.7): '
106+
marker = marker .. 'Error (2.4.8): '
107107
elseif (level == self.LOG_DEBUG) then
108108
marker = marker .. 'Debug: '
109109
elseif (level == self.LOG_INFO or level == self.LOG_MODULE_EXEC_INFO) then

dzVents/runtime/dzVents.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (tonumber(globalvariables['dzVents_log_level']) == utils.LOG_DEBUG or TESTMOD
3939

4040
local events, length = helpers.getEventSummary()
4141
if (length > 0) then
42-
print('Debug: dzVents version: 2.4.7')
42+
print('Debug: dzVents version: 2.4.8')
4343

4444
print('Debug: Event triggers:')
4545
for i, event in pairs(events) do

dzVents/runtime/tests/testUtils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('event helpers', function()
3838
end
3939

4040
utils.log('abc', utils.LOG_ERROR)
41-
assert.is_same('Error (2.4.7): abc', printed)
41+
assert.is_same('Error (2.4.8): abc', printed)
4242
end)
4343

4444
it('shoud log INFO by default', function()

hardware/OpenZWave.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ void COpenZWave::AddValue(const OpenZWave::ValueID &vID, const NodeInfo *pNodeIn
17431743
else
17441744
_device.scaleID = SCALEID_POWER;
17451745
_device.scaleMultiply = 1;
1746-
if (vUnits == "kWh")
1746+
if ((vUnits == "kWh") || (vUnits == "kVAh"))
17471747
{
17481748
_device.scaleMultiply = 1000;
17491749
_device.devType = ZDTYPE_SENSOR_POWERENERGYMETER;
@@ -1928,7 +1928,7 @@ void COpenZWave::AddValue(const OpenZWave::ValueID &vID, const NodeInfo *pNodeIn
19281928
else
19291929
_device.scaleID = SCALEID_POWER;
19301930
_device.scaleMultiply = 1;
1931-
if (vUnits == "kWh")
1931+
if ((vUnits == "kWh") || (vUnits == "kVAh"))
19321932
{
19331933
_device.scaleMultiply = 1000;
19341934
_device.devType = ZDTYPE_SENSOR_POWERENERGYMETER;

hardware/P1MeterBase.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,12 @@ bool P1MeterBase::MatchLine()
254254
if (m_voltagel3)
255255
SendVoltageSensor(0, 3, 255, m_voltagel3, "Voltage L3");
256256
}
257+
/* The ampere is rounded to whole numbers and therefor not accurate enough
258+
//we could calculate this ourselfs I=P/U I1=(m_power.powerusage1/m_voltagel1)
257259
if (m_amperagel1 || m_amperagel2 || m_amperagel3 ) {
258260
SendCurrentSensor(1, 255, m_amperagel1, m_amperagel2, m_amperagel3, "Amperage" );
259261
}
262+
*/
260263
if ((m_gas.gasusage > 0) && ((m_gas.gasusage != m_lastgasusage) || (difftime(atime, m_lastSharedSendGas) >= 300)))
261264
{
262265
//only update gas when there is a new value, or 5 minutes are passed

0 commit comments

Comments
 (0)