|
|
|
@ -101,8 +101,48 @@ RoK='-r' # retain '-r' or '-d' depending on value above
|
|
|
|
|
IFS=',' read -r -a array <<< "$MQTT_Data"
|
|
|
|
|
bashio::log.magenta "${array[@]}"
|
|
|
|
|
|
|
|
|
|
#### All Sensors List
|
|
|
|
|
# PrgVersion,Plantname,Timestamp,SunRise,SunSet,InvSerial,InvName,InvTime,InvStatus,InvSwVer,InvClass,InvType,InvTemperature,InvGridRelay,EToday,ETotal,GridFreq,PACTot,PAC1,PAC2,PAC3,UAC1,UAC2,UAC3,IAC1,IAC2,IAC3,OperTm,FeedTm,PDCTot,PDC1,PDC2,PDC,UDC1,UDC2,UDC,IDC1,IDC2,IDC,BTSignal,BatTmpVal,BatVol,BatAmp,BatChaStt,InvWakeupTm,InvSleepTm,MeteringWOut,MeteringWIn,MeteringWTot
|
|
|
|
|
####
|
|
|
|
|
|
|
|
|
|
###### MAKE SENSORS #######
|
|
|
|
|
|
|
|
|
|
value='PrgVersion'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SBFspot Version'
|
|
|
|
|
mdi_icon='mdi:white-balance-sunny'
|
|
|
|
|
# devClass= << add in \"device_class\": \"$devClass\",
|
|
|
|
|
# stClass= << add in \"state_class\": \"$stClass\",
|
|
|
|
|
# UoM= << add in \"unit_of_measurement\": \"$UoM\",
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat='diagnostic'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "${value}"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='Plantname'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Plantname'
|
|
|
|
|
mdi_icon='mdi:card-bulleted'
|
|
|
|
|
# devClass= << add in \"device_class\": \"$devClass\",
|
|
|
|
|
# stClass= << add in \"state_class\": \"$stClass\",
|
|
|
|
|
# UoM= << add in \"unit_of_measurement\": \"$UoM\",
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat='diagnostic'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "${value}"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='InvName'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
@ -134,7 +174,7 @@ value='Timestamp'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "${value}"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"device_class\": \"$devClass\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | as_datetime | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"device_class\": \"$devClass\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -179,7 +219,7 @@ fi
|
|
|
|
|
|
|
|
|
|
value='SunSet'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
value='SunSet'
|
|
|
|
|
|
|
|
|
|
describe='SMA Sun Set'
|
|
|
|
|
mdi_icon='mdi:weather-hazy'
|
|
|
|
|
devClass= ### no class for timestamp custom
|
|
|
|
@ -198,7 +238,7 @@ fi
|
|
|
|
|
|
|
|
|
|
value='InvSerial'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
value='InvSerial'
|
|
|
|
|
|
|
|
|
|
describe='SMA Serial No'
|
|
|
|
|
mdi_icon='mdi:card-bulleted-settings'
|
|
|
|
|
devClass=
|
|
|
|
@ -297,7 +337,7 @@ value='InvTemperature'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -333,7 +373,7 @@ value='EToday'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -351,7 +391,7 @@ value='ETotal'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -369,169 +409,7 @@ value='PACTot'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='UDC1'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array UDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel-large'
|
|
|
|
|
devClass='voltage'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='V'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='UDC2'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array2 UDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='voltage'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='V'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='IDC1'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array IDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel-large'
|
|
|
|
|
devClass='current'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='A'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='IDC2'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array2 IDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='current'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='A'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='PDC1'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array PDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel-large'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='PDC2'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array2 PDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='PDCTot'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA DC All Strings'
|
|
|
|
|
mdi_icon='mdi:solar-power-variant-outline'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='OperTm'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Total Op Time'
|
|
|
|
|
mdi_icon='mdi:clock'
|
|
|
|
|
devClass='duration'
|
|
|
|
|
stClass='total_increasing'
|
|
|
|
|
UoM='h'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat='diagnostic'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='FeedTm'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Total Feed In Time'
|
|
|
|
|
mdi_icon='mdi:clock-digital'
|
|
|
|
|
devClass='duration'
|
|
|
|
|
stClass='total_increasing'
|
|
|
|
|
UoM='h'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat='diagnostic'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -549,7 +427,7 @@ value='PAC1'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -564,11 +442,10 @@ value='PAC2'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='false'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -586,7 +463,7 @@ value='PAC3'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -604,7 +481,7 @@ value='UAC1'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -622,7 +499,7 @@ value='UAC2'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -640,7 +517,7 @@ value='UAC3'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -658,7 +535,7 @@ value='IAC1'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -676,7 +553,7 @@ value='IAC2'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -694,11 +571,235 @@ value='IAC3'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='OperTm'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Total Op Time'
|
|
|
|
|
mdi_icon='mdi:clock'
|
|
|
|
|
devClass='duration'
|
|
|
|
|
stClass='total_increasing'
|
|
|
|
|
UoM='h'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat='diagnostic'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='FeedTm'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Total Feed In Time'
|
|
|
|
|
mdi_icon='mdi:clock-digital'
|
|
|
|
|
devClass='duration'
|
|
|
|
|
stClass='total_increasing'
|
|
|
|
|
UoM='h'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat='diagnostic'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"entity_category\": \"$ent_cat\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
############## DC Power Section
|
|
|
|
|
|
|
|
|
|
value='PDCTot'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA DC All Strings'
|
|
|
|
|
mdi_icon='mdi:solar-power-variant-outline'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='PDC1'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array1 PDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel-large'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='PDC2'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array2 PDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='PDC'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array PDC Tot'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
############### DC voltage Section
|
|
|
|
|
|
|
|
|
|
value='UDC1'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array1 UDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel-large'
|
|
|
|
|
devClass='voltage'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='V'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='UDC2'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array2 UDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='voltage'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='V'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='UDC'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array UDC Tot'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='voltage'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='V'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
################# DC Current section
|
|
|
|
|
|
|
|
|
|
value='IDC1'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array1 IDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel-large'
|
|
|
|
|
devClass='current'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='A'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='IDC2'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array2 IDC'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='current'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='A'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='IDC'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Array IDC Tot'
|
|
|
|
|
mdi_icon='mdi:solar-panel'
|
|
|
|
|
devClass='current'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='A'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
########
|
|
|
|
|
|
|
|
|
|
value='GridFreq'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
@ -712,7 +813,7 @@ value='GridFreq'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -748,7 +849,7 @@ value='BatTmpVal'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -766,7 +867,7 @@ value='BatVol'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -784,7 +885,7 @@ value='BatAmp'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
@ -803,7 +904,98 @@ value='BatChaStt'
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='InvWakeupTm'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA WakeUp time'
|
|
|
|
|
mdi_icon='mdi:weather-hazy'
|
|
|
|
|
devClass= ### no class for timestamp custom
|
|
|
|
|
stClass=
|
|
|
|
|
UoM=
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
ts="$(bashio::config 'DateTimeFormat')"
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | as_timestamp | timestamp_custom( $ts ) | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='InvSleepTm'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Sleep time'
|
|
|
|
|
mdi_icon='mdi:weather-hazy'
|
|
|
|
|
devClass= ### no class for timestamp custom
|
|
|
|
|
stClass=
|
|
|
|
|
UoM=
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
ts="$(bashio::config 'DateTimeFormat')"
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | as_timestamp | timestamp_custom( $ts ) | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
value='MeteringWOut'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Power --> Grid'
|
|
|
|
|
mdi_icon='mdi:transmission-tower'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | default() }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='MeteringWIn'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Power <-- Grid'
|
|
|
|
|
mdi_icon='mdi:transmission-tower'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
value='MeteringWTot'
|
|
|
|
|
if [[ " ${array[*]} " =~ " $value " ]]; then
|
|
|
|
|
|
|
|
|
|
describe='SMA Power Net Grid'
|
|
|
|
|
mdi_icon='mdi:transmission-tower'
|
|
|
|
|
devClass='power'
|
|
|
|
|
stClass='measurement'
|
|
|
|
|
UoM='W'
|
|
|
|
|
EnabDef='true'
|
|
|
|
|
ent_cat=
|
|
|
|
|
|
|
|
|
|
bashio::log.info Setting Up "$value"
|
|
|
|
|
|
|
|
|
|
/usr/bin/mosquitto_pub -h "$MQTT_Host" -u "$MQTT_User" -P "$MQTT_Pass" -t homeassistant/sensor/sbfspot_"$PLANTNAME"/sbfspot_"$InvSerial""$value"/config -m "{\"name\": \"$describe\", \"state_topic\": \"homeassistant/sbfspot_$PLANTNAME/sbfspot_$InvSerial\", \"value_template\": \"{{ value_json.$value | float(default) }}\", \"unique_id\": \"$InvSerial"'_'"$value\", \"device_class\": \"$devClass\", \"state_class\": \"$stClass\", \"unit_of_measurement\": \"$UoM\", \"enabled_by_default\": \"$EnabDef\", \"icon\": \"$mdi_icon\", \"device\": { \"identifiers\": [\"$(bashio::addon.name)""-Sensors\"], \"name\": \"HAOS-SBFspot\", \"model\": \"$InvType\", \"manufacturer\": \"SMA\", \"sw_version\": \"$InvSwVer\" }}" "$debugMQTT" "$RoK"
|
|
|
|
|
else
|
|
|
|
|
bashio::log.yellow Skipping "${value}"
|
|
|
|
|
fi
|
|
|
|
|