hjelev / rpi-mqtt-monitor

Raspberry Pi MQTT Monitor gathers system information and sends it to a MQTT server.
GNU General Public License v3.0
176 stars 42 forks source link

Issue with update & git changes #69

Closed CFenner closed 5 months ago

CFenner commented 8 months ago

When there are changes in the local git and the code cannot be updated, the update script now succeeds.

Bildschirmfoto 2024-02-02 um 08 54 35
hjelev commented 8 months ago

i know that if there are changes in the repo the update won't work. I can fix this by stashing all changes but this might not be perfect for somebody, else if you only update your config.py your repo is in updatable state.

hjelev commented 8 months ago

I think the update works fine now. my devices updated all fine. How was on your end?

CFenner commented 8 months ago

No, not really. Looks like my config is not really handled correctly. I enable update sensor and uptime seconds but nothing is showing up. Really weird.

CFenner commented 8 months ago

For some reason the fan topic is reported as False

Bildschirmfoto 2024-02-05 um 22 49 59

Shouldn't this be 0 or not be there at all?

hjelev commented 7 months ago

The issue with the git and update should be resolved now, but you need to reinstall as there are changes to the service file + one additional git command during installation to allow root to read the repository. You are right in your last comment that I am sending disabled values, will dig into this now

CFenner commented 7 months ago

What is the best way to uninstall and make sure there is no process running anymore? When I did changes in the past to the script and ran it more often, I had the feeling the old script was running somewhere in the background.

CFenner commented 7 months ago

Just ran --update again and got this message.

Bildschirmfoto 2024-02-11 um 18 34 32

But when running --display it's saying

Bildschirmfoto 2024-02-11 um 18 34 21

Where does this come from?

CFenner commented 7 months ago

Ok, I was not on master branch.

Bildschirmfoto 2024-02-11 um 18 38 30

I still have the feeling not all messages are coming through. Still no update sensor. Maybe my change https://github.com/hjelev/rpi-mqtt-monitor/pull/54 was not a good idea..

CFenner commented 7 months ago

I now tried to use service instead of cron job. Let's see if that works better.

The 0.6.2 seems to come from here: https://github.com/hjelev/rpi-mqtt-monitor/blob/bc7ba4ec1c71e9f85afa1660e12e18b75f3706c3/src/config.py.example#L4

CFenner commented 7 months ago

Interesting, I reduced the update_check_intervall to 60 and now I get only the update sensor and binary sensor for updates available. Could it be that the scripts are blocking each other?!

Edit: I also activated message grouping.

hjelev commented 7 months ago

if you want to use the update and new buttons you need to run the script as a service. To uninstall:

The version in the config.py.example is 0.6.2 I am not updateing it every time but when the script is installed or updated its automatically updated. If you reinstall now as service and delete your cron entry all should be fine. I'll leave this open since it looks you still have update problems

CFenner commented 7 months ago

I removed the folder and service and now it seems to work.