Python plugin: UPS Monitor

Python and python framework

Moderator: leecollings

blackie
Posts: 5
Joined: Tuesday 19 November 2019 14:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by blackie »

Hello,
I have installed this plugin to my RPi with Domoticz and local NUT installation.
In my home the UPS comes onbattery cca 2x per day for 1-2 seconds.
Seems the plugin is unable to detect these short power outages because plugin reads the actual UPS data every 60s.
I have an idea to use local NUT server script /usr/bin/upssched-cmd triggered after power status change to catch these short outages.
Can this python plugin be called somehow from upssched-cmd script to update Domoticz UPS sensors every time UPS status changes?

If i try to execute plugin manually from a shell i get an error:
root@OMV:/home/domoticz/plugins/NUT_UPS# python3 plugin.py
Traceback (most recent call last):
File "plugin.py", line 36, in <module>
import Domoticz
ModuleNotFoundError: No module named 'Domoticz'

Thanks in advance for help
Kyrille
Posts: 14
Joined: Sunday 19 January 2020 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.01
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by Kyrille »

Hello,

The plugin is working fine in my environment but I can't succeed in creating a notification for the Status.

When I set a condition for the value "ONBATTERY DISCHARGING" in order for Pushover to warn me about a power shutdown, nothing happen.

I noticed that when I come back to the corresponding notification, the field for Value is empty. It seems that my chain of characters was not accepted when creating it. I tried to put the text between " " but same (no) effect.

Any clue ?

Thank you in advance.Image

Envoyé de mon Pixel 4a en utilisant Tapatalk

Raspberry Pi 4 (8GB) & 3B+ (buster) / Conbee II / Z-Stick Gen 5 / RFXCOM 433 XL / Domoticz 2020.02
Pi zero 2 ordered
nico21311
Posts: 6
Joined: Thursday 20 December 2018 12:24
Target OS: Linux
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by nico21311 »

Hello

I have installed a fresh installation of Domoticz on the news debian bulleyes with python 3.9.2.

Domoticz works well. However when I installed the plugin NUT UPS or UPS monitor, Domoticz do not start.

According my investigation, the issue come form new python 3.9.2 and the script.

I am not enough skill to solved the issue.

I really appreciate if someone could help me.

Thanks in advance for your support
PieterS
Posts: 198
Joined: Wednesday 31 May 2017 16:06
Target OS: NAS (Synology & others)
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin: UPS Monitor

Post by PieterS »

