Yes, indeed!
But since my last question in this thread I changed my hardware. Went over to a ESP8266 and ESPeasy. Because it is a bit difficult to store a Raspberry in that area. Maybe on a later moment. Thanks for now.
Moderator: leecollings
Yes, indeed!
Anyone to help-me ?(ModbusREAD) failed to load 'plugin.py', Python Path used was '/home/pi4/domoticz/plugins/modbus-read/:/usr/lib/python39.zip:/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/local/lib/python3.9/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.9/dist-packages'.
2023-12-14 16:34:04.186 Error: Conso_saison: Traceback (most recent call last):
2023-12-14 16:34:04.186 Error: Conso_saison: File "/home/pi4/domoticz/plugins/modbus-read/plugin.py", line 177, in <module>
2023-12-14 16:34:04.186 Error: Conso_saison: from pymodbus.client.sync import ModbusSerialClient # RTU
2023-12-14 16:34:04.186 Error: Conso_saison: ModuleNotFoundError: No module named 'pymodbus.client.sync'
USER STATISTICS DomoticX
Tried your suggestion. At first I got another error, but after also replacing 'pymodbus.client.sync' in the TCP part bij 'pymodbus.client.tcp' at least I got an device. Still got an error like this:by FlyingDomotic » Friday 08 March 2024 0:36
It seems that pymodbus changed.
Instead of pymodbus.client.sync, try pymodbus.client.serial in the plugin.
Code: Select all
2024-03-20 15:45:27.099 Error: Modbus RTU read: Modbus error decoding or received no data (RTU/ASCII/RTU over TCP)!, check your settings!
2024-03-20 15:45:27.105 Error: Modbus RTU read: Modbus error decoding or received no data!, check your settings!
See aboveFlyingDomotic wrote: ↑Thursday 07 March 2024 23:36 It seems that pymodbus changed.
Instead of pymodbus.client.sync, try pymodbus.client.serial in the plugin.
Code: Select all
pi@raspberrypi4BSEM:~ $ sudo dmesg | grep -i usb
[ 0.139822] usbcore: registered new interface driver usbfs
[ 0.139881] usbcore: registered new interface driver hub
[ 0.139949] usbcore: registered new device driver usb
[ 0.140329] usb_phy_generic phy: supply vcc not found, using dummy regulator
[ 0.140559] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[ 1.508199] usbcore: registered new interface driver r8152
[ 1.508274] usbcore: registered new interface driver lan78xx
[ 1.508360] usbcore: registered new interface driver smsc95xx
[ 1.556002] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[ 1.557814] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[ 1.557836] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[ 1.558214] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.01
[ 1.558235] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.558249] usb usb1: Product: xHCI Host Controller
[ 1.558263] usb usb1: Manufacturer: Linux 6.1.21-v8+ xhci-hcd
[ 1.558275] usb usb1: SerialNumber: 0000:01:00.0
[ 1.559105] hub 1-0:1.0: USB hub found
[ 1.560148] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 6.01
[ 1.560171] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.560186] usb usb2: Product: xHCI Host Controller
[ 1.560200] usb usb2: Manufacturer: Linux 6.1.21-v8+ xhci-hcd
[ 1.560213] usb usb2: SerialNumber: 0000:01:00.0
[ 1.560898] hub 2-0:1.0: USB hub found
[ 1.563807] usbcore: registered new interface driver uas
[ 1.563925] usbcore: registered new interface driver usb-storage
[ 1.575796] usbcore: registered new interface driver usbhid
[ 1.575810] usbhid: USB HID core driver
[ 1.814947] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[ 1.965513] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.21
[ 1.965551] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 1.965566] usb 1-1: Product: USB2.0 Hub
[ 1.967415] hub 1-1:1.0: USB hub found
[ 2.262902] usb 1-1.4: new full-speed USB device number 3 using xhci_hcd
[ 2.369316] usb 1-1.4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.63
[ 2.369346] usb 1-1.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 2.369362] usb 1-1.4: Product: USB2.0-Serial
[ 6.153943] usbcore: registered new interface driver brcmfmac
[ 6.522257] usbcore: registered new interface driver usbserial_generic
[ 6.522367] usbserial: USB Serial support registered for generic
[ 6.608848] usbcore: registered new interface driver ch341
[ 6.608949] usbserial: USB Serial support registered for ch341-uart
[ 6.636039] usb 1-1.4: ch341-uart converter now attached to ttyUSB0
Yes, but it didn't solve all. https://www.domoticz.com/forum/viewtopi ... 20#p315320waltervl wrote: ↑Thursday 07 March 2024 15:07USER STATISTICS DomoticX
Joined:Sunday 07 January 2018 21:19
Last active:Sunday 30 August 2020 21:26
So do not expect a solution from him/her....
Did you check the wiki on this error? https://www.domoticz.com/wiki/Using_Pyt ... ules_Fails
On second thought, that doesn't seem to be the way to go. I think that will get in the way of every further update. But I don't have another solution yet. Unfortunately, my pyranometer has to keep running on an old Pi 3B+ with version 2021.1 on it. My Enphase inverters unfortunately no longer work on it due to an (unrequested) security update from Enphase.
I have looked at your version, but I can't figure out how to adapt it for more general use. So not only specifically for your meter, but also for my pyranometer that measures the global radiation of the sun.simat wrote: ↑Tuesday 14 May 2024 9:43 My version is still working fine on 2024.4
https://github.com/simat-git/SDM120-Modbus
Easy to adapt to any modbus meter if you know the register numbers.
Super!!!! I will be testing this tomorrow.Rosomak wrote: ↑Friday 20 September 2024 17:49 Hi All,
I rewrote the script of the Read plugin and it reads the modbus RTU and modbus TCP/IP registers correctly.
I have no way to check modbus RTU over IP.
Just replace the plugin.py file in the location .../domoticz/plugins/modbus-read and restart Domoticz
I will work on the plugin for writing next week.
Dependences needed:
pip3 install -U pymodbus pymodbusTCP
pip install pyserial
P.S. I'm not able to attach file here so I left it on https://easyupload.io/fj9psi
I am getting this Error:Rosomak wrote: ↑Friday 20 September 2024 17:49 Hi All,
I rewrote the script of the Read plugin and it reads the modbus RTU and modbus TCP/IP registers correctly.
I have no way to check modbus RTU over IP.
Just replace the plugin.py file in the location .../domoticz/plugins/modbus-read and restart Domoticz
I will work on the plugin for writing next week.
Dependences needed:
pip3 install -U pymodbus pymodbusTCP
pip install pyserial
P.S. I'm not able to attach file here so I left it on https://easyupload.io/fj9psi
Code: Select all
2024-09-28 13:22:34.672 Error: Test Total Solar Radiation: (ModbusREAD) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/modbus-read/:/usr/lib/python39.zip:/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/local/lib/python3.9/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.9/dist-packages'.
2024-09-28 13:22:34.673 Error: Test Total Solar Radiation: Traceback (most recent call last):
2024-09-28 13:22:34.673 Error: Test Total Solar Radiation: File "/home/pi/domoticz/plugins/modbus-read/plugin.py", line 163, in <module>
2024-09-28 13:22:34.673 Error: Test Total Solar Radiation: from pymodbus import FramerType
2024-09-28 13:22:34.673 Error: Test Total Solar Radiation: ImportError: cannot import name 'FramerType' from 'pymodbus' (/usr/local/lib/python3.9/dist-
Hi Rosomak,
Users browsing this forum: Bing [Bot] and 0 guests