Danfoss Thermostat LC
From MiOS
(Difference between revisions)
(Created page with "'''Information applies to Danfoss Living Connect Z-Wave only.''' ==Checking the wakeup interval== <source lang="text"> local danfoss_devices = { { 221, 'KiZ' }, ...") |
(→Checking the wakeup interval) |
||
| Line 32: | Line 32: | ||
do | do | ||
luup.variable_watch( 'log_wakeup', 'urn:micasaverde-com:serviceId:ZWaveDevice1', 'LastWakeup', danfoss_devices[ i ][ 1 ] ) | luup.variable_watch( 'log_wakeup', 'urn:micasaverde-com:serviceId:ZWaveDevice1', 'LastWakeup', danfoss_devices[ i ][ 1 ] ) | ||
| + | end | ||
| + | </source> | ||
| + | |||
| + | |||
| + | ==Synchronizing the Danfoss GUI device with temperature sensors== | ||
| + | |||
| + | <source lang="text"> | ||
| + | -- list of { temperature_sensor_device_id, { list of Danfoss_LC_device_id } } | ||
| + | |||
| + | devices_to_synchronize = { { 167, { 218 } }, -- B | ||
| + | { 162, { 221 } }, -- KiZ | ||
| + | { 169, { 211 } }, -- SZ | ||
| + | { 170, { 94, 107 } } } -- WZS, WZN | ||
| + | |||
| + | |||
| + | function synchronize_temp( lul_device, lul_service, lul_variable, lul_value_old, lul_value_new ) | ||
| + | |||
| + | for i = 1,#devices_to_synchronize | ||
| + | do | ||
| + | |||
| + | if devices_to_synchronize[ i ][ 1 ] == tonumber( lul_device ) | ||
| + | then | ||
| + | |||
| + | for j = 1,#devices_to_synchronize[ i ][ 2 ] | ||
| + | do | ||
| + | luup.variable_set( 'urn:upnp-org:serviceId:TemperatureSensor1', 'CurrentTemperature', lul_value_new, devices_to_synchronize[ i ][ 2 ][ j ] ) | ||
| + | end | ||
| + | |||
| + | end | ||
| + | |||
| + | end | ||
| + | |||
| + | end -- synchronize_temp | ||
| + | |||
| + | |||
| + | for i = 1,#devices_to_synchronize | ||
| + | do | ||
| + | luup.variable_watch( 'synchronize_temp', 'urn:upnp-org:serviceId:TemperatureSensor1', 'CurrentTemperature', devices_to_synchronize[ i ][ 1 ] ) | ||
end | end | ||
</source> | </source> | ||
Revision as of 10:30, 31 October 2012
Information applies to Danfoss Living Connect Z-Wave only.
Checking the wakeup interval
local danfoss_devices = { { 221, 'KiZ' },
{ 218, 'B' },
{ 211, 'SZ' },
{ 107, 'WZS' },
{ 94, 'WZN' } }
function log_wakeup( lul_device, lul_service, lul_variable, lul_value_old, lul_value_new )
local s = ''
for i = 1,#danfoss_devices
do
if danfoss_devices[ i ][ 1 ] == tonumber( lul_device )
then
s = danfoss_devices[ i ][ 2 ]
end
end
os.execute( 'logger -t Heizung Wakeup_' .. s )
end
for i = 1,#danfoss_devices
do
luup.variable_watch( 'log_wakeup', 'urn:micasaverde-com:serviceId:ZWaveDevice1', 'LastWakeup', danfoss_devices[ i ][ 1 ] )
end
Synchronizing the Danfoss GUI device with temperature sensors
-- list of { temperature_sensor_device_id, { list of Danfoss_LC_device_id } }
devices_to_synchronize = { { 167, { 218 } }, -- B
{ 162, { 221 } }, -- KiZ
{ 169, { 211 } }, -- SZ
{ 170, { 94, 107 } } } -- WZS, WZN
function synchronize_temp( lul_device, lul_service, lul_variable, lul_value_old, lul_value_new )
for i = 1,#devices_to_synchronize
do
if devices_to_synchronize[ i ][ 1 ] == tonumber( lul_device )
then
for j = 1,#devices_to_synchronize[ i ][ 2 ]
do
luup.variable_set( 'urn:upnp-org:serviceId:TemperatureSensor1', 'CurrentTemperature', lul_value_new, devices_to_synchronize[ i ][ 2 ][ j ] )
end
end
end
end -- synchronize_temp
for i = 1,#devices_to_synchronize
do
luup.variable_watch( 'synchronize_temp', 'urn:upnp-org:serviceId:TemperatureSensor1', 'CurrentTemperature', devices_to_synchronize[ i ][ 1 ] )
end