Python Plugin: PiMonitor
Moderator: leecollings
Python Plugin: PiMonitor
A small plugin available for the Raspberry Pi:
https://github.com/Xorfor/Domoticz-PiMonitor-Plugin
To monitor CPU speed, usage, temperature, etc.
https://github.com/Xorfor/Domoticz-PiMonitor-Plugin
To monitor CPU speed, usage, temperature, etc.
Re: Python Plugin: PiMonitor
Added extra devices, like memory, up time, number of network connections, etc.
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Python Plugin: PiMonitor
just a question.....
what's the difference between this plugin and the Motherboard sensors hardware?
what's the difference between this plugin and the Motherboard sensors hardware?
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
Re: Python Plugin: PiMonitor
I wrote this plugin to monitor the RPi on which I develop other plugins. I want to see eg. the cpu speed, number of connections, which is not possible with the Motherboard sensors hardware. So, this plugin shows some more information.
That is also the reason that I wrote the Disc usage plugin (https://github.com/Xorfor/Domoticz-Disc-usage-Plugin). The standard Motherboard sensors only displays some directories. With the Disc usage plugin, I am able to also monitor mounted disks.
A disadvantage of this plugin, that it works on a RPi and probably also other Linux devices (not tested). Not on Windows!That is also the reason that I wrote the Disc usage plugin (https://github.com/Xorfor/Domoticz-Disc-usage-Plugin). The standard Motherboard sensors only displays some directories. With the Disc usage plugin, I am able to also monitor mounted disks.
- Siewert308SW
- Posts: 288
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Python Plugin: PiMonitor
Besides that, Hardware monitor Memory Usage looks at the amount Domoticz uses or the calculation is different.
While the plugin looks for the total amount of memory used.
While the plugin looks for the total amount of memory used.
Setup:
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
- RPi4 - Domo Stable / Aeotec Z-stick7 / PiHole Unbound Gemini
- RPi4 - PiHole / PiVPN Unbound Gemini
- Synology DS923+ / DS218j
- P1 Gas/Power, SmartGateway watermeter
- Fibaro switches, contacts, plugs, smoke/Co2 ect
- rootfs @ USB HDD
-
- Posts: 20
- Joined: Sunday 22 October 2017 19:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: PiMonitor
Hi<
following LOG errors:
2018-01-27 18:11:48.970 Error: (PiMonitor) 'onStart' failed 'KeyError'.
2018-01-27 18:11:48.970 Error: (PiMonitor) ----> Line 162 in /home/pi/domoticz/plugins/PiMonitor/plugin.py, function onStart
2018-01-27 18:11:48.970 Error: (PiMonitor) ----> Line 56 in /home/pi/domoticz/plugins/PiMonitor/plugin.py, function onStart
What could be wrong with?
Thanks!
following LOG errors:
2018-01-27 18:11:48.970 Error: (PiMonitor) 'onStart' failed 'KeyError'.
2018-01-27 18:11:48.970 Error: (PiMonitor) ----> Line 162 in /home/pi/domoticz/plugins/PiMonitor/plugin.py, function onStart
2018-01-27 18:11:48.970 Error: (PiMonitor) ----> Line 56 in /home/pi/domoticz/plugins/PiMonitor/plugin.py, function onStart
What could be wrong with?
Thanks!
Re: Python Plugin: PiMonitor
@Velly,
Did you also placed the xfr_pimonitor.zip in the plugin directory? This contains the images of the plugin, and it seems that the plugin has problems to get these images.
Did you also placed the xfr_pimonitor.zip in the plugin directory? This contains the images of the plugin, and it seems that the plugin has problems to get these images.
-
- Posts: 20
- Joined: Sunday 22 October 2017 19:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: PiMonitor
yes, pictures are fine
- htilburgs
- Posts: 464
- Joined: Tuesday 03 November 2015 11:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Python Plugin: PiMonitor
I was wondering if it is possible to monitor a 'remote' pi?
In mine situation I've 2 Raspberrys.
What I like to do is monitor the other (RPi2B) also with the PiMonitor Plugin. Is this possible?
In mine situation I've 2 Raspberrys.
- RPi 2B (DHCP, DNS, VPN, MQTT, HomeBridge)
- RPi 3 (Domoticz)
What I like to do is monitor the other (RPi2B) also with the PiMonitor Plugin. Is this possible?
Hardware:
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
RPi3 - Aeon Labs Z-Stick GEN5 - Fibaro Dimmer 2 - Fibaro Roller Shutter 2 - Fibaro Smoke Sensor - Yeelight RGBW Led bulb - Yeelight Smart LED Light Strip - Neo Coolcam PIR Motion Sensor - Neo Coolcam PowerPlug - Nest Thermostat v3
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Python Plugin: PiMonitor
thanks for clarify....
It looks a good script! (like I am a linux guru!! )
I'm testing it
It looks a good script! (like I am a linux guru!! )
I'm testing it
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
- Posts: 3
- Joined: Wednesday 31 January 2018 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8914
- Location: UK
- Contact:
Re: Python Plugin: PiMonitor
Hello,
Thanks for developing this script, i am trying to use and have the basic setup installed, ie i can create the hardware and the devices are created as well however in the log i'm seeing the below messages. Can you advise if i'm missing something.
2018-01-31 20:50:32.568 (RasPi_Info) Calling message handler 'onHeartbeat'.
2018-01-31 20:50:32.569 (RasPi_Info) onHeartbeat called
2018-01-31 20:50:32.569 (RasPi_Info) CPU count...: 1
2018-01-31 20:50:32.605 (RasPi_Info) CPU temp....: 37.4 °C
2018-01-31 20:50:32.605 Error: (CDevice_update) RasPi_Info - CPU temperature: Failed to parse parameters: 'nValue', 'sValue', 'SignalLevel', 'BatteryLevel' or 'Options' expected.
2018-01-31 20:50:32.605 Error: (RasPi_Info) 'CDevice_update' failed 'TypeError':''TimedOut' is an invalid keyword argument for this function'.
2018-01-31 20:50:32.606 (RasPi_Info) Update RasPi_Info - CPU temperature: 37 - '37.4'
2018-01-31 20:50:32.647 (RasPi_Info) GPU temp....: 36.9 °C
2018-01-31 20:50:32.648 Error: (CDevice_update) RasPi_Info - GPU temperature: Failed to parse parameters: 'nValue', 'sValue', 'SignalLevel', 'BatteryLevel' or 'Options' expected.
2018-01-31 20:50:32.648 Error: (RasPi_Info) 'CDevice_update' failed 'TypeError':''TimedOut' is an invalid keyword argument for this function'.
2018-01-31 20:50:32.648 (RasPi_Info) Update RasPi_Info - GPU temperature: 36 - '36.9'
2018-01-31 20:50:32.684 (RasPi_Info) GPU memory..: 64.0 Mb
2018-01-31 20:50:32.684 Error: (RasPi_Info) 'onHeartbeat' failed 'AttributeError':''Domoticz.Device' object has no attribute 'TimedOut''.
2018-01-31 20:50:32.685 Error: (RasPi_Info) ----> Line 190 in /home/pi/domoticz/plugins/pimonitor/plugin.py, function onHeartbeat
2018-01-31 20:50:32.685 Error: (RasPi_Info) ----> Line 115 in /home/pi/domoticz/plugins/pimonitor/plugin.py, function onHeartbeat
2018-01-31 20:50:32.685 Error: (RasPi_Info) ----> Line 216 in /home/pi/domoticz/plugins/pimonitor/plugin.py, function UpdateDevice
Thanks for developing this script, i am trying to use and have the basic setup installed, ie i can create the hardware and the devices are created as well however in the log i'm seeing the below messages. Can you advise if i'm missing something.
2018-01-31 20:50:32.568 (RasPi_Info) Calling message handler 'onHeartbeat'.
2018-01-31 20:50:32.569 (RasPi_Info) onHeartbeat called
2018-01-31 20:50:32.569 (RasPi_Info) CPU count...: 1
2018-01-31 20:50:32.605 (RasPi_Info) CPU temp....: 37.4 °C
2018-01-31 20:50:32.605 Error: (CDevice_update) RasPi_Info - CPU temperature: Failed to parse parameters: 'nValue', 'sValue', 'SignalLevel', 'BatteryLevel' or 'Options' expected.
2018-01-31 20:50:32.605 Error: (RasPi_Info) 'CDevice_update' failed 'TypeError':''TimedOut' is an invalid keyword argument for this function'.
2018-01-31 20:50:32.606 (RasPi_Info) Update RasPi_Info - CPU temperature: 37 - '37.4'
2018-01-31 20:50:32.647 (RasPi_Info) GPU temp....: 36.9 °C
2018-01-31 20:50:32.648 Error: (CDevice_update) RasPi_Info - GPU temperature: Failed to parse parameters: 'nValue', 'sValue', 'SignalLevel', 'BatteryLevel' or 'Options' expected.
2018-01-31 20:50:32.648 Error: (RasPi_Info) 'CDevice_update' failed 'TypeError':''TimedOut' is an invalid keyword argument for this function'.
2018-01-31 20:50:32.648 (RasPi_Info) Update RasPi_Info - GPU temperature: 36 - '36.9'
2018-01-31 20:50:32.684 (RasPi_Info) GPU memory..: 64.0 Mb
2018-01-31 20:50:32.684 Error: (RasPi_Info) 'onHeartbeat' failed 'AttributeError':''Domoticz.Device' object has no attribute 'TimedOut''.
2018-01-31 20:50:32.685 Error: (RasPi_Info) ----> Line 190 in /home/pi/domoticz/plugins/pimonitor/plugin.py, function onHeartbeat
2018-01-31 20:50:32.685 Error: (RasPi_Info) ----> Line 115 in /home/pi/domoticz/plugins/pimonitor/plugin.py, function onHeartbeat
2018-01-31 20:50:32.685 Error: (RasPi_Info) ----> Line 216 in /home/pi/domoticz/plugins/pimonitor/plugin.py, function UpdateDevice
Re: Python Plugin: PiMonitor
@htilburgs: No is not possible
@Al33Rob: Please use the latest Domoticz beta! Your version is too old for this (and probably other) plugin.
@Al33Rob: Please use the latest Domoticz beta! Your version is too old for this (and probably other) plugin.
-
- Posts: 3
- Joined: Wednesday 31 January 2018 21:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8914
- Location: UK
- Contact:
Re: Python Plugin: PiMonitor
@Xorfor Thanks this sorted it!
-
- Posts: 20
- Joined: Sunday 22 October 2017 19:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: PiMonitor
Hi
sometimes there is huge difference between Monit memory data and PiMonitor data:
like on screens
Any reason/solution? Thank you!
sometimes there is huge difference between Monit memory data and PiMonitor data:
like on screens
Any reason/solution? Thank you!
- Attachments
-
- memory pi monit.JPG (46.97 KiB) Viewed 13019 times
-
- pimonitor memory.JPG (105.02 KiB) Viewed 13019 times
Re: Python Plugin: PiMonitor
@Velly,
On internet you will find a lot of different ways to calculate the memory usage. The all give different values. The plugin is using an algorithm based on 'free' eg. as can be found on https://gist.github.com/funvill/5252169.
I have no idea how Monit is calculating the memory usage.
On internet you will find a lot of different ways to calculate the memory usage. The all give different values. The plugin is using an algorithm based on 'free' eg. as can be found on https://gist.github.com/funvill/5252169.
I have no idea how Monit is calculating the memory usage.
Re: Python Plugin: PiMonitor
I use both RPi-Monitor https://github.com/XavierBerger/RPi-Monitor as Monit https://mmonit.com/monit/
Both do an excellent job outside of Domoticz.
Both do an excellent job outside of Domoticz.
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: Python Plugin: PiMonitor
Velly wrote: ↑Saturday 27 January 2018 16:15 Hi<
following LOG errors:
2018-01-27 18:11:48.970 Error: (PiMonitor) 'onStart' failed 'KeyError'.
2018-01-27 18:11:48.970 Error: (PiMonitor) ----> Line 162 in /home/pi/domoticz/plugins/PiMonitor/plugin.py, function onStart
2018-01-27 18:11:48.970 Error: (PiMonitor) ----> Line 56 in /home/pi/domoticz/plugins/PiMonitor/plugin.py, function onStart
Hi Xorfor, I have the same errors as Velly. The xfr_pimonitor.zip is in the same directory as the plugin.py Do I have to unpack the xfr_pimonitor.zip? Is the name of the plugin-dicetory important?
Greetings McMelloW
Re: Python Plugin: PiMonitor
@McMelloW,
You don't need to unpack the zipfile. Last week I had another RPi with the same problem.
I found out that there was a problem updating the database. The image files were created in the www/images folder, but in Setup -> More options -> Custom Icons, the image did not appear. I don't have this problem at this moment with V3.8914!!!
I suggest:
1. to upgrade to the latest beta,
2. in Hardware, delete PiMonitor
3. Add PiMonitor again.
You don't need to unpack the zipfile. Last week I had another RPi with the same problem.
I found out that there was a problem updating the database. The image files were created in the www/images folder, but in Setup -> More options -> Custom Icons, the image did not appear. I don't have this problem at this moment with V3.8914!!!
I suggest:
1. to upgrade to the latest beta,
2. in Hardware, delete PiMonitor
3. Add PiMonitor again.
-
- Posts: 20
- Joined: Sunday 22 October 2017 19:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: PiMonitor
@xorfor
Hi
I tried:
1. to upgrade to the latest beta,
2. in Hardware, delete PiMonitor
3. Add PiMonitor again.
Result:
I get NO devices anymore (tried to reboot etc etc)
I am getting same errors in log, but this time I am unable to see new PiMonitor devices in list..
Needed to restore from IMG file - or I had no chances at all to see PiMonitor devices in my list..
actual working (with errors) setup: 3.8820 beta, pi3 Jessie, python 3.4
Hi
I tried:
1. to upgrade to the latest beta,
2. in Hardware, delete PiMonitor
3. Add PiMonitor again.
Result:
I get NO devices anymore (tried to reboot etc etc)
I am getting same errors in log, but this time I am unable to see new PiMonitor devices in list..
Needed to restore from IMG file - or I had no chances at all to see PiMonitor devices in my list..
actual working (with errors) setup: 3.8820 beta, pi3 Jessie, python 3.4
Re: Python Plugin: PiMonitor
@velly,
Hummm, my RPi is running on v3.8914. Yours seems older, not the latest beta. As far as I remember that was also the version I got this problem.
Try:
cd domoticz
./updatebeta
Then you are on the latest beta. Try the steps 2-3 again.
If still no devices available, check in Setup -> More options -> Custom icons. Do you see the pimonitor icons? If not try to upload the zip file.
If zip file succesfully uploaded, try step 2-3 again.
Hummm, my RPi is running on v3.8914. Yours seems older, not the latest beta. As far as I remember that was also the version I got this problem.
Try:
cd domoticz
./updatebeta
Then you are on the latest beta. Try the steps 2-3 again.
If still no devices available, check in Setup -> More options -> Custom icons. Do you see the pimonitor icons? If not try to upload the zip file.
If zip file succesfully uploaded, try step 2-3 again.
Who is online
Users browsing this forum: Amazon [Bot] and 1 guest