For a while (maybe since running Domoticz in Docker??) I am not able to monitor my APC UPS which is connected by USB to my Synology. The error in the logfile: Error reading UPS variables: ERR ACCESS-DENIED
This is the (filtered) logfile:
Spoiler: show
2022-07-13 14:52:20.500 APC UPS: Worker thread started.
2022-07-13 14:52:20.611 APC UPS: Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2022-07-13 14:52:20.611 APC UPS: 'HardwareID':'39'
2022-07-13 14:52:20.611 APC UPS: 'HomeFolder':'/opt/domoticz/userdata/plugins/NUT_UPS/'
2022-07-13 14:52:20.611 APC UPS: 'StartupFolder':'/opt/domoticz/'
2022-07-13 14:52:20.611 APC UPS: 'UserDataFolder':'/opt/domoticz/userdata/'
2022-07-13 14:52:20.611 APC UPS: 'Database':'/opt/domoticz/userdata/domoticz.db'
2022-07-13 14:52:20.611 APC UPS: 'Language':'nl'
2022-07-13 14:52:20.611 APC UPS: 'Version':'0.2.1'
2022-07-13 14:52:20.611 APC UPS: 'Author':'logread'
2022-07-13 14:52:20.611 APC UPS: 'Name':'APC UPS'
2022-07-13 14:52:20.611 APC UPS: 'Address':'192.168.1.18'
2022-07-13 14:52:20.611 APC UPS: 'Port':'3493'
2022-07-13 14:52:20.611 APC UPS: 'Key':'NUT_UPS'
2022-07-13 14:52:20.611 APC UPS: 'Mode1':'ups'
2022-07-13 14:52:20.611 APC UPS: 'Mode6':'Debug'
2022-07-13 14:52:20.611 APC UPS: 'DomoticzVersion':'2022.1 (build 14369)'
2022-07-13 14:52:20.611 APC UPS: 'DomoticzHash':'00c5d7861'
2022-07-13 14:52:20.611 APC UPS: 'DomoticzBuildTime':'2022-06-27 10:39:10'
2022-07-13 14:52:20.611 APC UPS: Device count: 5
2022-07-13 14:52:20.611 APC UPS: Device: 1 - ID: 961, Name: 'APC UPS - UPS Status Mode', nValue: 0, sValue: 'COMMUNICATION ERROR'
2022-07-13 14:52:20.611 APC UPS: Device ID: '961'
2022-07-13 14:52:20.611 APC UPS: Device Name: 'APC UPS - UPS Status Mode'
2022-07-13 14:52:20.611 APC UPS: Device nValue: 0
2022-07-13 14:52:20.611 APC UPS: Device sValue: 'COMMUNICATION ERROR'
2022-07-13 14:52:20.611 APC UPS: Device LastLevel: 0
2022-07-13 14:52:20.612 APC UPS: Device: 2 - ID: 867, Name: 'APC UPS - UPS Charge', nValue: 0, sValue: '100'
2022-07-13 14:52:20.612 APC UPS: Device ID: '867'
2022-07-13 14:52:20.612 APC UPS: Device Name: 'APC UPS - UPS Charge'
2022-07-13 14:52:20.612 APC UPS: Device nValue: 0
2022-07-13 14:52:20.612 APC UPS: Device sValue: '100'
2022-07-13 14:52:20.612 APC UPS: Device LastLevel: 0
2022-07-13 14:52:20.612 APC UPS: Device: 3 - ID: 868, Name: 'APC UPS - UPS Backup Time', nValue: 0, sValue: '2670'
2022-07-13 14:52:20.612 APC UPS: Device ID: '868'
2022-07-13 14:52:20.612 APC UPS: Device Name: 'APC UPS - UPS Backup Time'
2022-07-13 14:52:20.612 APC UPS: Device nValue: 0
2022-07-13 14:52:20.612 APC UPS: Device sValue: '2670'
2022-07-13 14:52:20.612 APC UPS: Device LastLevel: 0
2022-07-13 14:52:20.612 APC UPS: Device: 4 - ID: 866, Name: 'APC UPS - UPS AC Input', nValue: 0, sValue: '226.0'
2022-07-13 14:52:20.612 APC UPS: Device ID: '866'
2022-07-13 14:52:20.612 APC UPS: Device Name: 'APC UPS - UPS AC Input'
2022-07-13 14:52:20.612 APC UPS: Device nValue: 0
2022-07-13 14:52:20.612 APC UPS: Device sValue: '226.0'
2022-07-13 14:52:20.612 APC UPS: Device LastLevel: 0
2022-07-13 14:52:20.612 APC UPS: Device: 5 - ID: 865, Name: 'APC UPS - UPS Load', nValue: 0, sValue: '21'
2022-07-13 14:52:20.612 APC UPS: Device ID: '865'
2022-07-13 14:52:20.612 APC UPS: Device Name: 'APC UPS - UPS Load'
2022-07-13 14:52:20.612 APC UPS: Device nValue: 0
2022-07-13 14:52:20.612 APC UPS: Device sValue: '21'
2022-07-13 14:52:20.612 APC UPS: Device LastLevel: 0
2022-07-13 14:52:20.612 APC UPS: Acquiring GIL for 'onStartCallback'
2022-07-13 14:52:20.501 Status: APC UPS: Started.
2022-07-13 14:52:20.500 Status: APC UPS: Entering work loop.
2022-07-13 14:52:20.607 Status: APC UPS: Initialized version 0.2.1, author 'logread'
2022-07-13 14:52:30.034 APC UPS: Pushing 'onHeartbeatCallback' on to queue
2022-07-13 14:52:30.084 APC UPS: Processing 'onHeartbeatCallback' message
2022-07-13 14:52:30.085 APC UPS: Acquiring GIL for 'onHeartbeatCallback'
2022-07-13 14:52:30.085 APC UPS: Calling message handler 'onHeartbeat' on 'module' type object.
2022-07-13 14:52:30.100 APC UPS: Variable UPS Status = 0
2022-07-13 14:52:30.100 APC UPS: Variable UPS Charge = None
2022-07-13 14:52:30.100 APC UPS: Variable UPS Backup Time = None
2022-07-13 14:52:30.100 APC UPS: Variable UPS AC Input = None
2022-07-13 14:52:30.100 APC UPS: Variable UPS Load = None
2022-07-13 14:52:30.100 APC UPS: Variable UPS Power = None
2022-07-13 14:52:30.100 APC UPS: Variable UPS AC Frequency = None
2022-07-13 14:52:30.100 APC UPS: Acquiring GIL for 'onHeartbeatCallback'
2022-07-13 14:52:30.100 Error: APC UPS: Error reading UPS variables: ERR ACCESS-DENIED
2022-07-13 14:52:40.013 APC UPS: Pushing 'onHeartbeatCallback' on to queue
2022-07-13 14:52:40.090 APC UPS: Processing 'onHeartbeatCallback' message
2022-07-13 14:52:40.090 APC UPS: Acquiring GIL for 'onHeartbeatCallback'
2022-07-13 14:52:40.090 APC UPS: Calling message handler 'onHeartbeat' on 'module' type object.
2022-07-13 14:52:40.090 APC UPS: Acquiring GIL for 'onHeartbeatCallback'
The services for UPS are up and running on my Synology and use port 3493...
In Docker I have installed the plugin as described in https://www.domoticz.com/wiki/Plugins/NUT_UPS.html
In the configuration of the container of Domoticz (V14369) I have a problem I cannot solve:

