mqtt2.template: bugfixes in hoymiles microinverter via ahoy

git-svn-id: https://svn.fhem.de/fhem/trunk@26319 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2022-08-13 13:40:52 +00:00
parent 5aacbfc515
commit e4f08a0262

View File

@ -5300,9 +5300,9 @@ setreading DEVICE attrTemplateVersion 20210804
###########################################
name:hoymiles_microinverter_hub_bridge
filter:TYPE=MQTT2_DEVICE
desc:Early version! Use this with "ahoy" firmware for ESP8266+nRF24L01+. For further details visit https://github.com/grindylow/ahoy and https://www.mikrocontroller.net/topic/525778.
order:W_05
farewell:template has been applied successfully. <br>Note: In case you use an external MQTT server or not exclusively use FHEM to send MQTT commands to your devices, it's highly recommended to extend the ignoreRegexp of your IO device! Could be something like <i>|devcontrol/[0-8]+/[0-8]+</i>.
desc:Early version! Use this with "ahoy" firmware for ESP8266+nRF24L01+. For further details visit https://github.com/grindylow/ahoy and https://www.mikrocontroller.net/topic/525778. Resulting <b>device represents the interfacing ESP-MCU</b>, all inverters will be forwarded into own MQTT2_DEVICE instances.
order:W_06
farewell:template has been applied successfully. <br>Note: In case you use an external MQTT server or not exclusively use FHEM to send MQTT commands to your devices, it's highly recommended to extend the ignoreRegexp of your IO device! Could be something like <i>|devcontrol/[0-8]+/[0-8]+</i>. For the single microinverters, please be patient, until the Readings concerning the AC will have been sent in.
par:BASE_ID;BASE_ID as set on the esp;{ AttrVal('DEVICE','readingList','') =~ m,([^:]+)/version:, ? $1 : undef }
par:ICON;ICON as set, defaults to solar;{ AttrVal('DEVICE','icon','solar') }
attr DEVICE icon ICON
@ -5314,21 +5314,37 @@ attr DEVICE readingList BASE_ID/version:.* version\
BASE_ID/device:.* device
attr DEVICE setStateList on off
attr DEVICE model hoymiles_microinverter_hub_bridge
setreading DEVICE attrTemplateVersion 20200808
setreading DEVICE attrTemplateVersion 20200812
{ AttrTemplate_Initialize() }
name:hoymiles_microinverter_inverter
prereq:{my @devices=devspec2array('model=hoymiles_microinverter_hub_bridge');return 1 if $devices[0];return 0}
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/ch0/U_AC:.*
desc:Early version! Use this with "ahoy" firmware for ESP8266+nRF24L01+. For further details visit https://github.com/grindylow/ahoy and https://www.mikrocontroller.net/topic/525778<br>Represents a single microinverter.
order:W_051
par:INVERTERLONG_ID;INVERTERLONG_ID Base_Id plus inverter name as set in webinterface;{ AttrVal('DEVICE','readingList','') =~ m,[\b]?([^/:]+/[^/]+)/ch0/U_AC:, ? $1 : undef }
par:BASE_ID;BASE_ID as set on the esp;{ AttrVal('DEVICE','readingList','') =~ m,[\b]?([^/:]+)/[^/]+/ch0/U_AC:, ? $1 : undef }
par:INVERTER_NR;INVERTER_NR - order nr. in your setup. Note: numbering starts with "0";{ AttrVal('DEVICE','setList','') =~ m,/devcontrol/([0-9]+)/[0-9]+, ? $1 : undef }
desc:Early version, device represents a single microinverter. Use this with "ahoy" firmware for ESP8266+nRF24L01+. Wait some time until the target device got <b>readings for channel 0</b> (AC part, refreshing your browser window may help to get them visible)!
order:W_061
par:BASE_ID;BASE_ID as set on the esp (e.g. inverters). No CID;{ AttrVal('DEVICE','readingList','') =~ m,^\s*([^/:\s]+)[/][^/]+/ch0/U_AC:,m ? $1 : undef }
par:INVERTERLONG_ID;INVERTERLONG_ID Base_Id plus inverter name as set in webinterface;{ AttrVal('DEVICE','readingList','') =~ m,^\s*([^/:]+[/][^/]+)/ch0/U_AC:,m ? $1 : undef }
par:INVERTER_NR;INVERTER_NR - order nr. in your setup. Note: numbering starts with "0";{ AttrVal('DEVICE','setList','') =~ m,/devcontrol/([0-9]+)/[0-9]+,m ? $1 : undef }
par:RADIO_SINGLE;inverter has just one channel;{ undef }
par:RADIO_DOUBLE;inverter has two channels;{ undef }
par:RADIO_QUATTRO;inverter has four channels;{ undef }
par:ICON;ICON as set, defaults to solar;{ AttrVal('DEVICE','icon','solar') }
attr DEVICE icon ICON
deletereading -q DEVICE .*_.*
option:{ RADIO_SINGLE }
attr DEVICE readingList INVERTERLONG_ID/ch0/U_AC:.* U_AC\
INVERTERLONG_ID/ch0/I_AC:.* I_AC\
INVERTERLONG_ID/ch0/P_AC:.* P_AC\
INVERTERLONG_ID/ch0/Freq:.* Freq\
INVERTERLONG_ID/ch0/Temp:.* temperature\
INVERTERLONG_ID/ch0/YieldDay:.* YieldDay\
INVERTERLONG_ID/ch0/YieldTotal:.* YieldTotal\
INVERTERLONG_ID/ch1/I_DC:.* I_DC1\
INVERTERLONG_ID/ch1/P_DC:.* P_DC1\
INVERTERLONG_ID/ch1/YieldDay:.* YieldDay1\
INVERTERLONG_ID/ch1/YieldTotal:.* YieldTotal1
option:{ RADIO_DOUBLE }
attr DEVICE readingList \
INVERTERLONG_ID/ch0/U_AC:.* U_AC\
INVERTERLONG_ID/ch0/I_AC:.* I_AC\
@ -5345,6 +5361,32 @@ attr DEVICE readingList \
INVERTERLONG_ID/ch2/P_DC:.* P_DC2\
INVERTERLONG_ID/ch2/YieldDay:.* YieldDay2\
INVERTERLONG_ID/ch2/YieldTotal:.* YieldTotal2
option:{ RADIO_QUATTRO }
attr DEVICE readingList \
INVERTERLONG_ID/ch0/U_AC:.* U_AC\
INVERTERLONG_ID/ch0/I_AC:.* I_AC\
INVERTERLONG_ID/ch0/P_AC:.* P_AC\
INVERTERLONG_ID/ch0/Freq:.* Freq\
INVERTERLONG_ID/ch0/Temp:.* temperature\
INVERTERLONG_ID/ch0/YieldDay:.* YieldDay\
INVERTERLONG_ID/ch0/YieldTotal:.* YieldTotal\
INVERTERLONG_ID/ch1/I_DC:.* I_DC1\
INVERTERLONG_ID/ch1/P_DC:.* P_DC1\
INVERTERLONG_ID/ch1/YieldDay:.* YieldDay1\
INVERTERLONG_ID/ch1/YieldTotal:.* YieldTotal1\
INVERTERLONG_ID/ch2/I_DC:.* I_DC2\
INVERTERLONG_ID/ch2/P_DC:.* P_DC2\
INVERTERLONG_ID/ch2/YieldDay:.* YieldDay2\
INVERTERLONG_ID/ch2/YieldTotal:.* YieldTotal2\
INVERTERLONG_ID/ch3/I_DC:.* I_DC3\
INVERTERLONG_ID/ch3/P_DC:.* P_DC3\
INVERTERLONG_ID/ch3/YieldDay:.* YieldDay3\
INVERTERLONG_ID/ch3/YieldTotal:.* YieldTotal3\
INVERTERLONG_ID/ch4/I_DC:.* I_DC4\
INVERTERLONG_ID/ch4/P_DC:.* P_DC4\
INVERTERLONG_ID/ch4/YieldDay:.* YieldDay4\
INVERTERLONG_ID/ch4/YieldTotal:.* YieldTotal4
option:global
attr DEVICE setList \
on:noArg BASE_ID/devcontrol/INVERTER_NR/0 on\
off:noArg BASE_ID/devcontrol/INVERTER_NR/1 off\
@ -5352,7 +5394,7 @@ attr DEVICE setList \
reboot:noArg BASE_ID/devcontrol/INVERTER_NR/2 restart
attr DEVICE setStateList on off
attr DEVICE model hoymiles_microinverter_inverter
setreading DEVICE attrTemplateVersion 20200808
setreading DEVICE attrTemplateVersion 20200812