2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

mqtt2.template: bugfixes in valetudo and tasmota shutter templates

git-svn-id: https://svn.fhem.de/fhem/trunk@20452 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2019-11-04 11:25:43 +00:00
parent 7a150b1157
commit 99a57277ae

View File

@ -727,14 +727,14 @@ par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
set DEVICE attrTemplate tasmota_set_lowercase_texts_and_state1 set DEVICE attrTemplate tasmota_set_lowercase_texts_and_state1
set IO_DEV publish CMNDTOPIC/Backlog LedState 2; SetOption80 1; Interlock 1,2; Interlock ON; SetOption81 1; switchmode1 3; switchmode2 3; PulseTime1 0; PulseTime2 0; SaveData 1; set IO_DEV publish CMNDTOPIC/Backlog LedState 2; SetOption80 1; Interlock 1,2; Interlock ON; SetOption81 1; switchmode1 3; switchmode2 3; PulseTime1 0; PulseTime2 0; SaveData 1;
set IO_DEV publish CMNDTOPIC/Restart 1 set IO_DEV publish CMNDTOPIC/Restart 1
defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog SHUTTEROPENDURATION 20;; SHUTTERCLOSEDURATION 20;; SHUTTERINVERT 1;; GROUPTOPIC Rollos;; SaveData 1;; defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog ShutterOpenDuration1 20;; ShutterCloseDuration1 20;; ShutterInvert1 1;; SaveData 1;;
attr DEVICE setList \ attr DEVICE setList \
close:noArg CMNDTOPIC/SHUTTERCLOSE\ close:noArg CMNDTOPIC/ShutterClose1\
open:noArg CMNDTOPIC/SHUTTEROPEN\ open:noArg CMNDTOPIC/ShutterOpen1\
half:noArg CMNDTOPIC/SHUTTERPOSITION 50\ half:noArg CMNDTOPIC/ShutterSetHalfway1 50\
pct:slider,0,1,100 CMNDTOPIC/SHUTTERPOSITION $EVTPART1\ pct:slider,0,1,100 CMNDTOPIC/ShutterPosition1 $EVTPART1\
stop:noArg CMNDTOPIC/SHUTTERSTOP\ stop:noArg CMNDTOPIC/ShutterStop1\
resetClose:noArg CMNDTOPIC/SHUTTERSETCLOSE\ resetClose:noArg CMNDTOPIC/ShutterSetClose1\
x_configuration CMNDTOPIC/$EVTPART1 $EVTPART2 x_configuration CMNDTOPIC/$EVTPART1 $EVTPART2
attr DEVICE readingList \ attr DEVICE readingList \
TELETOPIC/LWT:.* LWT\ TELETOPIC/LWT:.* LWT\
@ -759,12 +759,12 @@ LWT\
state state
deletereading -q DEVICE (?!associatedWith).* deletereading -q DEVICE (?!associatedWith).*
attr DEVICE setStateList open close half stop pct attr DEVICE setStateList open close half stop pct
attr DEVICE comment After applying the template set "ShutterOpenDuration" and "ShutterCloseDuration" first.\ attr DEVICE comment After applying the template set "ShutterOpenDuration1" and "ShutterCloseDuration1" first.\
Use the "set x_configuration" Option. Example: "set x_configuration ShutterOpenDuration 35"\ Use the "set x_configuration" Option. Example: "set x_configuration ShutterOpenDuration1 35"\
Shutter specific commands available: ShutterOpenDuration, ShutterCloseDuration, ShutterRelay, ShutterSetHalfway, ShutterSetClose, ShutterInvert, ShutterMotordelay, ShutterCalibration; you may use this for general setOptions in tasmota also.\ Shutter specific commands available: ShutterOpenDuration1, ShutterCloseDuration1, ShutterRelay1, ShutterSetHalfway1, ShutterSetClose1, ShutterInvert1, ShutterMotordelay1, ShutterCalibration1; you may use this for general setOptions in tasmota also.\
commands may need restart to take effect.\ commands may need restart to take effect.\
For calibration and further information on the available commands see <a href="https://github.com/arendst/Tasmota/wiki/blinds-and-roller-shades">Tasmota wiki</a>. For calibration, use of more than one shutter device and further information on the available commands see <a href="https://github.com/arendst/Tasmota/wiki/blinds-and-roller-shades">Tasmota wiki</a>.
farewell:template has been applied successfully. Now it's recommended to set shutter's open and close duration and 50% position, see short instruction in comment attribute or the <br><a href="https://github.com/stefanbode/Sonoff-Tasmota/wiki/Shutter-blinds-working-with-two-relays">firmware contributor's wiki</a>. farewell:template has been applied successfully. Now it's recommended to set shutter's open and close duration and 50% position, see short instruction in comment attribute or the <br><a href="https://github.com/arendst/Tasmota/wiki/blinds-and-roller-shades">Tasmota wiki</a>.
attr DEVICE model tasmota_2ch_shutter_invert_1 attr DEVICE model tasmota_2ch_shutter_invert_1
# tasmota 2ch as shutter device. # tasmota 2ch as shutter device.
@ -775,7 +775,7 @@ order:A_02b1
par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef } par:CMNDTOPIC;Command topic prefix, without trailing /;{ AttrVal("DEVICE","readingList","") =~ m,([^:]*)\b(tele|cmnd|stat)(/.*)?/LWT:, ? "${1}cmnd$3" : undef }
par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)} par:IO_DEV;Currently used IO;{ AttrVal("DEVICE","IODev",undef)}
set DEVICE attrTemplate tasmota_2ch_shutter_invert_1 set DEVICE attrTemplate tasmota_2ch_shutter_invert_1
defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog SHUTTEROPENDURATION 20;; SHUTTERCLOSEDURATION 20;; SHUTTERINVERT 0;; GROUPTOPIC Rollos;; SaveData 1;; defmod configure_DEVICEattrTemplate_at at +00:00:20 set IO_DEV publish CMNDTOPIC/Backlog ShutterOpenDuration1 20;; ShutterCloseDuration1 20;; ShutterInvert1 0;; SaveData 1;;
attr DEVICE devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red Online:10px-kreis-gruen Offline:10px-kreis-rot 100:fts_shutter_10 0:fts_shutter_100 9\d.*:fts_shutter_10 8\d.*:fts_shutter_20 7\d.*:fts_shutter_30 6\d.*:fts_shutter_40 5\d.*:fts_shutter_50 4\d.*:fts_shutter_60 3\d.*:fts_shutter_70 2\d.*:fts_shutter_80 1\d.*:fts_shutter_90 \b\d\b.*:fts_shutter_90 attr DEVICE devStateIcon opening:fts_shutter_up@red closing:fts_shutter_down@red Online:10px-kreis-gruen Offline:10px-kreis-rot 100:fts_shutter_10 0:fts_shutter_100 9\d.*:fts_shutter_10 8\d.*:fts_shutter_20 7\d.*:fts_shutter_30 6\d.*:fts_shutter_40 5\d.*:fts_shutter_50 4\d.*:fts_shutter_60 3\d.*:fts_shutter_70 2\d.*:fts_shutter_80 1\d.*:fts_shutter_90 \b\d\b.*:fts_shutter_90
attr DEVICE model tasmota_2ch_shutter_invert_0 attr DEVICE model tasmota_2ch_shutter_invert_0
@ -1789,7 +1789,7 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*valetudo[/].*
desc:use this to control a rooted Xiamoni Vacuum / Roborock. For further details visit https://github.com/Hypfer/Valetudo<br><br>NOTE: Initial version, not yet fully tested, just build according to https://forum.fhem.de/index.php/topic,104804.0.html<br> desc:use this to control a rooted Xiamoni Vacuum / Roborock. For further details visit https://github.com/Hypfer/Valetudo<br><br>NOTE: Initial version, not yet fully tested, just build according to https://forum.fhem.de/index.php/topic,104804.0.html<br>
order:X_03 order:X_03
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]valetudo[/].*:, ? $1 : undef } par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]valetudo[/].*:, ? $1 : undef }
par:DEVNAME;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,valetudo[/]([^/]+)[/].*:, ? $1 : undef } par:DEVNAME;DEVNAME typically is rockrobo;{ AttrVal("DEVICE","readingList","") =~ m,valetudo[/]([^/]+)[/].*:, ? $1 : undef }
deletereading -q DEVICE (?!associatedWith).* deletereading -q DEVICE (?!associatedWith).*
defmod DEVICE MQTT2_DEVICE DEVNAME defmod DEVICE MQTT2_DEVICE DEVNAME
attr DEVICE icon vacuum_top attr DEVICE icon vacuum_top
@ -1804,8 +1804,8 @@ attr DEVICE setList start:noArg BASE_ID/DEVNAME/command start\
pause:noArg BASE_ID/DEVNAME/command pause\ pause:noArg BASE_ID/DEVNAME/command pause\
locate:noArg BASE_ID/DEVNAME/command locate\ locate:noArg BASE_ID/DEVNAME/command locate\
fan_power:min,medium,high,max,mop BASE_ID/DEVNAME/set_fan_speed $EVTPART1\ fan_power:min,medium,high,max,mop BASE_ID/DEVNAME/set_fan_speed $EVTPART1\
zone BASE_ID/DEVNAME/send_command zoned_cleanup $EVTPART1\ zone BASE_ID/DEVNAME/custom_command {"command":"zoned_cleanup","zone_ids":["$EVTPART1"]}\
goto BASE_ID/DEVNAME/send_command go_to $EVTPART1 goto BASE_ID/DEVNAME/custom_command {"command":"go_to","spot_id":["$EVTPART1"]}
attr DEVICE setStateList charge locate pause stop start attr DEVICE setStateList charge locate pause stop start
attr DEVCID comment For code "valetudo2svg()" see <a href="https://forum.fhem.de/index.php/topic,104687.msg986304.html#msg986304">this forum thread</a>. attr DEVCID comment For code "valetudo2svg()" see <a href="https://forum.fhem.de/index.php/topic,104687.msg986304.html#msg986304">this forum thread</a>.
farewell:template has been applied successfully. For map generation you'll need additional code to myUtils, see <a href="https://forum.fhem.de/index.php/topic,104687.msg986304.html#msg986304">this forum thread</a> for details. farewell:template has been applied successfully. For map generation you'll need additional code to myUtils, see <a href="https://forum.fhem.de/index.php/topic,104687.msg986304.html#msg986304">this forum thread</a> for details.