Page 4 of 4

Re: Python Plugin: PiMonitor

Posted: Monday 22 July 2019 20:44
by Solderbro
Hello,

maybe this is related to raspbian buster stable. On every cold start or reboot i got a mail and found this in the log.

2019-07-22 17:41:50.351 Error: (RPI_Monitor) 'onStart' failed 'KeyError'.
2019-07-22 17:41:50.351 Error: (RPI_Monitor) ----> Line 332 in '/home/pi/domoticz/plugins/Domoticz-PiMonitor-Plugin/plugin.py'
2019-07-22 17:41:50.351 Error: (RPI_Monitor) ----> Line 154 in '/home/pi/domoticz/plugins/Domoticz-PiMonitor-Plugin/plugin.py'

These python packages are installed:
pi@domosys:~ $ dpkg -l python* | grep ii
ii python 2.7.16-1 armhf interactive high-level object-oriented language (Python2 version)
ii python-apt-common 1.8.4 all Python interface to libapt-pkg (locales)
ii python-minimal 2.7.16-1 armhf minimal subset of the Python2 language
ii python-rpi.gpio 0.7.0~buster-1 armhf Python GPIO module for Raspberry Pi
ii python-smbus:armhf 4.1-1 armhf Python bindings for Linux SMBus access through i2c-dev
ii python2 2.7.16-1 armhf interactive high-level object-oriented language (Python2 version)
ii python2-minimal 2.7.16-1 armhf minimal subset of the Python2 language
ii python2.7 2.7.16-2 armhf Interactive high-level object-oriented language (version 2.7)
ii python2.7-minimal 2.7.16-2 armhf Minimal subset of the Python language (version 2.7)
ii python3 3.7.3-1 armhf interactive high-level object-oriented language (default python3 version)
ii python3-apt 1.8.4 armhf Python 3 interface to libapt-pkg
ii python3-certifi 2018.8.24-1 all root certificates for validating SSL certs and verifying TLS hosts (python3)
ii python3-chardet 3.0.4-3 all universal character encoding detector for Python3
ii python3-debconf 1.5.71 all interact with debconf from Python 3
ii python3-dev 3.7.3-1 armhf header files and a static library for Python (default)
ii python3-distutils 3.7.3-1 all distutils package for Python 3.x
ii python3-gi 3.30.4-1 armhf Python 3 bindings for gobject-introspection libraries
ii python3-idna 2.6-1 all Python IDNA2008 (RFC 5891) handling (Python 3)
ii python3-lib2to3 3.7.3-1 all Interactive high-level object-oriented language (2to3, version 3.6)
ii python3-minimal 3.7.3-1 armhf minimal subset of the Python language (default python3 version)
ii python3-pkg-resources 40.8.0-1 all Package Discovery and Resource Access using pkg_resources
ii python3-requests 2.21.0-1 all elegant and simple HTTP library for Python3, built for human beings
ii python3-six 1.12.0-1 all Python 2 and 3 compatibility library (Python 3 interface)
ii python3-urllib3 1.24.1-1 all HTTP library with thread-safe connection pooling for Python3
ii python3.7 3.7.3-2 armhf Interactive high-level object-oriented language (version 3.7)
ii python3.7-dev 3.7.3-2 armhf Header files and a static library for Python (v3.7)
ii python3.7-minimal 3.7.3-2 armhf Minimal subset of the Python language (version 3.7)

Is it a problem that 2.7 and 3.7 is installed?

Solderbro

Re: Python Plugin: PiMonitor

Posted: Tuesday 23 July 2019 21:53
by Xorfor
@Solderbro

The

Code: Select all

onStart' failed 'KeyError'.
has nothing to do with the raspbian buster or Python versions. In the past I had the same problem, and is related to the name of the images. Probably this name gives a problem in Domoticz. It gives only an error at startup, but your devices will work.
Are you using the latest version of PiMonitor?

Re: Python Plugin: PiMonitor

