Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
##############################################
# $Id$
2013-01-26 10:19:40 +00:00
# Written by Matthias Gehre, M.Gehre@gmx.de, 2012-2013
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
package main ;
use strict ;
use warnings ;
use MIME::Base64 ;
use POSIX ;
2013-02-08 19:44:12 +00:00
use MaxCommon ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub MAXLAN_Parse ($$) ;
sub MAXLAN_Read ($) ;
2012-12-02 23:28:00 +00:00
sub MAXLAN_Write (@) ;
sub MAXLAN_ReadSingleResponse ($$) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub MAXLAN_SimpleWrite (@) ;
sub MAXLAN_Poll ($) ;
2012-12-09 14:59:45 +00:00
sub MAXLAN_Send (@) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub MAXLAN_RequestConfiguration ($$) ;
2012-11-21 19:57:25 +00:00
sub MAXLAN_RemoveDevice ($$) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2013-04-20 07:40:30 +00:00
my $ reconnect_interval = 540 ; #seconds
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2012-11-23 07:32:08 +00:00
#the time it takes after sending one command till we see its effect in the L: response
my $ roundtriptime = 3 ; #seconds
2013-01-18 12:38:29 +00:00
my $ read_timeout = 3 ; #seconds. How long to wait for an answer from the Cube over TCP/IP
2012-12-09 15:01:27 +00:00
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
my $ metadata_magic = 0x56 ;
my $ metadata_version = 2 ;
2012-11-23 07:32:21 +00:00
my $ defaultPollInterval = 60 ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
MAXLAN_Initialize ( $ )
{
my ( $ hash ) = @ _ ;
require "$attr{global}{modpath}/FHEM/DevIo.pm" ;
# Provider
$ hash - > { ReadFn } = "MAXLAN_Read" ;
$ hash - > { SetFn } = "MAXLAN_Set" ;
$ hash - > { Clients } = ":MAX:" ;
my % mc = (
"1:MAX" = > "^MAX" ,
) ;
$ hash - > { MatchList } = \ % mc ;
# Normal devices
$ hash - > { DefFn } = "MAXLAN_Define" ;
$ hash - > { UndefFn } = "MAXLAN_Undef" ;
$ hash - > { AttrList } = "do_not_notify:1,0 dummy:1,0 " .
"loglevel:0,1,2,3,4,5,6 addvaltrigger " ;
}
#####################################
sub
MAXLAN_Define ( $$ )
{
my ( $ hash , $ def ) = @ _ ;
my @ a = split ( "[ \t][ \t]*" , $ def ) ;
2012-12-02 23:28:00 +00:00
if ( @ a < 3 ) {
my $ msg = "wrong syntax: define <name> MAXLAN ip[:port] [pollintervall [ondemand]]" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
Log 2 , $ msg ;
return $ msg ;
}
2012-12-02 23:28:00 +00:00
my $ name = shift @ a ;
shift @ a ;
my $ dev = shift @ a ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
$ dev . = ":62910" if ( $ dev !~ m/:/ && $ dev ne "none" && $ dev !~ m/\@/ ) ;
if ( $ dev eq "none" ) {
Log 1 , "$name device is none, commands will be echoed only" ;
$ attr { $ name } { dummy } = 1 ;
return undef ;
}
2012-12-02 23:28:00 +00:00
$ hash - > { INTERVAL } = $ defaultPollInterval ;
$ hash - > { persistent } = 1 ;
if ( @ a ) {
$ hash - > { INTERVAL } = shift @ a ;
while ( @ a ) {
my $ arg = shift @ a ;
if ( $ arg eq "ondemand" ) {
$ hash - > { persistent } = 0 ;
} else {
my $ msg = "unknown argument $arg" ;
Log 1 , $ msg ;
return $ msg ;
}
}
}
$ hash - > { cubeTimeDifference } = 99999 ;
$ hash - > { pairmode } = 0 ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
$ hash - > { PARTIAL } = "" ;
$ hash - > { DeviceName } = $ dev ;
#This interface is shared with 14_CUL_MAX.pm
2012-12-09 14:59:45 +00:00
$ hash - > { Send } = \ & MAXLAN_Send ;
2012-11-21 19:57:25 +00:00
$ hash - > { RemoveDevice } = \ & MAXLAN_RemoveDevice ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2012-12-02 23:28:00 +00:00
#Wait until all device definitions have been loaded
InternalTimer ( gettimeofday ( ) + 1 , "MAXLAN_Poll" , $ hash , 0 ) ;
2012-12-03 21:43:22 +00:00
return undef ;
2012-12-02 23:28:00 +00:00
}
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2012-12-02 23:28:00 +00:00
sub
MAXLAN_IsConnected ( $ )
{
2013-01-28 20:33:06 +00:00
return 0 if ( ! exists ( $ _ [ 0 ] - > { FD } ) ) ;
if ( ! defined ( $ _ [ 0 ] - > { TCPDev } ) ) {
MAXLAN_Disconnect ( $ _ [ 0 ] ) ;
return 0 ;
}
return 1 ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-12-02 23:28:00 +00:00
#Disconnects from the Cube. It is safe to call this when already disconnected.
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
2012-12-02 23:28:00 +00:00
MAXLAN_Disconnect ( $ )
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
{
my $ hash = shift ;
2012-12-02 23:28:00 +00:00
Log 5 , "MAXLAN_Disconnect" ;
#All operations here are no-op if already disconnected
2012-11-25 09:51:14 +00:00
DevIo_CloseDev ( $ hash ) ;
RemoveInternalTimer ( $ hash ) ;
2012-12-02 23:28:00 +00:00
}
2012-11-25 09:51:14 +00:00
2012-12-02 23:28:00 +00:00
#Connects to the Cube. If already connected, disconnects first.
2013-01-28 20:33:06 +00:00
#Returns undef of success, otherwise an error message
2012-12-02 23:28:00 +00:00
sub
MAXLAN_Connect ( $ )
{
my $ hash = shift ;
2013-01-28 20:33:06 +00:00
return undef if ( MAXLAN_IsConnected ( $ hash ) ) ;
2012-11-25 09:51:14 +00:00
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
delete ( $ hash - > { NEXT_OPEN } ) ; #work around the connection rate limiter in DevIo
2013-01-28 20:33:06 +00:00
DevIo_OpenDev ( $ hash , 0 , "" ) ;
2012-12-02 23:28:00 +00:00
if ( ! MAXLAN_IsConnected ( $ hash ) ) {
my $ msg = "MAXLAN_Connect: Could not connect" ;
Log 2 , $ msg ;
return $ msg ;
}
2012-11-25 09:51:14 +00:00
2013-01-28 20:33:06 +00:00
my $ ret ;
2012-12-02 23:28:00 +00:00
#Read initial configuration data
2013-01-28 20:33:06 +00:00
$ ret = MAXLAN_ExpectAnswer ( $ hash , "H:" ) ;
return "MAXLAN_Connect: $ret" if ( $ ret ) ;
$ ret = MAXLAN_ExpectAnswer ( $ hash , "M:" ) ;
return "MAXLAN_Connect: $ret" if ( $ ret ) ;
2012-12-09 15:03:06 +00:00
#We first reset the IODev for all MAX devices using this MAXLAN as a backend.
#Parsing the "C:" responses later on will set IODev correctly again.
#This effectively removes IODev from all devices that are not longer paired to our Cube.
foreach ( % { $ modules { MAX } { defptr } } ) {
2012-12-09 15:20:43 +00:00
$ modules { MAX } { defptr } { $ _ } { IODev } = undef if ( defined ( $ modules { MAX } { defptr } { $ _ } { IODev } ) and $ modules { MAX } { defptr } { $ _ } { IODev } == $ hash ) ;
2012-12-09 15:03:06 +00:00
}
2012-12-02 23:28:00 +00:00
my $ rmsg ;
do
{
#Receive one "C:" per device
$ rmsg = MAXLAN_ReadSingleResponse ( $ hash , 1 ) ;
2013-01-28 20:33:06 +00:00
return "MAXLAN_Connect: Error in ReadSingleResponse while waiting for C:" if ( ! defined ( $ rmsg ) ) ;
2012-12-02 23:28:00 +00:00
MAXLAN_Parse ( $ hash , $ rmsg ) ;
} until ( $ rmsg =~ m/^L:/ ) ;
#At the end, the cube sends a "L:"
#Handle deferred setting of time
if ( AttrVal ( $ hash - > { NAME } , "set-clock-on-init" , "1" ) && $ hash - > { cubeTimeDifference } > 1 ) {
MAXLAN_Set ( $ hash , $ hash - > { NAME } , "clock" ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-12-02 23:28:00 +00:00
return undef ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
#####################################
sub
MAXLAN_Undef ( $$ )
{
my ( $ hash , $ arg ) = @ _ ;
2012-12-02 23:28:00 +00:00
#MAXLAN_Write($hash,"q:"); #unnecessary
MAXLAN_Disconnect ( $ hash ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
return undef ;
}
#####################################
sub
MAXLAN_Set ( $@ )
{
my ( $ hash , $ device , @ a ) = @ _ ;
return "\"set MAXLAN\" needs at least one parameter" if ( @ a < 1 ) ;
my ( $ setting , @ args ) = @ a ;
if ( $ setting eq "pairmode" ) {
if ( @ args > 0 and $ args [ 0 ] eq "cancel" ) {
2012-12-02 23:28:00 +00:00
MAXLAN_Write ( $ hash , "x:" , "N:" ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} else {
my $ duration = 60 ;
$ duration = $ args [ 0 ] if ( @ args > 0 ) ;
2012-12-02 23:28:00 +00:00
$ hash - > { pairmode } = 1 ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
MAXLAN_Write ( $ hash , "n:" . sprintf ( "%04x" , $ duration ) ) ;
$ hash - > { STATE } = "pairing" ;
}
} elsif ( $ setting eq "raw" ) {
MAXLAN_Write ( $ hash , $ args [ 0 ] ) ;
2012-12-02 23:28:00 +00:00
} elsif ( $ setting eq "clock" ) {
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
#This encodes the winter/summer timezones, its meaning is not entirely clear
my $ timezones = "Q0VUAAAKAAMAAA4QQ0VTVAADAAIAABwg" ;
#The offset was obtained by experiment and is up to 1 minute, I don't know exactly what
#time format the cube uses. Something based on ntp I guess. Maybe this only works in GMT+1?
my $ time = time ( ) - 946684774 ;
my $ rmsg = "v:" . $ timezones . "," . sprintf ( "%08x" , $ time ) ;
2012-12-02 23:28:00 +00:00
my $ ret = MAXLAN_Write ( $ hash , $ rmsg , "A:" ) ;
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,CubeClockState,$hash->{rfaddr},1" , { RAWMSG = > $ rmsg } ) if ( ! $ ret ) ;
2012-12-02 23:28:00 +00:00
return $ ret ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} elsif ( $ setting eq "factoryReset" ) {
MAXLAN_RequestReset ( $ hash ) ;
2012-11-23 07:33:23 +00:00
} elsif ( $ setting eq "reconnect" ) {
2012-12-02 23:28:00 +00:00
MAXLAN_Disconnect ( $ hash ) ;
MAXLAN_Connect ( $ hash ) if ( $ hash - > { persistent } ) ;
2012-12-03 21:43:42 +00:00
} elsif ( $ setting eq "inject" ) {
MAXLAN_Parse ( $ hash , $ args [ 0 ] ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} else {
2012-11-23 07:33:23 +00:00
return "Unknown argument $setting, choose one of pairmode raw clock factoryReset reconnect" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
return undef ;
}
2013-01-28 20:33:06 +00:00
#Returns error string if failed, undef on success
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
MAXLAN_ExpectAnswer ( $$ )
{
my ( $ hash , $ expectedanswer ) = @ _ ;
2012-12-02 23:28:00 +00:00
my $ rmsg = MAXLAN_ReadSingleResponse ( $ hash , 1 ) ;
2012-12-09 15:01:27 +00:00
if ( ! defined ( $ rmsg ) ) {
my $ msg = "MAXLAN_ExpectAnswer: Error while waiting for answer $expectedanswer" ;
Log 1 , $ msg ;
return $ msg ;
}
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
my $ ret = undef ;
if ( $ rmsg !~ m/^$expectedanswer/ ) {
2012-12-09 15:01:27 +00:00
Log 2 , "MAXLAN_ExpectAnswer: Got unexpected response, expected $expectedanswer" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
MAXLAN_Parse ( $ hash , $ rmsg ) ;
return "Got unexpected response, expected $expectedanswer" ;
}
2013-01-28 20:33:06 +00:00
MAXLAN_Parse ( $ hash , $ rmsg ) ;
return undef ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2013-01-18 12:38:29 +00:00
#Reads single line from the Cube
#blocks if waitForResponse is true
#
#returns undef, if an error occured,
#otherwise the line
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
2012-12-02 23:28:00 +00:00
MAXLAN_ReadSingleResponse ( $$ )
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
{
2012-12-02 23:28:00 +00:00
my ( $ hash , $ waitForResponse ) = @ _ ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2013-01-28 20:33:06 +00:00
return undef if ( ! MAXLAN_IsConnected ( $ hash ) ) ;
2012-12-09 15:01:27 +00:00
my ( $ rin , $ win , $ ein , $ rout , $ wout , $ eout ) ;
$ rin = $ win = $ ein = '' ;
vec ( $ rin , fileno ( $ hash - > { TCPDev } ) , 1 ) = 1 ;
$ ein = $ rin ;
my $ maxTime = gettimeofday ( ) + $ read_timeout ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
#Read until we have a complete line
2012-11-25 14:11:15 +00:00
until ( $ hash - > { PARTIAL } =~ m/\n/ ) {
2012-12-09 15:01:27 +00:00
#Check timeout
if ( gettimeofday ( ) > $ maxTime ) {
2013-01-18 12:38:29 +00:00
if ( $ waitForResponse ) {
Log 1 , "MAXLAN_ReadSingleResponse: timeout while reading from socket, disconnecting" ;
MAXLAN_Disconnect ( $ hash ) ;
}
2012-12-09 15:01:27 +00:00
return undef ; ;
}
#Wait for data
my $ nfound = select ( $ rout = $ rin , $ wout = $ win , $ eout = $ ein , $ read_timeout ) ;
if ( $ nfound == - 1 ) {
Log 1 , "MAXLAN_ReadSingleResponse: error during select, ret = $nfound" ;
return undef ;
}
last if ( $ nfound == 0 and ! $ waitForResponse ) ;
next if ( $ nfound == 0 ) ; #Sometimes select() returns early, just try again
#Blocking read
my $ buf ;
my $ res = sysread ( $ hash - > { TCPDev } , $ buf , 256 ) ;
if ( ! defined ( $ res ) ) {
2012-12-02 23:28:00 +00:00
Log 1 , "MAXLAN_ReadSingleResponse: error during read" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
return undef ; #error occured
}
2012-12-09 15:01:27 +00:00
#Append data to partial data we got before
2012-11-25 14:11:15 +00:00
$ hash - > { PARTIAL } . = $ buf ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
my $ rmsg ;
2012-11-25 14:11:15 +00:00
( $ rmsg , $ hash - > { PARTIAL } ) = split ( "\n" , $ hash - > { PARTIAL } , 2 ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
$ rmsg =~ s/\r// ; #remove \r
return $ rmsg ;
}
my % lhash ;
#####################################
2012-12-02 23:28:00 +00:00
#Sends given msg and checks for/parses the answer
2013-01-28 20:33:06 +00:00
#returns undef on success
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
2012-12-02 23:28:00 +00:00
MAXLAN_Write ( @ )
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
{
2012-12-02 23:28:00 +00:00
my ( $ hash , $ msg , $ expectedAnswer ) = @ _ ;
my $ ret = undef ;
2013-01-28 20:33:06 +00:00
$ ret = MAXLAN_Connect ( $ hash ) ; #It's a no-op if already connected
return "MAXLAN_Write: $ret" if ( $ ret ) ;
$ ret = MAXLAN_SimpleWrite ( $ hash , $ msg ) ;
return "MAXLAN_Write: $ret" if ( $ ret ) ;
if ( $ expectedAnswer ) {
$ ret = MAXLAN_ExpectAnswer ( $ hash , $ expectedAnswer ) ;
return "MAXLAN_Write: $ret" if ( $ ret ) ;
}
2012-12-02 23:28:00 +00:00
MAXLAN_Disconnect ( $ hash ) if ( ! $ hash - > { persistent } && ! $ hash - > { pairmode } ) ;
2013-01-28 20:33:06 +00:00
return undef ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
#####################################
# called from the global loop, when the select for hash->{FD} reports data
sub
MAXLAN_Read ( $ )
{
my ( $ hash ) = @ _ ;
2012-12-02 23:28:00 +00:00
while ( 1 ) {
my $ rmsg = MAXLAN_ReadSingleResponse ( $ hash , 0 ) ;
last if ( ! $ rmsg ) ;
2012-12-09 15:02:11 +00:00
# The Msg N: .... is the only one that may come spontanously from
# the cube while we are in pairmode
Log 2 , "Unsolicated response from Cube: $rmsg" unless ( $ hash - > { pairmode } and substr ( $ rmsg , 0 , 2 ) eq "N:" ) ;
2012-12-02 23:28:00 +00:00
MAXLAN_Parse ( $ hash , $ rmsg ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
}
sub
MAXLAN_SendMetadata ( $ )
{
my $ hash = shift ;
if ( defined ( $ hash - > { metadataVersionMismatch } ) ) {
Log 3 , "MAXLAN_SendMetadata: current version of metadata unexpected, not overwriting!" ;
return ;
}
my $ maxNameLength = 32 ;
my $ maxGroupCount = 20 ;
my $ maxDeviceCount = 140 ;
my @ groups = @ { $ hash - > { groups } } ;
my @ devices = @ { $ hash - > { devices } } ;
if ( @ groups > $ maxGroupCount || @ devices > $ maxDeviceCount ) {
Log 1 , "MAXLAN_SendMetadata: you got more than $maxGroupCount groups or $maxDeviceCount devices" ;
return ;
}
my $ metadata = pack ( "CC" , $ metadata_magic , $ metadata_version ) ;
$ metadata . = pack ( "C" , scalar ( @ groups ) ) ;
foreach ( @ groups ) {
if ( length ( $ _ - > { name } ) > $ maxNameLength ) {
Log 1 , "Group name $_->{name} is too long, maximum of $maxNameLength characters allowed" ;
return ;
}
$ metadata . = pack ( "CC/aH6" , $ _ - > { id } , $ _ - > { name } , $ _ - > { masterAddr } ) ;
}
$ metadata . = pack ( "C" , scalar ( @ devices ) ) ;
foreach ( @ devices ) {
if ( length ( $ _ - > { name } ) > $ maxNameLength ) {
Log 1 , "Device name $_->{name} is too long, maximum of $maxNameLength characters allowed" ;
return ;
}
$ metadata . = pack ( "CH6a[10]C/aC" , $ _ - > { type } , $ _ - > { addr } , $ _ - > { serial } , $ _ - > { name } , $ _ - > { groupid } ) ;
}
$ metadata . = pack ( "C" , 1 ) ; #dstenables, should always be 1
my $ blocksize = 1900 ;
$ metadata = encode_base64 ( $ metadata , "" ) ;
my $ numpackages = ceil ( length ( $ metadata ) / $ blocksize ) ;
for ( my $ i = 0 ; $ i < $ numpackages ; $ i + + ) {
my $ package = substr ( $ metadata , $ i * $ blocksize , $ blocksize ) ;
2012-12-02 23:28:00 +00:00
return MAXLAN_Write ( $ hash , "m:" . sprintf ( "%02d" , $ i ) . "," . $ package , "A:" ) ;
2012-11-25 09:51:14 +00:00
}
}
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
MAXLAN_Parse ( $$ )
{
#http://www.domoticaforum.eu/viewtopic.php?f=66&t=6654
my ( $ hash , $ rmsg ) = @ _ ;
my $ name = $ hash - > { NAME } ;
my $ ll3 = GetLogLevel ( $ name , 3 ) ;
my $ ll5 = GetLogLevel ( $ name , 5 ) ;
Log $ ll5 , "Msg $rmsg" ;
my $ cmd = substr ( $ rmsg , 0 , 1 ) ; # get leading char
my @ args = split ( ',' , substr ( $ rmsg , 2 ) ) ;
#Log $ll5, 'args '.join(" ",@args);
if ( $ cmd eq 'H' ) { #Hello
$ hash - > { serial } = $ args [ 0 ] ;
$ hash - > { rfaddr } = $ args [ 1 ] ;
$ hash - > { fwversion } = $ args [ 2 ] ;
my $ dutycycle = 0 ;
if ( @ args > 5 ) {
$ dutycycle = $ args [ 5 ] ;
}
my $ freememory = 0 ;
if ( @ args > 6 ) {
$ freememory = $ args [ 6 ] ;
}
my $ cubedatetime = {
year = > 2000 + hex ( substr ( $ args [ 7 ] , 0 , 2 ) ) ,
month = > hex ( substr ( $ args [ 7 ] , 2 , 2 ) ) ,
day = > hex ( substr ( $ args [ 7 ] , 4 , 2 ) ) ,
hour = > hex ( substr ( $ args [ 8 ] , 0 , 2 ) ) ,
minute = > hex ( substr ( $ args [ 8 ] , 2 , 2 ) ) ,
} ;
my $ clockset = hex ( $ args [ 9 ] ) ;
#$cubedatetime is only valid if $clockset is 1
if ( $ clockset ) {
my ( $ sec , $ min , $ hour , $ mday , $ mon , $ year ) = localtime ( time ) ;
my $ difference = ( ( ( ( ( $ cubedatetime - > { year } - $ year - 1900 ) * 12
+ $ cubedatetime - > { month } - $ mon - 1 ) * 30
+ $ cubedatetime - > { day } - $ mday ) * 24
+ $ cubedatetime - > { hour } - $ hour ) * 60
+ $ cubedatetime - > { minute } - $ min ) ;
2012-12-02 23:28:00 +00:00
$ hash - > { cubeTimeDifference } = $ difference ;
2012-12-12 18:02:57 +00:00
if ( $ difference > 1 ) {
Log 2 , "MAXLAN_Parse: Cube thinks it is $cubedatetime->{day}.$cubedatetime->{month}.$cubedatetime->{year} $cubedatetime->{hour}:$cubedatetime->{minute}" ;
Log 2 , "MAXLAN_Parse: Time difference is $difference minutes" ;
}
} else {
Log 2 , "MAXLAN_Parse: Cube has no time set" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,define,$hash->{rfaddr},Cube,$hash->{serial},0,1" , { RAWMSG = > $ rmsg } ) ;
Dispatch ( $ hash , "MAX,1,CubeConnectionState,$hash->{rfaddr},1" , { RAWMSG = > $ rmsg } ) ;
Dispatch ( $ hash , "MAX,1,CubeClockState,$hash->{rfaddr},$clockset" , { RAWMSG = > $ rmsg } ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
Log $ ll5 , "MAXLAN_Parse: Got hello, connection ip $args[4], duty cycle $dutycycle, freememory $freememory, clockset $clockset" ;
} elsif ( $ cmd eq 'M' ) {
#Metadata, this is basically a readwrite part of the cube's memory.
#I don't think that the cube interprets any of that data.
#One can write to that memory with the "m:" command
#The actual configuration comes with the "C:" response and can be set
#with the "s:" command.
2013-01-28 20:32:22 +00:00
return $ name if ( @ args < 3 ) ; #On virgin devices, we get nothing, not even $magic$version$numgroups$numdevices
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
my $ bindata = decode_base64 ( $ args [ 2 ] ) ;
#$version is the version the serialized data format I guess
my ( $ magic , $ version , $ numgroups , @ groupsdevices ) ;
eval {
( $ magic , $ version , $ numgroups , @ groupsdevices ) = unpack ( "CCCXC/(CC/aH6)C/(CH6a[10]C/aC)C" , $ bindata ) ;
1 ;
} or do {
2013-01-09 19:38:06 +00:00
Log 1 , "MAXLAN_Parse: Metadata response is malformed!" ;
2013-01-28 20:32:22 +00:00
return $ name ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} ;
if ( $ magic != $ metadata_magic || $ version != $ metadata_version ) {
Log 3 , "MAXLAN_Parse: magic $magic/version $version are not $metadata_magic/$metadata_version as expected" ;
$ hash - > { metadataVersionMismatch } = 1 ;
}
my $ daylightsaving = pop ( @ groupsdevices ) ; #should be always true (=0x01)
my $ i ;
$ hash - > { groups } = ( ) ;
for ( $ i = 0 ; $ i < 3 * $ numgroups ; $ i += 3 ) {
$ hash - > { groups } [ @ { $ hash - > { groups } } ] - > { id } = $ groupsdevices [ $ i ] ;
$ hash - > { groups } [ - 1 ] - > { name } = $ groupsdevices [ $ i + 1 ] ;
$ hash - > { groups } [ - 1 ] - > { masterAddr } = $ groupsdevices [ $ i + 2 ] ;
}
#After a device is freshly paired, it does not appear in this metadata response,
#we first have to set some metadata for it
$ hash - > { devices } = ( ) ;
for ( ; $ i < @ groupsdevices ; $ i += 5 ) {
$ hash - > { devices } [ @ { $ hash - > { devices } } ] - > { type } = $ groupsdevices [ $ i ] ;
$ hash - > { devices } [ - 1 ] - > { addr } = $ groupsdevices [ $ i + 1 ] ;
$ hash - > { devices } [ - 1 ] - > { serial } = $ groupsdevices [ $ i + 2 ] ;
$ hash - > { devices } [ - 1 ] - > { name } = $ groupsdevices [ $ i + 3 ] ;
$ hash - > { devices } [ - 1 ] - > { groupid } = $ groupsdevices [ $ i + 4 ] ;
}
2012-11-29 23:53:19 +00:00
#Log $ll5, "Got Metadata, hash: ".Dumper($hash);
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} elsif ( $ cmd eq "C" ) { #Configuration
2013-01-28 20:32:22 +00:00
return $ name if ( @ args < 2 ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
my $ bindata = decode_base64 ( $ args [ 1 ] ) ;
2012-11-21 19:57:38 +00:00
2012-11-23 07:32:50 +00:00
if ( length ( $ bindata ) < 18 ) {
Log 1 , "Invalid C: response, not enough data" ;
2013-01-28 20:32:22 +00:00
return $ name ;
2012-11-23 07:32:50 +00:00
}
2012-11-21 19:57:38 +00:00
#Parse the first 18 bytes, those are send for every device
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
my ( $ len , $ addr , $ devicetype , $ groupid , $ firmware , $ testresult , $ serial ) = unpack ( "CH6CCCCa[10]" , $ bindata ) ;
2013-01-09 19:38:06 +00:00
Log $ ll5 , "MAXLAN_Parse: len $len, addr $addr, devicetype $devicetype, firmware $firmware, testresult $testresult, groupid $groupid, serial $serial" ;
2012-11-23 07:32:50 +00:00
2012-11-21 19:57:38 +00:00
$ len = $ len + 1 ; #The len field itself was not counted
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,define,$addr,$device_types{$devicetype},$serial,$groupid,1" , { RAWMSG = > $ rmsg } ) ;
2012-11-21 19:57:25 +00:00
2012-11-23 07:32:50 +00:00
if ( $ len != length ( $ bindata ) ) {
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,Error,$addr,Parts of configuration are missing" , { RAWMSG = > $ rmsg } ) ;
2013-01-28 20:32:22 +00:00
return $ name ;
2012-11-23 07:32:50 +00:00
}
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
#devicetype: Cube = 0, HeatingThermostat = 1, HeatingThermostatPlus = 2, WallMountedThermostat = 3, ShutterContact = 4, PushButton = 5
#Seems that ShutterContact does not have any configdata
2013-01-10 22:29:50 +00:00
if ( $ device_types { $ devicetype } eq "Cube" ) {
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
#TODO: there is a lot of data left to interpret
2013-01-10 22:29:50 +00:00
2013-02-12 04:22:39 +00:00
} elsif ( $ device_types { $ devicetype } =~ /HeatingThermostat.*/ ) {
2012-12-11 22:43:44 +00:00
my ( $ comforttemp , $ ecotemp , $ maxsetpointtemp , $ minsetpointtemp , $ tempoffset , $ windowopentemp , $ windowopendur , $ boost , $ decalcifiction , $ maxvalvesetting , $ valveoffset , $ weekprofile ) = unpack ( "CCCCCCCCCCCH*" , substr ( $ bindata , 18 ) ) ;
2012-12-03 21:43:42 +00:00
#TODO: parse week profile
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
my $ boostValve = ( $ boost & 0x1F ) * 5 ;
2013-01-12 15:15:03 +00:00
my $ boostDuration = $ boost >> 5 ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
#There is some trailing data missing, which maps to the weekly program
2013-06-28 17:50:38 +00:00
$ comforttemp /= 2.0 ; #convert to degree celcius
$ ecotemp /= 2.0 ; #convert to degree celcius
$ tempoffset = $ tempoffset / 2.0 - 3.5 ; #convert to degree
2012-12-11 22:43:44 +00:00
$ maxsetpointtemp /= 2.0 ;
$ minsetpointtemp /= 2.0 ;
$ windowopentemp /= 2.0 ;
$ windowopendur *= 5 ;
2013-06-28 17:50:38 +00:00
$ maxvalvesetting = int ( $ maxvalvesetting * 100 / 255 ) ;
$ valveoffset = int ( $ valveoffset * 100 / 255 ) ;
my $ decalcDay = ( $ decalcifiction >> 5 ) & 0x07 ;
my $ decalcTime = $ decalcifiction & 0x1F ;
2012-12-15 12:34:37 +00:00
Log $ ll5 , "comfortemp $comforttemp, ecotemp $ecotemp, boostValve $boostValve, boostDuration $boostDuration, tempoffset $tempoffset, minsetpointtemp $minsetpointtemp, maxsetpointtemp $maxsetpointtemp, windowopentemp $windowopentemp, windowopendur $windowopendur" ;
2013-01-10 22:29:50 +00:00
Dispatch ( $ hash , "MAX,1,HeatingThermostatConfig,$addr,$ecotemp,$comforttemp,$maxsetpointtemp,$minsetpointtemp,$boostValve,$boostDuration,$tempoffset,$windowopentemp,$windowopendur,$maxvalvesetting,$valveoffset,$decalcDay,$decalcTime,$weekprofile" , { RAWMSG = > $ rmsg } ) ;
} elsif ( $ device_types { $ devicetype } eq "WallMountedThermostat" ) {
my ( $ comforttemp , $ ecotemp , $ maxsetpointtemp , $ minsetpointtemp , $ weekprofile ) = unpack ( "CCCCH*" , substr ( $ bindata , 18 ) ) ;
$ comforttemp /= 2.0 ; #convert to degree celcius
$ ecotemp /= 2.0 ; #convert to degree celcius
$ maxsetpointtemp /= 2.0 ;
$ minsetpointtemp /= 2.0 ;
Log $ ll5 , "comfortemp $comforttemp, ecotemp $ecotemp, minsetpointtemp $minsetpointtemp, maxsetpointtemp $maxsetpointtemp" ;
Dispatch ( $ hash , "MAX,1,WallThermostatConfig,$addr,$ecotemp,$comforttemp,$maxsetpointtemp,$minsetpointtemp,$weekprofile" , { RAWMSG = > $ rmsg } ) ;
2012-12-03 21:43:42 +00:00
2013-01-10 22:29:50 +00:00
} elsif ( $ device_types { $ devicetype } eq "ShutterContact" ) {
2013-01-09 19:38:06 +00:00
Log 2 , "MAXLAN_Parse: ShutterContact send some configuration, but none was expected" if ( $ len > 18 ) ;
2013-01-16 20:34:56 +00:00
} elsif ( $ device_types { $ devicetype } eq "PushButton" ) {
Log 2 , "MAXLAN_Parse: PushButton send some configuration, but none was expected" if ( $ len > 18 ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} else { #TODO
2013-01-09 19:38:06 +00:00
Log 2 , "MAXLAN_Parse: Got configdata for unimplemented devicetype $devicetype" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-11-25 09:51:02 +00:00
#Clear Error
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,Error,$addr" , { RAWMSG = > $ rmsg } ) ;
2012-11-25 09:51:02 +00:00
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
#Check if it is already recorded in devices
my $ found = 0 ;
foreach ( @ { $ hash - > { devices } } ) {
$ found = 1 if ( $ _ - > { addr } eq $ addr ) ;
}
#Add device if it is not already known and not the cube itself
if ( ! $ found && $ devicetype != 0 ) {
$ hash - > { devices } [ @ { $ hash - > { devices } } ] - > { type } = $ devicetype ;
$ hash - > { devices } [ - 1 ] - > { addr } = $ addr ;
$ hash - > { devices } [ - 1 ] - > { serial } = $ serial ;
$ hash - > { devices } [ - 1 ] - > { name } = "no name" ;
$ hash - > { devices } [ - 1 ] - > { groupid } = $ groupid ;
}
} elsif ( $ cmd eq 'L' ) { #List
my $ bindata = "" ;
$ bindata = decode_base64 ( $ args [ 0 ] ) if ( @ args > 0 ) ;
#The L command consists of blocks of states (one for each device)
while ( length ( $ bindata ) ) {
my ( $ len , $ addr , $ errframetype , $ bits1 ) = unpack ( "CH6Ca" , $ bindata ) ;
my $ unkbit1 = vec ( $ bits1 , 0 , 1 ) ;
2012-11-23 07:32:50 +00:00
my $ initialized = vec ( $ bits1 , 1 , 1 ) ; #I never saw this beeing 0
my $ answer = vec ( $ bits1 , 2 , 1 ) ; #answer to what?
my $ rferror1 = vec ( $ bits1 , 3 , 1 ) ; # if 1 then see errframetype
my $ valid = vec ( $ bits1 , 4 , 1 ) ; #is the status following the common header valid
my $ unkbit2 = vec ( $ bits1 , 5 , 1 ) ;
my $ unkbit3 = vec ( $ bits1 , 6 , 2 ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2012-11-23 07:32:50 +00:00
Log 5 , "len $len, addr $addr, initialized $initialized, valid $valid, rferror $rferror1, errframetype $errframetype, answer $answer, unkbit ($unkbit1,$unkbit2,$unkbit3)" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2012-11-23 07:32:50 +00:00
my $ payload = unpack ( "H*" , substr ( $ bindata , 6 , $ len - 6 + 1 ) ) ; #+1 because the len field is not counted
2012-11-23 07:32:32 +00:00
if ( $ valid ) {
my $ shash = $ modules { MAX } { defptr } { $ addr } ;
if ( ! $ shash ) {
Log 2 , "Got List response for undefined device with addr $addr" ;
2013-02-12 04:22:39 +00:00
} elsif ( $ shash - > { type } =~ /HeatingThermostat.*/ ) {
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,ThermostatState,$addr,$payload" , { RAWMSG = > $ rmsg } ) ;
2013-01-10 22:30:05 +00:00
} elsif ( $ shash - > { type } eq "WallMountedThermostat" ) {
Dispatch ( $ hash , "MAX,1,WallThermostatState,$addr,$payload" , { RAWMSG = > $ rmsg } ) ;
2012-11-23 07:32:32 +00:00
} elsif ( $ shash - > { type } eq "ShutterContact" ) {
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,ShutterContactState,$addr,$payload" , { RAWMSG = > $ rmsg } ) ;
2013-01-16 20:34:56 +00:00
} elsif ( $ shash - > { type } eq "PushButton" ) {
Dispatch ( $ hash , "MAX,1,PushButtonState,$addr,$payload" , { RAWMSG = > $ rmsg } ) ;
2012-11-23 07:32:32 +00:00
} else {
2013-01-09 19:38:06 +00:00
Log 2 , "MAXLAN_Parse: Got status for unimplemented device type $shash->{type}" ;
2012-11-23 07:32:32 +00:00
}
} # if($valid)
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
$ bindata = substr ( $ bindata , $ len + 1 ) ; #+1 because the len field is not counted
2012-11-23 07:32:32 +00:00
} # while(length($bindata))
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} elsif ( $ cmd eq "N" ) { #New device paired
if ( @ args == 0 ) {
$ hash - > { STATE } = "initalized" ; #pairing ended
2012-12-09 15:01:13 +00:00
$ hash - > { pairmode } = 0 ;
2013-01-28 20:32:22 +00:00
return $ name ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
my ( $ type , $ addr , $ serial ) = unpack ( "CH6a[10]" , decode_base64 ( $ args [ 0 ] ) ) ;
2013-01-09 19:38:06 +00:00
Log 2 , "MAXLAN_Parse: Paired new device, type $device_types{$type}, addr $addr, serial $serial" ;
2012-12-09 15:03:06 +00:00
Dispatch ( $ hash , "MAX,1,define,$addr,$device_types{$type},$serial,0,1" , { RAWMSG = > $ rmsg } ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
#After a device has been paired, it automatically appears in the "L" and "C" commands,
MAXLAN_RequestConfiguration ( $ hash , $ addr ) ;
} elsif ( $ cmd eq "A" ) { #Acknowledged
} elsif ( $ cmd eq "S" ) { #Response to s:
2012-12-02 23:28:00 +00:00
$ hash - > { dutycycle } = hex ( $ args [ 0 ] ) ; #number of command send over the air
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
my $ discarded = $ args [ 1 ] ;
2012-12-02 23:28:00 +00:00
$ hash - > { freememoryslot } = $ args [ 2 ] ;
2013-01-09 19:38:06 +00:00
Log 5 , "MAXLAN_Parse: dutycyle $hash->{dutycycle}, freememoryslot $hash->{freememoryslot}" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
2013-01-09 19:38:06 +00:00
Log 3 , "MAXLAN_Parse: 1% rule: we sent too much, cmd is now in queue" if ( $ hash - > { dutycycle } == 100 && $ hash - > { freememoryslot } > 0 ) ;
Log 2 , "MAXLAN_Parse: 1% rule: we sent too much, queue is full" if ( $ hash - > { dutycycle } == 100 && $ hash - > { freememoryslot } == 0 ) ;
Log 2 , "MAXLAN_Parse: Command was discarded" if ( $ discarded ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} else {
2013-01-28 20:32:22 +00:00
Log 2 , "MAXLAN_Parse: Unknown command $cmd" ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2013-01-28 20:32:22 +00:00
return $ name ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
########################
2013-01-28 20:33:06 +00:00
#Returns undef on sucess
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
MAXLAN_SimpleWrite ( @ )
{
my ( $ hash , $ msg ) = @ _ ;
my $ name = $ hash - > { NAME } ;
Log GetLogLevel ( $ name , 5 ) , 'MAXLAN_SimpleWrite: ' . $ msg ;
2013-01-28 20:33:06 +00:00
return "MAXLAN_SimpleWrite: Not connected" if ( ! MAXLAN_IsConnected ( $ hash ) ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
$ msg . = "\r\n" ;
my $ ret = syswrite ( $ hash - > { TCPDev } , $ msg ) ;
#TODO: none of those conditions detect if the connection is actually lost!
if ( ! $ hash - > { TCPDev } || ! defined ( $ ret ) || ! $ hash - > { TCPDev } - > connected ) {
2012-12-02 23:28:00 +00:00
Log GetLogLevel ( $ name , 1 ) , 'MAXLAN_SimpleWrite failed' ;
MAXLAN_Disconnect ( $ hash ) ;
2013-01-28 20:33:06 +00:00
return "MAXLAN_SimpleWrite: syswrite failed" ;
2012-12-02 23:28:00 +00:00
}
2013-01-28 20:33:06 +00:00
return undef ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
########################
sub
MAXLAN_DoInit ( $ )
{
my ( $ hash ) = @ _ ;
return undef ;
}
2013-01-28 20:33:06 +00:00
#Returns undef on success
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
MAXLAN_RequestList ( $ )
{
my $ hash = shift ;
2012-12-02 23:28:00 +00:00
return MAXLAN_Write ( $ hash , "l:" , "L:" ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
#####################################
sub
MAXLAN_Poll ( $ )
{
my $ hash = shift ;
2013-01-28 20:33:06 +00:00
my $ ret = undef ;
2012-12-02 23:28:00 +00:00
if ( MAXLAN_IsConnected ( $ hash ) ) {
2013-01-28 20:33:06 +00:00
$ ret = MAXLAN_RequestList ( $ hash ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
} else {
2012-12-02 23:28:00 +00:00
#Connecting gives us a RequestList for free
2013-01-28 20:33:06 +00:00
$ ret = MAXLAN_Connect ( $ hash ) ;
}
if ( $ ret ) {
#Connecting failed/Got invalid answer
MAXLAN_Disconnect ( $ hash ) ;
InternalTimer ( gettimeofday ( ) + $ reconnect_interval , "MAXLAN_Poll" , $ hash , 0 ) ;
return ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-12-02 23:28:00 +00:00
2012-12-09 15:01:27 +00:00
MAXLAN_Disconnect ( $ hash ) if ( ! $ hash - > { persistent } && ! $ hash - > { pairmode } ) ;
2012-12-02 23:28:00 +00:00
InternalTimer ( gettimeofday ( ) + $ hash - > { INTERVAL } , "MAXLAN_Poll" , $ hash , 0 ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-12-02 23:28:00 +00:00
#This only works for a device that got just paired
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
MAXLAN_RequestConfiguration ( $$ )
{
my ( $ hash , $ addr ) = @ _ ;
2012-12-02 23:28:00 +00:00
return MAXLAN_Write ( $ hash , "c:$addr" , "C:" ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-12-09 14:59:45 +00:00
sub
MAXLAN_Send ( @ )
{
2013-02-15 03:19:57 +00:00
my ( $ hash , $ cmd , $ dst , $ payload , % opts ) = @ _ ;
2012-12-09 14:59:45 +00:00
2013-02-15 03:19:57 +00:00
my $ flags = "00" ;
my $ groupId = "00" ;
my $ callbackParam = undef ;
$ flags = $ opts { flags } if ( exists ( $ opts { flags } ) ) ;
$ groupId = $ opts { groupId } if ( exists ( $ opts { groupId } ) ) ;
Log 2 , "MAXLAN_Send: MAXLAN does not support src" if ( exists ( $ opts { src } ) ) ;
$ callbackParam = $ opts { callbackParam } if ( exists ( $ opts { callbackParam } ) ) ;
2012-12-09 14:59:45 +00:00
2013-01-12 15:15:03 +00:00
$ payload = pack ( "H*" , "00" . $ flags . $ msgCmd2Id { $ cmd } . "000000" . $ dst . $ groupId . $ payload ) ;
2012-12-09 14:59:45 +00:00
2012-12-02 23:28:00 +00:00
my $ ret = MAXLAN_Write ( $ hash , "s:" . encode_base64 ( $ payload , "" ) , "S:" ) ;
2013-02-15 03:19:57 +00:00
#TODO: actually check return value
if ( defined ( $ opts { callbackParam } ) ) {
Dispatch ( $ hash , "MAX,1,Ack$cmd,$dst,$opts{callbackParam}" , { RAWMSG = > "" } ) ;
}
2012-12-02 23:28:00 +00:00
#Reschedule a poll in the near future after the cube will
#have gotten an answer
2012-11-23 07:32:08 +00:00
RemoveInternalTimer ( $ hash ) ;
InternalTimer ( gettimeofday ( ) + $ roundtriptime , "MAXLAN_Poll" , $ hash , 0 ) ;
2012-12-02 23:28:00 +00:00
return $ ret ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-12-02 23:28:00 +00:00
#Resets the cube, i.e. do a factory reset. All pairings will be lost from the cube
#(but you will have to manually reset each individual device.
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
sub
MAXLAN_RequestReset ( $ )
{
my $ hash = shift ;
2012-12-02 23:28:00 +00:00
return MAXLAN_Write ( $ hash , "a:" , "A:" ) ;
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
}
2012-11-21 19:57:25 +00:00
#Remove the device from the cube, i.e. deletes the pairing
sub
MAXLAN_RemoveDevice ( $$ )
{
my ( $ hash , $ addr ) = @ _ ;
2012-12-08 00:28:23 +00:00
#This does a factoryReset on the Device
2012-12-09 15:03:06 +00:00
my $ ret = MAXLAN_Write ( $ hash , "t:1,1," . encode_base64 ( pack ( "H6" , $ addr ) , "" ) , "A:" ) ;
if ( ! defined ( $ ret ) ) { #success
#The device is not longer accessable by the Cube
$ modules { MAX } { defptr } { $ addr } { IODev } = undef ;
}
return $ ret ;
2012-11-21 19:57:25 +00:00
}
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
1 ;
= pod
= begin html
< a name = "MAXLAN" > </a>
<h3> MAXLAN </h3>
<ul>
<tr> <td>
The MAXLAN is the fhem module for the eQ - 3 MAX ! Cube LAN Gateway .
<br> <br>
The fhem module makes the MAX ! "bus" accessible to fhem , automatically detecting paired MAX ! devices . ( The devices themselves are handled by the < a href = "#MAX" > MAX </a> module ) . <br>
<br>
< a name = "MAXLANdefine" > </a>
<b> Define </b>
<ul>
2012-12-02 23:28:00 +00:00
<code> define & lt ; name & gt ; MAXLAN & lt ; ip - address & gt ; [ : port ] [ & lt ; pollintervall & gt ; [ ondemand ] ] </code> <br>
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
<br>
port is 62910 by default . ( If your Cube listens on port 80 , you have to update the firmware with
the official MAX ! software ) .
If the ip - address is called none , then no device will be opened , so you
can experiment without hardware attached . <br>
The optional parameter & lt ; pollintervall & gt ; defines the time in seconds between each polling of data from the cube . <br>
2012-12-02 23:28:00 +00:00
You may provide the option <code> ondemand </code> forcing the MAXLAN module to tear - down the connection as often as possible
thus making the cube usable by other applications or the web portal .
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
</ul>
<br>
< a name = "MAXLANset" > </a>
<b> Set </b>
<ul>
<li> pairmode [ & lt ; n & gt ; , cancel ] <br>
Sets the cube into pairing mode for & lt ; n & gt ; seconds ( default is 60 s ) where it can be paired with other devices ( Thermostats , Buttons , etc . ) . You also have to set the other device into pairing mode manually . ( For Thermostats , this is pressing the "Boost" button for 3 seconds , for example ) .
Setting pairmode to "cancel" puts the cube out of pairing mode . </li>
<li> raw & lt ; data & gt ; <br>
Sends the raw & lt ; data & gt ; to the cube . </li>
<li> clock <br>
Sets the internal clock in the cube to the current system time of fhem ' s machine . You can add <br>
2012-12-02 23:28:00 +00:00
<code> attr ml set - clock - on - init </code> <br>
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
to your fhem . cfg to do this automatically on startup . </li>
<li> factorReset <br>
Reset the cube to factory defaults . </li>
2012-11-25 09:50:44 +00:00
<li> reconnect <br>
FHEM will terminate the current connection to the cube and then reconnect . This allows
re - reading the configuration data from the cube , as it is only send after establishing a new connection . </li>
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
</ul>
<br>
< a name = "MAXLANget" > </a>
<b> Get </b>
<ul>
N / A
</ul>
<br>
<br>
< a name = "MAXLANattr" > </a>
<b> Attributes </b>
<ul>
2012-12-02 23:28:00 +00:00
<li> set - clock - on - init <br>
2013-02-12 04:20:35 +00:00
( Default: 1 ) . Automatically call "set clock" after connecting to the cube . </li>
<li> < a href = "#do_not_notify" > do_not_notify </a> </li>
<li> < a href = "#attrdummy" > dummy </a> </li>
<li> < a href = "#loglevel" > loglevel </a> </li>
<li> < a href = "#addvaltrigger" > addvaltrigger </a> </li>
Initial commit of 00_MAXLAN.pm and 10_MAX.pm
00_MAXLAN.pm: update doc
10_MAX.pm: update doc
00_MAXLAN.pm: Fix syntax error
00_MAXLAN.pm: remove reference to hmId
00_MAXLAN.pm: also dispatch define events from metadata, because shutter does not have configdata
10_MAX.pm: allow setting temp to "on" and "off"
10_MAX.pm: fix doc formatting
00_MAXLAN.pm: Add two set commands: raw and clock
00_MAXLAN.pm: parse current until time
00_MAXLAN.pm: send quit in Undef
00_MAXLAN.pm: beautifying
Display ctrl mode (auto/manual/temporary)
Allow setting a temporary temperature
MAX: change event delimiter to handle time
Fix bug where only one room could be handled
MAX: parse "S:" response
List roomid, send correct roomid with desired-temp
MAX: show roomname for devices
MAX: add troubleshooting when device send temperature 0
00_MAXLAN: Fix parsing of "until" date: time and month were broken
00_MAXLAN: show time offset on start
Show more state info
Set timezone to floating because local cannot be determined on fritzbox
dispatch CubeClockState only if rfaddr is known
Read valve position of HeatingThermostat by gaggi (g.sturm@sturm-busse.de)
MAX: notify if 1% percent rule is oversteped and if queue is full
Do not crash on empty Metadata response
change inital label from "initalized" to "waiting for data"
Auto reconnect if connecting failed
defer setting clock until after complete hello
cleanup
Lower polling interval to 10 seconds
Remove ReadyFn, we already got a FD
really defer setting the clock
valveposition is in percent
rename serialNr to serial
check for matching magic/version, be more robust while parsing metadata
implement SendMetadata
Add missing devices during C: response
Fill SetRoomId
Make ReadAnswer really wait for one
Make valveposition a reading/show possible settings in WebUI (by wollet42, wton1@gmx.de)
Remove DateTime module
rename room to group: fhem already has a room concept
Set temperature individually, not for the whole group
Implement setting of groupid
Remove display of groupname, it does not say anything
generate events for HeatingThermostat's readings
Switched to ReadingsBulkUpdate (thanks to tobias.faust, tobias.faust@gmx.net)
Implement interfaces: this changes the setter desired-temp to desiredTemperature
Correct some Log messages
doc: make clear that MAXLAN uses the cube exclusively
Fix webinterface showing old name for desiredTemperature
add temp4valve4.gplot for Max! HeatingThermostats
Move SetTemperature to backend, allow eco/comfort
Show eco/comfort temperature from device
Support event-on-{update,change}-reading
Correct computation of time difference (thanks Andy Fuchs)
gplot: Corrected axis range
Allow configuring of a lot of device parameters
Add optional pollintervall to define (thanks to wollet42)
Return message up to UI
Minor fixes
Fix setting desiredTemperature
Allow cancel of pairmode
gplot: better scaling (by wollet42) and steps instead of interpolation
Continue even if L: is empty
add factoryReset
request config after new device paired
Updated CUL_MAX
Correct parsing of flags
parse measured(!) temperature
Unify logic for MAXLAN and CUL_MAX into MAX
Show some unused bits
Correctly show until time only in temporary mode
Fix measured temp
Fix checks for existance
Return list of valid values for desiredTemperature
Require a value with desiredTemperature and don't show (manual)
Update doc text
Update CUL_MAX
MAXLAN: dispatch define before configuration event
Update plot to show measured temperature, too
git-svn-id: https://svn.fhem.de/fhem/trunk@2144 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-11-19 23:03:18 +00:00
</ul>
</ul>
= end html
= cut