Git Product home page Git Product logo

pylontech-battery-monitoring's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pylontech-battery-monitoring's Issues

wakeUpConsole() doesn't make sense on the serial console port

I have to state that the need to switch baud rates and send the "~20014682C0048520FCC3\r" string is a mistake that results from not understanding the different Pylontech ports and protocols. While this is the correct method to switch the RS485 (!) port from the semi-binary packet/frame mode to console mode, it is not necessary to be done when the RS232 (!) Console port is used.

The code WOULD make sense if the RS485 port with an RS485 transceiver is used.
Using the code on the Console port doesn't do any harm but sends unnecessary garbage to the console shell.

See the RS485 protocol documentation (https://github.com/Frankkkkk/python-pylontech/blob/master/RS485-protocol-pylon-low-voltage-V3.3-20180821.pdf). The above string can be found there: "~" is the "Start of Information" byte, followed by protocol version, address, etc. up to a checksum and the "End Code" (\r).

Summary:
port labeled "Console": RS232 interface, speaks "console shell"
port labeled "RS485": RS485 interface, speaks frame based "Pylontech Low Voltage Protocol" but can be switched to "console shell"
port labeled "CAN": CAN bus interface, speaks CAN protocol

SparkFun MAX3232

seting of time via serial ASCII telegram

Hi,
do you know how to set time of US3000 via serial ASCII command please ?

Usage from help doesn't works.

time 2022 4 11 9 59 0
Invalid command or fail to execute.

Usage:
Time - time [year] [month] [day] [hour] [minute] [second]

But how is US3000 synchronized with inverter Studer XTM, XTH ?
Over Studer CAN Adapter from xtender ?

Thanks for help.
Jozef from Slovakia

RS485 ?

Can it also work with RS485?

I have a ROSEN SOLAR 10kWh powerwall and some say, has the same BMS inside.
But has no serial port...

Is it possible to compile and load ino file to esp8266 without any issue ????

Hi,
I disovered this Github file to do the same, to get information from my pylontech battery,

I tried without any sucess to compile and load the ino file with arduino ide, using MQTT , so I uncommented the ligne 17

I did all the same as described into the readme but I got an error

D:\PylontechMonitoring\PylontechMonitoring.ino:29:10: fatal error: PubSubClient.h: No such file or directory

I did not do the connection yet to the pylontech battery, only the esp8266 plugged to the PC to compile and load the ino file
in order to test the send command to Mosquitto broker and check if norered can get and read data from the esp8266 even if the esp8266 is not connected to the pylontech battery

Did anyone already have this issue ?

I thank you for your support
Manu

Good work

Hello,
Excelent work
That's exactly what I had and my head.
I will realize your project as it is and save a lot of time.
congratulations and thank you

Compiling with MQTT creates Errormessages

Hi all,
In general all works well and I've access to the Pylontech Batteries.
But if I like to enable the MQTT function, I get the following error, if I try to compile it:
....Documents\Arduino\libraries\ESP8266_Microgear\MicroGear.cpp: In member function 'void MicroGear::syncTime(Client*, long unsigned int*)':
....Documents\Arduino\libraries\ESP8266_Microgear\MicroGear.cpp:150:23: error: 'class WiFiClientSecure' has no member named 'setFingerprint'
clientsecure->setFingerprint(tstr);
^
....Documents\Arduino\libraries\ESP8266_Microgear\MicroGear.cpp:159:27: error: 'class WiFiClientSecure' has no member named 'setInsecure'
clientsecure->setInsecure();

I couldn't fine any solution for this issue.
Maybe somebody know how to solve it.

Software und/or hardware modifications for Pylontech US3000C

Hi,

I use irekzielinski Pylontech-Battery-Monitoring solutions since years at 2 different locations.
At the first location, I have a Pylontech US2000 at the second location I have a Pylontech US3000.
The solution is working fine.
I did some small modifications, SYSLOG support, change the OTA update procedure, diffrent landing page, ... but the hole functionallity is still from irekzielinski

I ordered a new Pylontech US3000C to replace the Pylontech US2000.
I tried to connect it to my existing WEMOS but a communications was not possible.

I didn't see that irekzielinski updated his documentation and found the the description of how to wire it up now at:
issue5

Also after changing the wiring, I am not able to communicate with the Pylontech US3000C.
grafik

According to:
issue1
Wibet10 added a
IIC I2C Logic level converter bi-directional module
and changed the source code

According to:
issue5
The old code is still working without a change.
mduchain identified that the "drop to 1200 baud or send that byte sequence to communicate" is not needed anymore.
And few days later mduchain write "I avoid this by sending a few CR/LF before sending the actual command โ€“ an alternative wakeup sequence of sorts."


Now my question?
Is anyone using the orginal source code from Pylontech-Battery-Monitoring to communicate with a Pylontech US3000C?
Is it working without a IIC I2C Logic level converter bi-directional module?

Libs

can you add to the readme what libs need to be installed?

SimpleTimer
Time
ntpclient

Sofar Inverter

Hi Irek,

I notice you have the same Inverter as me., Do you get the data about the power usage at your home from the battery data or do you use some other method to get it from the SOFAR?

pwr output changed

Hi,
I have a pylontech US2000B and a pylontech US3000A and I have been using @irekzielinski Pylontech-Battery-Monitoring tool since more than a year.
I am getting the data from pylontech and publish it to my moskitto MQTT broker and use it there.
Normally I switch off my battery at SOC < 20%, but last week my own program did not work and my US2000B battery went down to 0%.

Since then I have not been able to get any data from my US2000B battery.
The output has been changed:
US2000B:
us2000
US3000A
US3000

info2000
info3000

Sure, I still get data from US3000A, but the irekzielinski program cannot read the data from US2000B.

Has anyone else seen this? Does anyone know how to change the output format?

How Do You Update Code Over WiFi?

Hi

I built a couple of these modules earlier in the year and they have been working great!

I now need to try and use MQTT.

I am not familiar with the Arduino IDE. How do I push the revised code over wifi?

Krs

Mark

Cycle Count

I guess it would be very helpful to get the "cylce counts" also availble via MQTT. It's in the command "stats" but it seems, that this value is not inside the MQTT function.
It would be great to get this function... Thanks

US3000C not respondig to the "pwr" string

I have 4 batteries, the master is US3000C and slave are mixed US2000C and US2000.
I have tried to use you sketch but the battery was not responding, then I connect directly to the console port using putty and it seems that the command to read the battery status is "bat" and not "pwr"

Pylon_debug

Pylon_serial

Not sure why it finds 14 batteries and why it differs from standard "pwr" command, maybe due to a new firmware

error compile

Hi, i try compile to my ESP8266 but receive error

Arduino: 1.8.13 (Windows 7), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 921600"


C:\Users\user\Desktop\Pylontech-Battery-Monitoring-master\PylontechMonitoring\PylontechMonitoring.ino: In function 'void syncTime()':

PylontechMonitoring:310:11: error: 'class SimpleTimer' has no member named 'setTimeout'

     timer.setTimeout(5000, syncTime); //try again in 5 seconds

           ^

C:\Users\user\Desktop\Pylontech-Battery-Monitoring-master\PylontechMonitoring\PylontechMonitoring.ino: In function 'void loop()':

PylontechMonitoring:654:9: error: 'class SimpleTimer' has no member named 'run'

   timer.run();

         ^

Multiple libraries were found for "ArduinoOTA.h"

 Used: C:\Users\user\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ArduinoOTA

 Not used: C:\Users\user\Documents\Arduino\libraries\ArduinoOTA

Multiple libraries were found for "SimpleTimer.h"

 Used: C:\Users\user\Documents\Arduino\libraries\SimpleTimer

 Not used: C:\Program Files (x86)\Arduino\libraries\Time-master

 Not used: C:\Program Files (x86)\Arduino\libraries\SimpleTimer

Multiple libraries were found for "TimeLib.h"

 Used: C:\Users\user\Documents\Arduino\libraries\Time

 Not used: C:\Program Files (x86)\Arduino\libraries\Time-master

exit status 1

'class SimpleTimer' has no member named 'setTimeout'
 

Any help?

Response is only ????

Hi,
I did all the same as you did, with the same elements (Wemos D1 mini, Sparkfun Max3232).
I can access the web interface. But all responses I get is always "????".
What is wrong?
Webinterface
response

code adjustment for Pylontech H48050

Hello! Couldn't the code be adapted for the BMS SC0500A pylons with H48050 batteries? Your code is perfect, but on the command of the PWR to the serial console, my batteries come to me absolutely, so the parsing then does not work.
I am not proficient in coding, so unfortunately I do not have to make adequate modification of code.

Get Json data from pwr screen

I would need to read the maximum and minimum voltage of the 4 batteries from the pwr screen and send them to Home Assistant.
I tried scrape with no results.
The project also talks about the JSON format but I don't know how to extract them from that screen.
Can anyone help me ?
Thank you

pwr

US2000C and US3000C models.

Good morning, could you add communication with the new US2000C and US3000C models? Apparently an rj45 port is already used for console mode but something must have changed in the protocol because the only software that works is MultiSIBControl and it had to make a small update to recognize them http://www.multisibcontrol.net/

Would it be possible to add support for the new models?

Here is information about the connections https://powerforum.co.za/topic/7901-pylontech-us3000c/

Thanks.

Good morning, could you add communication with the new US2000C and US3000C models? Apparently an rj45 port is already used for console mode but something must have changed in the protocol because the only software that works is MultiSIBControl and it had to make a small update to recognize them http://www.multisibcontrol.net/

Would it be possible to add support for the new models?

Here is information about the connections https://powerforum.co.za/topic/7901-pylontech-us3000c/

Thanks.

PD: I still do not have any of these new models but they are probably the ones that will be sold when the stock of old models runs out.

FIX IP and MQTT Connection error

Hi,

Trying to use fix IP, and by compilation I got:
C:\Users\Fuji\Downloads\PylontechMonitoring\PylontechMonitoring.ino: In function 'void setup()':
C:\Users\Fuji\Downloads\PylontechMonitoring\PylontechMonitoring.ino:20:12: error: conversion from 'const char [14]' to 'IPAddress' is ambiguous
20 | #define IP "192.168.188.5"
| ^~~~~~~~~~~~~~~
C:\Users\Fuji\Downloads\PylontechMonitoring\PylontechMonitoring.ino:108:18: note: in expansion of macro 'IP'
108 | WiFi.config(IP, GATEWAY, NETMASK, DNS);

MQTT :

01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Wait for WIFI Connection
01 - 00:00 | Boot event
01 - 00:00 | Failed to connect to MQTT server.
01 - 00:01 | Failed to connect to MQTT server.
01 - 00:02 | Failed to connect to MQTT server.
01 - 00:03 | Failed to connect to MQTT server.
01 - 00:04 | New baud: 115200
01 - 00:04 | Failed to connect to MQTT server.
01 - 00:05 | Failed to connect to MQTT server.
01 - 00:06 | Failed to connect to MQTT server.
01 - 00:07 | Failed to connect to MQTT server.
01 - 00:08 | Failed to connect to MQTT server.
01 - 00:09 | Failed to connect to MQTT server.
01 - 00:10 | Failed to connect to MQTT server.
01 - 00:11 | Failed to connect to MQTT server.
01 - 00:12 | Failed to connect to MQTT server.
01 - 00:13 | Failed to connect to MQTT server.
01 - 00:14 | Failed to connect to MQTT server.
01 - 00:15 | Failed to connect to MQTT server.
01 - 00:16 | Failed to connect to MQTT server.
01 - 00:17 | Failed to connect to MQTT server.
01 - 00:18 | Failed to connect to MQTT server.
01 - 00:19 | Failed to connect to MQTT server.
01 - 00:20 | Failed to connect to MQTT server.
01 - 00:21 | Failed to connect to MQTT server.
01 - 00:22 | Failed to connect to MQTT server.
01 - 00:23 | Failed to connect to MQTT server.
01 - 00:24 | Failed to connect to MQTT server.

And Mosquitto Broker says:

2023-12-21 22:12:35: New connection from 192.168.188.5:49743 on port 1883.
2023-12-21 22:12:35: Client closed its connection.
2023-12-21 22:13:36: New connection from 192.168.188.5:49565 on port 1883.
2023-12-21 22:13:36: Client closed its connection.

I have other devices with MQTT connection and they are working fine.

Regards
Adrian

Feature not a issue! - it will be possible to connect this to an lv hub from pylontech?

Hi,

i have a configuration like 7 pylontech us2000c x 2 = 14 bateries.
In order to connect them(the batteries) with the growatt sph4000 inverter i need a lv hub.

It will be nice if this sw for monitoring the batteries can be connected to the hub in order to monitor with one esp8266 all 14 batteries.

it is possible?

what i'm getting wright now is...see attached foto.
IMG_20240123_223230

Regards
Adrian

New firmware 2.8 us2000c, not works.

With the new version of firmware 2.8 of the us2000c batteries no longer works. It seems that the port is now initialized to 115200 by default, but the problem I see is that it doesn't seem to accept the newline every time a request is sent.

If I use esp and send a request, for example, help, it does nothing, but if I disconnect esp and connect directly to a computer and do the same query using terminal1.9b (with +CR/LF enabled) I get an error of Unrecognized command and it appears to me that the query consists of two help followed by no spaces, that is, "helphelp".

I've gone through the code and tried alternatives to \n or even adding \r to no avail.

It has been working perfectly until I updated to version 2.8 (I added a new battery and upgraded the existing ones).

I have tried everything, including disabling the wakeUpConsole so that it is at a fixed 115200, but without results.

Any idea what may be going on?

read cells voltage

I need to read voltage from each cell and send via mqtt, how to add to code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.