Posted: Thursday 25 July 2019 21:26
by Solderbro
Yes after the error everything else look fine. Using the version from 19. of july what seems to be the lastest one.

Thanks
Solderbro

Re: Python Plugin: PiMonitor

Posted: Wednesday 14 August 2019 15:58
by elpaul
Hi everybody
I have the same problem:
2019-07-22 17:41:50.351 Error: (RPI_Monitor) 'onStart' failed 'KeyError'.
2019-07-22 17:41:50.351 Error: (RPI_Monitor) ----> Line 332 in '/home/pi/domoticz/plugins/Domoticz-PiMonitor-Plugin/plugin.py'
2019-07-22 17:41:50.351 Error: (RPI_Monitor) ----> Line 154 in '/home/pi/domoticz/plugins/Domoticz-PiMonitor-Plugin/plugin.py'
Domoticz V4.10717
Raspian Buster
Python 3.7.3

Re: Python Plugin: PiMonitor

Posted: Wednesday 14 August 2019 21:41
by Xorfor
This

Code: Select all

onStart' failed 'KeyError'
is only at startup of the plugin. It has to do with loading the images. I didn't find a reason why Domoticz gives this message and I can not reproduce this on my RPi. But you will see that you only gets this message once and that the plugin works fine.

Re: Python Plugin: PiMonitor

Posted: Wednesday 06 November 2019 17:47
by andreidanadrian
elpaul wrote: Wednesday 14 August 2019 15:58 Hi everybody
I have the same problem:
2019-07-22 17:41:50.351 Error: (RPI_Monitor) 'onStart' failed 'KeyError'.
2019-07-22 17:41:50.351 Error: (RPI_Monitor) ----> Line 332 in '/home/pi/domoticz/plugins/Domoticz-PiMonitor-Plugin/plugin.py'
2019-07-22 17:41:50.351 Error: (RPI_Monitor) ----> Line 154 in '/home/pi/domoticz/plugins/Domoticz-PiMonitor-Plugin/plugin.py'
Domoticz V4.10717
Raspian Buster
Python 3.7.3
I modify plugin.py in line 152 -164, and it run OK!

Code: Select all

   
   
    #    if "xfrpimonitor" not in Images:
    #        Domoticz.Image("xfrpimonitor.zip").Create()
    #    image = Images["xfrpimonitor"].ID
    #    Domoticz.Debug("Image created. ID: "+str(image))
        # Create devices
        if len(Devices) == 0:
            for unit in self.__UNITS:
                Domoticz.Device(Unit=unit[0],
                                Name=unit[1],
                                Type=unit[2],
                                Subtype=unit[3],
                                Options=unit[4],
                                Used=unit[5]).Create()

Re: Python Plugin: PiMonitor

Posted: Saturday 07 December 2019 17:58
by MeAlbert
I installed it without problems on a PiZero where my Domoticz is running on presently.
What I find strange is that I see 17 tiles in the Utility screen but only 7 devices in the setup-device screen.

Furthermore I see (after a wile) this error message

Code: Select all

2019-12-08 15:53:33.302 Error: Pi hardware (12) thread seems to have ended unexpectedly
How come?

Re: Python Plugin: PiMonitor

Posted: Friday 10 January 2020 10:41
by fabd
Hello

Could we imagine adding a switch to monitor latency to the router (for example) ?

Re: Python Plugin: PiMonitor

Posted: Monday 13 January 2020 21:04
by Xorfor
Added device to monitor latency. The plugin will try to find the gateway, will send a ping to the gateway and retrieves the latency time.

Re: Python Plugin: PiMonitor

Posted: Thursday 23 January 2020 15:08
by karlzre
Hi,

I've installed domoticz-remote-Pi-Monitor on my pi and the plugin on my domoticz server.

In domoticz i've put the ip of the other pi and in the remote pi, i've put the ip of my domoticz server.