When I fill in port 3493 for the host I get an error because that port is in use by the host...

Image

This is a part of the portsettings of the container of Domoticz in Docker:

Image

So how to configure the software of Docker that port 3493 (which is used by the host) can talk to the plugin in Domoticz??
Synology with Domoticz build (V2024.7) in Docker
Matthias
Posts: 12
Joined: Wednesday 09 January 2019 23:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by Matthias »

Hi,

Thank you for this plugin.
It works perfectly.
But i have a problem with blocky.

What is the parameters i have to use for Status mode in a condition ?
I try "OL", "OB", "ONBATTERY DISCHARGING", panic, alarm...

Nothing works
Attachments
Capture.PNG
Capture.PNG (52.25 KiB) Viewed 4859 times
User avatar
madpatrick
Posts: 886
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2026.1
Location: Netherlands
Contact:

Re: Python plugin: UPS Monitor

Post by madpatrick »

On my APC UPS the status is "ONLINE"
-= HP server GEN11 =- ZwaveJS-=- Domoticz v2026.2 -=- Dashticz =-
-= Checkout https://github.com/MadPatrick for the plugins =-
Matthias
Posts: 12
Joined: Wednesday 09 January 2019 23:32
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by Matthias »

I d'ont understand why it doesn't work.

I try with everything in my blocky :
  • ONLINE CHARGING
  • ONLINE
  • OL
  • 0
  • 1
  • 2
  • 3
  • 4...
  • ON
  • OFF
  • OPEN
  • CLOSE
  • ALARM
  • PANIC...
What is the parameter to do a condition for my UPS EATON ?
Attachments
Capture1.PNG
Capture1.PNG (21.36 KiB) Viewed 4832 times
Capture2.PNG
Capture2.PNG (7.43 KiB) Viewed 4832 times
User avatar
madpatrick
Posts: 886
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2026.1
Location: Netherlands
Contact:

Re: Python plugin: UPS Monitor

Post by madpatrick »

It appears that a text input is not working in Blocky
See also:
viewtopic.php?f=62&t=28388&p=217446&hil ... ly#p217438

You can better use a Dzvents script.

I've tried a simplte test script and this is working

Code: Select all

local scriptVar     = '-=# TEST #=-'
local testswitch    =   290

return
{
    on       = {
                devices         = {testswitch,},
                },

    logging = {
                level = domoticz.LOG_ERROR,
                marker = scriptVar,
                },

    execute = function(dz, item)
local UPS_status   = dz.devices(560)

            if UPS_status.text == 'ONLINE'  then
            dz.log('APS UPS is : ' ..UPS_status.text, dz.LOG_FORCE)
        end
    end
}

I think for your example it looks like this

You need to change the ID number of your devices (290 and 300) in this script

Code: Select all

local scriptVar     = '-=# TEST #=-'
local UPS_status    =   290  -- fill in your device ID of the EATON
local Light         =   300  -- fill in your device ID of the Le Bureau

return
{
    on       = {
                devices         = {UPS_status,},
                },

    logging = {
                level = domoticz.LOG_ERROR,
                marker = scriptVar,
                },

    execute = function(dz, item)
    local UPS_status   = dz.devices(UPS_status)
    local Light   		= dz.devices(Light)
    
            if UPS_status.text == 'ONLINE CHARGING'  or UPS_status.text == 'ONBATTERY DISCHARGING'  then
            Light.switchOn().checkFirst()
            dz.log('APS UPS is : ' ..UPS_status.text, dz.LOG_FORCE)
        end
    end
}
-= HP server GEN11 =- ZwaveJS-=- Domoticz v2026.2 -=- Dashticz =-
-= Checkout https://github.com/MadPatrick for the plugins =-
tarmacalastair
Posts: 95
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Python plugin: UPS Monitor

Post by tarmacalastair »

Notifications

Well I've only just bought a UPS (Tecnoware) and installed this plugin so let's start by saying a big thanks to the author!

