Hi all,
I’m trying to implement MQTT support in my API for monitoring my solar array. I’ve been following this article / section and from what I understand, I’m doing exactly as it says.
First of all, my app submits a message onto the topic:
homeassistant/sensor/iconica_solar_pv_input_current_for_batteries/config
with the following payload:
{
"device_class": "number",
"name": "PV Input Current For Battery",
"state_topic": "homeassistant/sensor/iconica_solar/state",
"unit_of_measurement": "current",
"value_template": "{{ value_json.pvInputCurrentForBattery }}",
"unique_id": "pvinputcurrentforbatteries",
"device": {
"identifiers": [
"pvInputCurrent"
],
"name": "IconicaSolar"
}
}
Then it submits a full payload to the homeassistant/sensor/iconica_solar/state
topic:
{
"pvInputVoltage": 53.1,
"pvInputCurrentForBattery": 2,
"pvTotalChargingPower": 69,
"batteryVoltage": 24.7,
"batteryChargingCurrent": 0,
"batteryDischargeCurrent": 5,
"batteryCapacity": 72,
"acOutputVoltage": 240.1,
"acOutputFrequency": 49.98,
"acOutputPower": 181,
"acOutputApparentPower": 240
}
I can see when listening for messages within Home Assistant that they are coming through, however when I try and view the “Devices” or “Entities” tab, I still can’t find anything related to my sensor.
Can anyone point me in the right direction please?
I’m using a self hosted version of an MQTT broker called Mosquitto (as suggested in the docs).
Thanks,
Owen