MichelFR / MqDockerUp

Mqtt Docker Updater (MqDockerUp) is a tool for updating Docker containers. It provides an easy way to check for updates and publish changes to a MQTT broker.
Apache License 2.0
60 stars 8 forks source link

MQTT Messages reduction #160

Open avenger11 opened 11 months ago

avenger11 commented 11 months ago

Really really nice tool !! thanks !!

This is only for improvement but is there a way to not send mqtt message if nothing have changed ? See below, the big blue bar this is after having installed MqDockerUp

image

Jejebond commented 11 months ago

This probably explain the constant heavy CPU usage of my container.

MichelFR commented 11 months ago

Thanks for bringing this to my attention. Im gonne see if i can improve this issue.

The reason why its sending messages even if there is no change is to know that MqDockerUp is still up and running.

Im gonna see if i can resolve this somehow.

avenger11 commented 11 months ago

I'm no expert but I think you will have to setup the LWT message. (Last Will and testament) This is the message that let home assistant know that your system is alive and responding.

MichelFR commented 11 months ago

I'm no expert but I think you will have to setup the LWT message. (Last Will and testament) This is the message that let home assistant know that your system is alive and responding.

Yeah thats the way to go. I already implemented it but the nodejs script is not getting SIGTERM signal correctly inside the docker container. (https://github.com/MichelFR/MqDockerUp/blob/44b95396bb12522942a2c753c47b3f981243538b/src/index.ts#L149C1-L149C1) Ill look into that

jorgen-k commented 6 months ago

Any news?

mdisabato commented 4 months ago

I can confirm this. On a Raspberry Pi 4b, CPU utilization jumps from 9% to 59% as soon as I start the MqDockerUp container. It drops back when the container is stopped. I see an increase in Ethernet traffic (wired device), but not near that much.

Thank you.