lumapu / ahoy

Various tools, examples, and documentation for communicating with Hoymiles microinverters
https://ahoydtu.de
Other
947 stars 222 forks source link

Feature Request: Topics FW* HW* are sent via MQTT only once after reboot v0.6.0 and below #824

Open rmayergfx opened 1 year ago

rmayergfx commented 1 year ago

Found that MQTT sends the information about FW HW in ch0 only once after reboot the device. This can be checked very easy.

Start MQTT Explorer. Wait a few minutes. ch0 will show 12 to 13 topics. Disconnect and Reconnect MQTT Explorer. Now reboot AhoyDTU from the webinterface or by poweroff and on again, webinterface is faster and easier. Take a look at ch0, after a few seconds there are 19 topics. Open this topic, now you can see all related Firmware and the HWPartId fields.

Disconnect and reconnect MQTT Explorer again.

Wait about 5 minutes to be sure not to miss any data. Ch0 shows only 12 or 13 topics, still no information about Firmware, Hardware.

As soon as you reboot AhoyDTU again you can see the Hardware information will be available in MQTT just a few seconds after the status from the inverter is changing to "Inverter #0: .... is available and is producing" This status change from "Inverter #0: ... is available but no data was received until now" to "Inverter #0: .... is available and is producing" only sends one time the information.

Can you plz. send this information more often, so it is possible to get this information recognized by HA?

rejoe2 commented 1 year ago

My 2ct: It is absolutely unnecessary to repeat static values at all. If one really needs these, reboot the DTU or have a look at the respective json.

MQTT is meant to be lightweight!

rmayergfx commented 1 year ago

But with this setup the HA instance will never read this information! You have to setup this manually in your mqtt.yaml

rejoe2 commented 1 year ago

Anyhow: For what reason is that kind of static info important at all? No one cares despite for debugging (and perhaps firmware development)...

lumapu commented 1 year ago

maybe we can think of retaining these messages if not done already

rmayergfx commented 1 year ago

can you place this information on the System area in webview? A new subtitel "Inverter" in blue like Radio would be great and nice.

rejoe2 commented 1 year ago

maybe we can think of retaining these messages if not done already

Not sure about that. Pls keep in mind that esp. mosquitto (with default settings) only provides a limited number of topics to be kept as retained and will not store them for the next restart. So problem would only partly solved for most users.

Additional remark: at least packing that kind of info in a different way (date as date instead of split up in atomics, or perhaps json packed) would be a good idea imo..

stefan123t commented 9 months ago

Adding a JSON topic to MQTT with the HW and FW information should reduce the number of topics required for this. @rejoe2 would it be an option to send this once when the Ahoy DTU is restarted and add a button to update the MQTT topic from the AhoyDTU ? That way we do not need to retain the topic on mosquitto / any other IoT broker.

rejoe2 commented 9 months ago

Adding a JSON topic to MQTT with the HW and FW information should reduce the number of topics required for this. @rejoe2 would it be an option to send this once when the Ahoy DTU is restarted and add a button to update the MQTT topic from the AhoyDTU ? That way we do not need to retain the topic on mosquitto / any other IoT broker.

Imo, sending that kind of info just once would be fine, I can't even see any (real) added value in any button-press option - that's just info that's never changed, so why dedicate more code to that than absolutely necessary?

(OT: Imo that's similar to the irridation thing. Much effort on the wrong side of (future) JSON-blob-Analysis. Just my 2ct...)

Additionally: This info now since long is easily visible in WebUI. So no need to send that via MQTT at all...