mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
mqtt2.template: add some features to sonos; zwave.template: add ZWA005 + changes to Spirit-Z
git-svn-id: https://svn.fhem.de/fhem/trunk@23072 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2611eb9b4e
commit
c923cf0f50
@ -3843,25 +3843,29 @@ desc:The sonos2mqtt bridge including automated setup for speaker devices (adds 2
|
|||||||
filter:TYPE=MQTT2_DEVICE
|
filter:TYPE=MQTT2_DEVICE
|
||||||
order:M_05c
|
order:M_05c
|
||||||
set DEVICE attrTemplate sonos2mqtt_bridge
|
set DEVICE attrTemplate sonos2mqtt_bridge
|
||||||
define n_configSonos1 notify global:DEFINED.MQTT2_RINCON_[A-Z0-9]+ sleep 1;\
|
attr DEVICE setList PauseAll:noArg sonos/cmd/pauseall\
|
||||||
|
CheckSubscription:noArg sonos/cmd/check-subscriptions
|
||||||
|
defmod n_configSonos1 notify global:DEFINED.MQTT2_RINCON_[A-Z0-9]+ sleep 1;\
|
||||||
set $EVTPART1 attrTemplate sonos2mqtt_speaker;\
|
set $EVTPART1 attrTemplate sonos2mqtt_speaker;\
|
||||||
set $EVTPART1 x_raw_payload {"command": "adv-command","input": {"cmd":"GetZoneInfo","reply":"ZoneInfo"}}
|
set $EVTPART1 x_raw_payload {"command": "adv-command","input": {"cmd":"GetZoneInfo","reply":"ZoneInfo"}}
|
||||||
define n_configSonos2 notify MQTT2_RINCON_[A-Z0-9]+:IPAddress:.* {\
|
defmod n_configSonos2 notify MQTT2_RINCON_[A-Z0-9]+:IPAddress:.* {\
|
||||||
my @tv = ("S14","S11","S9");\
|
my @tv = ("S14","S11","S9");\
|
||||||
|
my @line = ("S5","Z90","ZP120");\
|
||||||
my $url="http://$EVTPART1:1400";\
|
my $url="http://$EVTPART1:1400";\
|
||||||
my $xmltext = GetFileFromURL("$url/xml/device_description.xml");\
|
my $xmltext = GetFileFromURL("$url/xml/device_description.xml");\
|
||||||
my ($mn)=$xmltext =~ /<modelNumber>(S[0-9]+)/;\
|
my ($mn)=$xmltext =~ /(S[0-9]+)/;\
|
||||||
my ($img)=$xmltext =~ /<url>(.*)<\/url>/;\
|
my ($img)=$xmltext =~ /(.*)<\/url>/;\
|
||||||
my $icon="Sonos2mqtt_icon-$mn";\
|
my $icon="Sonos2mqtt_icon-$mn";\
|
||||||
my $setList=AttrVal($NAME,'setList','');\
|
my $setList=AttrVal($NAME,'setList','');\
|
||||||
fhem("setreading $NAME modelNumber $mn");\
|
fhem("setreading $NAME modelNumber $mn");\
|
||||||
fhem("\"wget -qO ./www/images/default/$icon.png $url$img\"");\
|
fhem("\"wget -qO ./www/images/default/$icon.png $url$img\"");\
|
||||||
fhem("attr $NAME icon $icon;sleep 4 WI;set WEB rereadicons");\
|
fhem("attr $NAME icon $icon;sleep 4 WI;set WEB rereadicons");\
|
||||||
if (grep(/$mn/, @tv)) {$setList=~s/input:Queue \{/input:Queue,TV \{/};\
|
if (grep(/$mn/, @tv)) {$setList=~s/input:Queue \{/input:Queue,TV \{/};\
|
||||||
|
if (grep(/$mn/, @line)) {$setList=~s/input:Queue \{/input:Queue,Line_In \{/};\
|
||||||
$setList=~s/;/;;/g;\
|
$setList=~s/;/;;/g;\
|
||||||
fhem("attr $NAME setList $setList")\
|
fhem("attr $NAME setList $setList")\
|
||||||
}
|
}
|
||||||
setreading DEVICE attrTemplateVersion 20200801
|
setreading DEVICE attrTemplateVersion 20201102
|
||||||
|
|
||||||
|
|
||||||
name:sonos2mqtt_speaker
|
name:sonos2mqtt_speaker
|
||||||
|
@ -243,6 +243,7 @@ filter:TYPE=ZWave
|
|||||||
order:03AEOTEC00000
|
order:03AEOTEC00000
|
||||||
desc:Templates for AEOTEC/AEON Labs devices. <br>Manufacturer info can be found <a href="https://aeotec.freshdesk.com/support/solutions/6000084017">here</a>. <br>firmware updates are available for some devices, but for updating, you have to use a separate Windows machine.
|
desc:Templates for AEOTEC/AEON Labs devices. <br>Manufacturer info can be found <a href="https://aeotec.freshdesk.com/support/solutions/6000084017">here</a>. <br>firmware updates are available for some devices, but for updating, you have to use a separate Windows machine.
|
||||||
|
|
||||||
|
|
||||||
#AEON Labs ZW095 Home Energy Meter Gen5
|
#AEON Labs ZW095 Home Energy Meter Gen5
|
||||||
name:ZW095_Home_Energy_Meter
|
name:ZW095_Home_Energy_Meter
|
||||||
filter:TYPE=ZWave
|
filter:TYPE=ZWave
|
||||||
@ -306,6 +307,13 @@ option:global
|
|||||||
get DEVICE configAll
|
get DEVICE configAll
|
||||||
setreading DEVICE attrTemplateVersion ZW100_Multisensor_USB_20201007
|
setreading DEVICE attrTemplateVersion ZW100_Multisensor_USB_20201007
|
||||||
|
|
||||||
|
name:ZWA005_TriSensor
|
||||||
|
filter:TYPE=ZWave
|
||||||
|
order:03AEOTEC0000ZWA005
|
||||||
|
desc:Applies to AEON Labs ZWA005 TriSensor.<br>NOTE: early version!<br>The template is based on this <a href="https://forum.fhem.de/index.php/topic,115396.0.html">forum thread</a>, manufacturer info can be found <a href="https://aeotec.freshdesk.com/support/solutions/folders/6000232835">here</a>. Having an up-to-date firmware is highly recommended!
|
||||||
|
set DEVICE configByte 4 1 ## Binary Sensor Report Enable (for seperate motion reporting)
|
||||||
|
setreading DEVICE attrTemplateVersion ZWA005_TriSensor_20201030
|
||||||
|
|
||||||
|
|
||||||
name:----Eurotronic-devices-section--------
|
name:----Eurotronic-devices-section--------
|
||||||
filter:TYPE=ZWave
|
filter:TYPE=ZWave
|
||||||
@ -325,8 +333,9 @@ par:RADIO_DIRECT_VALVE_CONTROL;Change mode to direct valve control (needs additi
|
|||||||
par:ICON;ICON as set, defaults to hm-cc-rt-dn;{ AttrVal("DEVICE","icon","hm-cc-rt-dn") }
|
par:ICON;ICON as set, defaults to hm-cc-rt-dn;{ AttrVal("DEVICE","icon","hm-cc-rt-dn") }
|
||||||
attr DEVICE icon ICON
|
attr DEVICE icon ICON
|
||||||
set DEVICE configByte 4 1 ## should set "send battery reports once a day"
|
set DEVICE configByte 4 1 ## should set "send battery reports once a day"
|
||||||
|
set DEVICE configByte 5 1 ## should set "Temperature Report Threshold" to 1 (lowest value)
|
||||||
|
set DEVICE configByte 6 1 ## should set valve reports to 1% delta - might not lead to any report...
|
||||||
option:{ RADIO_NONZWAVE_EXTERNAL_TEMP + RADIO_ZWAVE_EXTERNAL_TEMP + RADIO_NO_EXTERNAL_TEMP }
|
option:{ RADIO_NONZWAVE_EXTERNAL_TEMP + RADIO_ZWAVE_EXTERNAL_TEMP + RADIO_NO_EXTERNAL_TEMP }
|
||||||
set DEVICE configByte 6 5 ## should set valve reports to 5% delta
|
|
||||||
option:{ RADIO_DIRECT_VALVE_CONTROL }
|
option:{ RADIO_DIRECT_VALVE_CONTROL }
|
||||||
set DEVICE configByte 64 31 ## should set "manufacturer specific"
|
set DEVICE configByte 64 31 ## should set "manufacturer specific"
|
||||||
option:{ RADIO_NO_EXTERNAL_TEMP }
|
option:{ RADIO_NO_EXTERNAL_TEMP }
|
||||||
@ -341,7 +350,8 @@ attr DEVICE setList sml_temperature
|
|||||||
#closing section
|
#closing section
|
||||||
option:global
|
option:global
|
||||||
attr DEVICE webCmd desired-temp
|
attr DEVICE webCmd desired-temp
|
||||||
|
attr DEVICE userReadings energySaveHeating:setpointTemp.+energySaveHeating {ReadingsNum($name,"setpointTemp",0)}, heating:setpointTemp.+heating {ReadingsNum($name,"setpointTemp",0)}, thermostatMode:setpointTemp.+ {ReadingsVal($name,"setpointTemp",0)=~m/(heating|energySaveHeating)/; $1?$1:undef}, valve:reportedState.+(dim.[0-9.]+|off) {my $val = ReadingsVal($name,"state",0); return 0 if $val eq "off"; ReadingsNum($name,"state",0)}
|
||||||
attr DEVICE widgetOverride desired-temp:knob,min:5,max:30,angleArc:180,width:40,height:40,fgColor:#FF9900,bgColor:#CCCCCC,step:0.5,lineCap:round,angleOffset:225
|
attr DEVICE widgetOverride desired-temp:knob,min:5,max:30,angleArc:180,width:40,height:40,fgColor:#FF9900,bgColor:#CCCCCC,step:0.5,lineCap:round,angleOffset:225
|
||||||
get DEVICE configAll
|
get DEVICE configAll
|
||||||
set DEVICE attrTemplate speechcontrol_type_thermostat
|
set DEVICE attrTemplate speechcontrol_type_thermostat
|
||||||
setreading DEVICE attrTemplateVersion Eurotronic_Spirit_20201017
|
setreading DEVICE attrTemplateVersion Eurotronic_Spirit_20201101
|
||||||
|
Loading…
x
Reference in New Issue
Block a user