Then i get this message:
15:06:35.513 Error: (PiReMonitor) 'onHeartbeat' failed 'ConnectionRefusedError'.
2020-01-23 15:06:35.513 Error: (PiReMonitor) ----> Line 295 in '/home/pi/domoticz/plugins/domoticz-remote-Pi-Monitor/plugin.py', function onHeartbeat
2020-01-23 15:06:35.513 Error: (PiReMonitor) ----> Line 154 in '/home/pi/domoticz/plugins/domoticz-remote-Pi-Monitor/plugin.py', function onHeartbeat
Any idea what's wrong ?

Re: Python Plugin: PiMonitor

Posted: Tuesday 05 May 2020 12:32
by nosehook
Ik recently got these errors in my log:

Code: Select all

2020-05-05 12:29:27.907 Error: (PiMonitor) 'onHeartbeat' failed 'TypeError':''NoneType' object is not subscriptable'.
2020-05-05 12:29:27.907 Error: (PiMonitor) ----> Line 382 in '/home/pi/domoticz/plugins/xfr-pimonitor/plugin.py', function onHeartbeat
2020-05-05 12:29:27.907 Error: (PiMonitor) ----> Line 304 in '/home/pi/domoticz/plugins/xfr-pimonitor/plugin.py', function onHeartbeat
No clue how to solve it though, can anyone give me some pointers?

Re: Python Plugin: PiMonitor

Posted: Saturday 09 May 2020 13:17
by Geitje
Did you update to the most recent version of Pimonitor?

Re: Python Plugin: PiMonitor

Posted: Tuesday 19 January 2021 10:57
by Chris12
Hi, it looks like that this plugin is no longer maintained.. too bad :-(
https://github.com/Xorfor/Domoticz-PiMonitor-Plugin

But I found an other one based on the above plugin, which even does exactly what I want: monitoring of a remote Rpi (which runs Pi-Hole)
https://github.com/JVaassen/domoticz-remote-Pi-Monitor

But as I'm a kind of noob regarding Rpi and the installation of packages, I'm kind of stuck how to install this plugin.
How do I do these steps:
1.Install the python script in /usr/bin on remote server.
2.Install piremotemonitor in /etc/init.d on remote server.


The domoticz part I get ( i hope so) for installing on my Synology I have to do:
#cd /volume1/@appstore/domoticz/var/plugins
#sudo git clone https://github.com/JVaassen/domoticz-re ... onitor.git
restart domoticz via synology webGUI

Or do I first have to install the PiMonitor itself as well?

Anybody here who can help me a little bit?

Re: Python Plugin: PiMonitor

Posted: Thursday 21 January 2021 13:24
by Chris12
I have installed the PiRemoteMonitor according to the steps described.

But after restarting domoticz I see an error:

2021-01-21 12:11:34.295 Status: (PiRemoteMonitor) Started.
2021-01-21 12:11:34.390 Error: (jva_pimonitor) failed to load 'plugin.py', Python Path used was '/usr/local/domoticz/var/plugins/domoticz-remote-Pi-Monitor/:/var/packages/py3k/target/usr/local/lib/python38.zip:/var/packages/py3k/target/usr/local/lib/python3.8:/var/packages/py3k/target/usr/local/lib/python3.8/lib-dynload:/var/packages/py3k/target/usr/local/lib/python3.8/site-packages'.
2021-01-21 12:11:34.391 Error: (PiRemoteMonitor) Module Import failed, exception: 'ModuleNotFoundError'
2021-01-21 12:11:34.391 Error: (PiRemoteMonitor) Module Import failed: ' Name: lxml'
2021-01-21 12:11:34.391 Error: (PiRemoteMonitor) Error Line details not available.


The log file /var/log/PiRemoteMonitor.log (found on the Pi remote server) does not show any error.
Show somehow the lxml module is not working on my synology.

On my synology when running:
# python3 -m pip install python3-lxml
ERROR: Could not find a version that satisfies the requirement python3-lxml
ERROR: No matching distribution found for python3-lxml


On my synology the follwoing does not work:
sudo apt-get install python3-lxml

Not have found a sollution for this yet.