cole8888 / srne-solar-charge-controller-monitor Goto Github PK
View Code? Open in Web Editor NEWRead data from SRNE solar charge controllers.
Read data from SRNE solar charge controllers.
I'm using the Python version, I was getting a bunch of errors and code crashing from the mqtt. I read your description of the project and saw that it send the data off to another device. I don't have it setup with a second device., so maybe an error due to me not having it setup that way.
Traceback (most recent call last): File "/home/USER/SolarComms/SRNE.py", line 82, in <module> client = connect_mqtt() File "/home/USER/SolarComms/SRNE.py", line 73, in connect_mqtt client.connect(broker, port) File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) File "/usr/lib/python3.9/socket.py", line 843, in create_connection raise err File "/usr/lib/python3.9/socket.py", line 831, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
Also, thank you! I was about to pull my hair out trying to get it to work.
Hello I'm trying to use the python script for the raspberry pi again, used it last year it worked great. When I go to read any data from my ML2420 I get errors. I connect over a USB serial cable and I have the bluetooth adapter and it works fine.......
My code, the same other then a debug line I added.
def run(): if False: #I added this if as a DEBUG response = modbus.read_holding_registers(26, 1, unit=0) print(response) while True: try: # Read 35 registers from the controller starting at address 0x0100 (Decimal 256) until 0x0122 (Decimal 290) response = modbus.read_holding_registers(256, 35, unit=0) if(JSON_OR_TEXT == "TEXT"): printDataText(response) else: print(convertToJson(response, False)) time.sleep(DELAY_BETWEEN_REQUESTS) except Exception as e: if(JSON_OR_TEXT == "TEXT"): print("Failed to read data, reconnecting...", e) else: print(convertToJson(None, True)) reconnectModbus() time.sleep(DELAY_BETWEEN_REQUESTS)
I get the error "Failed to read data, reconnecting... 'ModbusIOException' object has no attribute 'registers' "
And when I do my debug I get "Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)"
I really could use the help right now.
I use the Raspberry Pi 3B+, after configuring and executing the script the following error message appears:
Failed to read data, reconnecting... 'ModbusIOException' object has no attribute 'registers'
Sent to topic ML4860
I use the original USB converter PL2303 (but also a FTDI232 and a CH340). At least the PL2303 works on the computer with the manufacturer's software SolarStationMonitor. Do you have an idea what it could be?
I was trying to use the python script for the raspberry PI to monitor my charger controller again, been without it for a long time now.
As I was setting up the script on my PI, only editing for my port/device, I ran in to error.
Traceback (most recent call last): File "/home/USER/SRNE.py", line 17, in <module> from pymodbus.client.sync import ModbusSerialClient as ModbusClient ModuleNotFoundError: No module named 'pymodbus.client.sync'
FIX: Change "pymodbus.client.sync" to "pymodbus.client"
Hi! Thank you so much for your python code :) I'm using it to read my ML4860 Solar Controller.
I removed the mqtt and the CC1 lines.
Just some questions,
How do you know how many registers to read?
And which registers refers to a value (eg r.registers[7] is Panel Voltage)?
Also, whose temperature do you refer in CPUTemperature().temperature? the raspberry pi?
As a newbie, I would like to ask how to use only 1 arduino to read the battery voltage and the charging state status of the SRNE? How will I connect it to arduino? Thank you very much for your help.
Hello, I tried to update the ml2420 through an app and the installation failed. Is there any way to enter the original software?
Getting the error 'has no attribute registers' when running SolarMonitor.py. Need your help :-)
The fault data does not get cleanly printed out. Add this functionality.
I think something is wonky with my sensor since I've never seen values that high, but this shouldn't happen regardless. It initially caused the esp8266 to crash completely when it first happened and on reboot it had the resistance symbol at the start of the second row instead of being at the end of the third.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.