But, as others have reported here, I could not get notifications to work when power was lost/restored with the "NUT - UPS Status Mode" changing between ONLINE and ONBATTERY.

One of the recent comments mentioned using blockly so I started out by looking in there and I noticed (when you look at the current values of devices) that there is a column for the "State" and another for the "Value" for each device.

For my UPS the status mode shows the following:
State as "ONLINE" and Value as "1/ONLINE" when there is AC power (top line below):
Screenshot 2022-12-01 at 11-32-19 Domoticz.png
Screenshot 2022-12-01 at 11-32-19 Domoticz.png (36.54 KiB) Viewed 4749 times

or
State as "ONBATTERY" and Value as "4/ONBATTERY" when running on battery:
Screenshot 2022-12-01 at 11-39-47 Domoticz.png
Screenshot 2022-12-01 at 11-39-47 Domoticz.png (15.26 KiB) Viewed 4749 times
So, under the Domoticz "Utility" tab I went into the Notifications for the "UPS Status Mode" and tried using the numeric "Value" instead of the text status. I powered off my UPS and a minute or so later I powered it back on and both times I received a notification (Pushbullet and Telegram in my case). See screenshot and note below:
Screenshot 2022-12-01 at 11-41-32 Domoticz.png
Screenshot 2022-12-01 at 11-41-32 Domoticz.png (94.84 KiB) Viewed 4749 times
Important - Make sure you change the "Ignore Interval" to on (green) so that the status change will always send out a notification. (I forgot to show this in the above screenshot)
For testing purposes I lowered the polling interval by editing the plugin.py to 20 seconds but will now increase it back to 1 minute.
Just need to decide now whether to set this to ring the (battery) doorbell when power is lost and risk waking the household at night!

Hope this helps people like me who were struggling with notifications.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
betogar
Posts: 6
Joined: Saturday 10 December 2022 23:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by betogar »

tarmacalastair wrote: Thursday 01 December 2022 12:54 Notifications

Well I've only just bought a UPS (Tecnoware) and installed this plugin so let's start by saying a big thanks to the author!

But, as others have reported here, I could not get notifications to work when power was lost/restored with the "NUT - UPS Status Mode" changing between ONLINE and ONBATTERY.

One of the recent comments mentioned using blockly so I started out by looking in there and I noticed (when you look at the current values of devices) that there is a column for the "State" and another for the "Value" for each device.

For my UPS the status mode shows the following:
State as "ONLINE" and Value as "1/ONLINE" when there is AC power (top line below):
Screenshot 2022-12-01 at 11-32-19 Domoticz.png


or
State as "ONBATTERY" and Value as "4/ONBATTERY" when running on battery:
Screenshot 2022-12-01 at 11-39-47 Domoticz.png

So, under the Domoticz "Utility" tab I went into the Notifications for the "UPS Status Mode" and tried using the numeric "Value" instead of the text status. I powered off my UPS and a minute or so later I powered it back on and both times I received a notification (Pushbullet and Telegram in my case). See screenshot and note below:
Screenshot 2022-12-01 at 11-41-32 Domoticz.png
Important - Make sure you change the "Ignore Interval" to on (green) so that the status change will always send out a notification. (I forgot to show this in the above screenshot)
For testing purposes I lowered the polling interval by editing the plugin.py to 20 seconds but will now increase it back to 1 minute.
Just need to decide now whether to set this to ring the (battery) doorbell when power is lost and risk waking the household at night!

Hope this helps people like me who were struggling with notifications.
Sorry for the question, where can I see that?
Attachments
Screenshot 2022-12-01 at 11-32-19 Domoticz.png
Screenshot 2022-12-01 at 11-32-19 Domoticz.png (36.54 KiB) Viewed 4724 times
tarmacalastair
Posts: 95
Joined: Wednesday 30 October 2019 14:11
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Great Britain
Contact:

Re: Python plugin: UPS Monitor

Post by tarmacalastair »

You get to it by clicking on Setup, More Options, Events. This takes you to the automation scripts page where you can see device statuses.

You can also get there with http or https://ipaddress:8080/#/Events (substitute your IP address and change the port if you don't use 8080).
Good luck. I found the device statuses by accident. I'd seen them before but completely forgotten.
Running Domoticz and Dashticz beta on Raspberry Pi OS 32 bit - has anyone had success with 64 bit?

Desktop access from Ubuntu Linux
betogar
Posts: 6
Joined: Saturday 10 December 2022 23:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by betogar »

tarmacalastair wrote: Sunday 11 December 2022 0:37 You get to it by clicking on Setup, More Options, Events. This takes you to the automation scripts page where you can see device statuses.

You can also get there with http or https://ipaddress:8080/#/Events (substitute your IP address and change the port if you don't use 8080).
Good luck. I found the device statuses by accident. I'd seen them before but completely forgotten.

oh i see, thanxs ;)
ssk17051980
Posts: 112
Joined: Thursday 08 December 2022 22:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: ROMANIA
Contact:

Re: Python plugin: UPS Monitor

Post by ssk17051980 »

Hi,

so, this plugin is working whit any UPS ?
i see that the plugin is for EATON, but another forum member use this for a UPS Tecnoware.
can i use any USB cable to monitor the UPS ?

thx
Attachments
AJ7W_1_201910101336456077.jpg
AJ7W_1_201910101336456077.jpg (54.76 KiB) Viewed 4654 times
barkerg
Posts: 2
Joined: Thursday 27 February 2025 0:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by barkerg »

The plugin works well using simple notifications sent out on Pushover, however I'm trying to write a Blocky script to report the UPS Backup Time whenever the UPS status mode is offline. When constructing an if statement, only the Backup Time device shows up when clicking Devices>Utility and not Status Mode. Both these devices as well as the UPS Charge device show up when I click the current states icon. Is this a bug or am I doing something wrong? I am using Domoticz 2024/7 on a Raspberry Pi 4B. The UPS is a Cyberpower 1500AVR.
User avatar
waltervl
Posts: 7020
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: Python plugin: UPS Monitor

Post by waltervl »

That UPS status device is probably a selector switch and can be found under light/switches.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
barkerg
Posts: 2
Joined: Thursday 27 February 2025 0:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by barkerg »

Thanks for the quick reply. Nothing was found under switches but ironically it was under Zwave Alarms even though it is not a Zwave device. Sorry for the tunnel vision.
manuloup
Posts: 51
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS monitoring

Post by manuloup »

Hi,

I have errors with this plugin :
2026-03-17 19:11:11.841 Error: Onduleur baie: (NUT_UPS) failed to load 'plugin.py'.
2026-03-17 19:11:12.389 Error: Onduleur baie: Traceback (most recent call last):
2026-03-17 19:11:12.390 Error: Onduleur baie: File "/home/pi/domoticz/plugins/NUT_UPS/plugin.py", line 37, in <module>
2026-03-17 19:11:12.390 Error: Onduleur baie: import telnetlib
2026-03-17 19:11:12.390 Error: Onduleur baie: ModuleNotFoundError: No module named 'telnetlib'
It seems the telnetlib is deprecated.

https://docs.python.org/3/library/telnetlib.html

I run domoticz on trixie (debian 13)
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
User avatar
madpatrick
Posts: 886
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2026.1
Location: Netherlands
Contact:

Re: Python plugin: UPS monitoring

Post by madpatrick »

Can you try

edit plugin.py

# Replace: import telnetlib

Code: Select all

import telnetlib3 as telnetlib
Install telnetlib3

Code: Select all

pip3 install telnetlib3
Or use this adjusted plugin.py
Rename by removing .txt and place in the plugin directory
plugin.py.txt
(13.79 KiB) Downloaded 195 times
-= HP server GEN11 =- ZwaveJS-=- Domoticz v2026.2 -=- Dashticz =-
-= Checkout https://github.com/MadPatrick for the plugins =-
manuloup
Posts: 51
Joined: Sunday 23 November 2014 16:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS monitoring

Post by manuloup »

I can not install telnetlib3 :

Code: Select all

root@domoticzvm:/home/pi/domoticz/plugins/NUT_UPS# pip3 install telnetlib3
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.13/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Code: Select all

root@domoticzvm:/home/pi/domoticz/plugins/NUT_UPS# apt install python3-telnetlib
Erreur : Impossible de trouver le paquet python3-telnetlib
root@domoticzvm:/home/pi/domoticz/plugins/NUT_UPS# apt install python3-telnetlib3
Erreur : Impossible de trouver le paquet python3-telnetlib3
root@domoticzvm:/home/pi/domoticz/plugins/NUT_UPS# cat plugin.py |grep telnet
import telnetlib3 as telnetlib
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
User avatar
madpatrick
Posts: 886
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2026.1
Location: Netherlands
Contact:

Re: Python plugin: UPS monitoring

Post by madpatrick »

Code: Select all

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
Try google. This is solvable

pip install telnetlib3 --break-system-packages




have you tried the new script i've posted ?


-
-= HP server GEN11 =- ZwaveJS-=- Domoticz v2026.2 -=- Dashticz =-
-= Checkout https://github.com/MadPatrick for the plugins =-
Post Reply