This is the first project that ran at first attempt after following the instructions. THANK YOU! Now my smart home control knows the SOC, wonderful!
@ZielinskiIrek3 жыл бұрын
glad it works for you Jochen!
@leakim9712 жыл бұрын
you really did an amazing job and provide lot of very useful information in one project, thank you very much
@gerritmueller19773 жыл бұрын
Hi Irek, good job, it's working pefectly in my home, well done!
@DaveWinwood4 жыл бұрын
A great starting point for my home automation and it works really well. I didn't have a MAX232 so just used s couple of NPN transistors to invert and level shift the TX and RX lines. The batteries are happy to have a 5V signal on their RX line as I don't see any communication issues. Now the fun starts as I try and link this to my RPi 4 which will be the main controller. Have lots to learn yet. Thank you Irek for sharing your project.
@ZielinskiIrek4 жыл бұрын
pleasure and good luck :-)
@Thebustermann4 жыл бұрын
Dave, did you ever manage to do this using your RPi? I dont have access to arduino, so wondering how it went.
@joeybloos93874 жыл бұрын
How did you get it working with the transistors?
@clikcspeed4 жыл бұрын
Thank you so much. Used this with ESP8266 - works like a charm! Much appreciated.
@matematto2.03 жыл бұрын
a huge, huge, HUGE thank you !
@matematto2.03 жыл бұрын
Hi @Irek. Thanks to your great work I can now see the 6 "topic" you entered in the code: but are they referred to an average value compared to the "battery_count"? How can I read the values of each single battery? thanks again
@georgelza Жыл бұрын
hmm, this til -> rs232, this be the same we'd use to flash a sonoff. sounds/looks like it. I'm primarily trying to put a cable together to use a RJ11 and/or RJ45 to USB (my laptop does not have Serial). but now seeing this... thinking this would a nice side project also, after I've FW upgraded batteries.
@tamashorvath50354 жыл бұрын
Thanks Irek, just made it and works fine :)
@ZielinskiIrek4 жыл бұрын
Great to hear this. Added mqtt support yesterday. Get the latest version if you need it.
@tamashorvath50354 жыл бұрын
@@ZielinskiIrek Oh wow, awesome news! That's exactly what I was gonna have a look at later today. I do need it, I'll check it out. Thanks again!
@tamashorvath50354 жыл бұрын
For some reason I'm not getting anything through MQTT.... Log says "Connected to MQTT server: " but nothing comes when I subscribe to it
@ZielinskiIrek4 жыл бұрын
@@tamashorvath5035 all topics have "home/grid_battery/" prefix. Try suscribing to for example: home/grid_battery/soc if you still get nothing - add some more logging with Log() command, or see with some MQTT explorer application if really enything is pushed to MQTT or not.
@tamashorvath50354 жыл бұрын
@@ZielinskiIrek I'm trying in node-red, mqtt node reporting "connected" but still nothing.... probably missing something simple and obvious LOL
@eddiegough88954 жыл бұрын
Hi Irek, Sorry for the late reply, as I was not expecting to get an answer and did not check the blog earlier. Many thanks for the answer and I will follow up what you say with my installer, as I am not competent to do it myself. Eddie Gough
@eddiegough88954 жыл бұрын
Good News! Installer came today and I pointed out the problem with the charging rate and your comments and they corrected the issue and all is working now. Thanks again for your imput. Eddie Gough
@mviertel11 ай бұрын
Bloody beginner question: for the (safe) assembly of the ESP and MAX323 boards (plus capacitors) you used what? Is that just a breadboard there or what would be recommended?
@ZielinskiIrek11 ай бұрын
I would start with breadboard and when all works use perfboard and solder everything
@aleesi2 Жыл бұрын
great job! do you happen to have a port for the ESP32-wroom ? Thanks
@andreasschmidbauer44812 жыл бұрын
Can i use your Monitoring for the H48050 two?@Irek There ist no Console-Port, but an RS232 Port. Can i use this ? Thx for answers and help. Thx Andreas
@alexs.49702 жыл бұрын
Hi I have 6 pylontech 3000 and all green lights flushing on and off at same time what does that mean ?
@einfachdermartin2 жыл бұрын
Exellent job!
@tamashorvath50354 жыл бұрын
Another question - if I see this in the event log: 15 - 10:29 | Connected to MQTT server: 192.168.1.16 15 - 10:29 | New baud: 1200 15 - 10:29 | New baud: 115200 Is it because there are different baud rates set up on the 2 batteries? Should I change one of them somehow?
@ZielinskiIrek4 жыл бұрын
this is normal. initialy we use 1200 to enable UART, and then switch to 115200 to communicate with a device. if you see this ocasionaly in the log - then ignore, only if you have a flood of those messages, that would suggest a comms problem.
@GreenEverAfter Жыл бұрын
@@ZielinskiIrek is that command that you brake up the battery at 1200 and then switch to 11520 still applicable to the new C batteries (us2000c etc)?
@kollesandreas98983 жыл бұрын
I built the part, great. I miss the "number of cycles" display. Can you change that. Thank You
@ZielinskiIrek3 жыл бұрын
I think you can get this information using "stat" command, For example: /req?code=stat It does not appear to work for each individual battery - but only for master one (not 100% sure). See "CYCLE Times" value. I might add this to JSON output as some point.
@Reudiga Жыл бұрын
Great Work...! What means basestate Dischg? And what is currentDC? Is it watt? Voltage? Same estpowerac, what does that mean? Same PowerDC... Thank you for the awesome work
@silverscooby095 жыл бұрын
Thanks for sharing this, what voltage capacitors did you use as seeing a range from 16v to 160v
@ZielinskiIrek5 жыл бұрын
Working voltage is only 3.3v so anything above that is ok. 16v would be OK.
@mihaigsm20033 жыл бұрын
Sir, pls help, i want to send to grafana via MQTT voltage from all cells. can add on your software pls. Thanks!
@mihaigsm20034 жыл бұрын
can u do same for read data from PIP inverter (MPP Solar or same)?
@MrSavage774 жыл бұрын
Short question: is there any voltage on the battery connectors when you turn off from the main battery on/off switch? I need to understand if I still need a manual disconnect switch for maintenance purposes. Trying to avoid sparks whenever connecting and disconnecting the battery bank from the inverter/charger. Thanks
@ZielinskiIrek4 жыл бұрын
MrSavage77 Not sure. I have not seen any sparks when connecting batteries so off switch likely switches voltage off - but not 100% sure. Manual recommends a DC switch between batteries and inverter (I dont have one in my setup).
@MrSavage774 жыл бұрын
Irek yeap, I saw that note. On the other side, on page 5, where the button functions are described, it is mentioned that only after pressing the START button, power will be present at output. I’ll wait to get mine batteries, and I’ll measure the output when turned off.
@mihaigsm20034 жыл бұрын
HI, i try compile sketch to my arduino but received some error with " 'class SimpleTimer' has no member named 'setTimeout' " Any help?
@ZielinskiIrek4 жыл бұрын
have you copied the libraries folder to your arduino libraries? if yes - then maybe you have a different version of SimpleTimer clas that clashes with one I use?
@mihaigsm20034 жыл бұрын
@@ZielinskiIrek Solved, i find multiple location of libraries on my pc, delete all then reinstall arduino , now done, thanks
@eddiegough88954 жыл бұрын
Hi there, enjoyed your video. You seem to know what you are doing, so I thought I would ash a question on the subject: I have 4 Pylontech batteries like yours. I also have solar panels. I notice when the PV system is working and producing electricity it only allows the batteries to intake up to about 450w (at any one time) and the rest either goes into the house use/or goes back to the grid. This means that it would take a long time to fully charge my batteries, and here in Dublin with our weather patterns this can be a problem. Is it possible to increase the intake of the batteries during charging above the 450w limit? Thanks. Eddie Gough
@ZielinskiIrek4 жыл бұрын
Eddie Gough Charge rate is controlled by your inverter/charger. Check settings there. One battery can be charged at around 1.2kw. So for 4 batteries you can go as high as 4.8kw (if your charger can supply as much). Other thing to check is if your CT clamps are installed correctly.
@kevgermany Жыл бұрын
I'll be trying this with US5000s next year. Has anyone got experience to share?
@anthosta34525 жыл бұрын
Good job. thank you
@cedrics53704 жыл бұрын
This is great. Looks exactly like what I need. Does this also work with US200, non B/Plus batteries? @Irek : can this manage 8 batteries?
@ZielinskiIrek4 жыл бұрын
not sure about "non plus" - give it a try, it might. 8 batteries are supported.
@cedrics53704 жыл бұрын
@@ZielinskiIrek cheers for chiming in. Just read that the latest US2000 were renamed with no B or Plus. They have the same specs but allow for mismatched batteries in different parallel stacks (with hub). Will try hopefully this week with a non Sparkfun Max3232...
@kchiem4 жыл бұрын
Are those US2000+ units sitting on shelves or rails, or are they mounted from the front only?
@ZielinskiIrek4 жыл бұрын
When you attach a battery from the front only it will stay in place without any flexing/sag. Some people do it this way. I have 2 shelves myself, and added a small pieces of wood beween batteries (at the back) to support battery on the top. Just to be on the safe side.
@Mobi20013 жыл бұрын
Thanks for sharing this, what do i have to do connect the us2000C ??
@ZielinskiIrek3 жыл бұрын
I belive this is exactly the same connection, protocol, etc
@Mobi20013 жыл бұрын
@@ZielinskiIrek the connection is different, us2000 have an RJ10 connector and us2000C RJ45
@ZielinskiIrek3 жыл бұрын
@@Mobi2001 You are right. There is a difference. See "Console" section in this manual: www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwil3O67lZXyAhU0hv0HHXk9AaUQFjAAegQIBxAD&url=https%3A%2F%2Fatersa.shop%2Fapp%2Fuploads%2F2021%2F03%2FUS2000C-Product-Manual-V1.0-20CPSV0901-.pdf&usg=AOvVaw2dwsy9hqasMFg5pZk3JQLy Looks like you need to wake the port by applying voltage to wake pin as well.
@Mobi20013 жыл бұрын
@@ZielinskiIrek it doesn't work, I'm doing something wrong
@ZielinskiIrek3 жыл бұрын
@@Mobi2001 Did you send the wakeup signal on pin4 for more than 0.5s and then cleared it?
@juliankelsalljoel67424 жыл бұрын
Hi Irek, thanks you have done a great job! I have two batteries and would like to see the soc for both of them in the jsonOut. What would I need to put in the code? Thanks again
@ZielinskiIrek4 жыл бұрын
if you don't know how to modify C code - maybe use "/req?code=pwr" instead of "/jsonOut" in your application? would that work for you?
@mathschut5054 жыл бұрын
Hi, I can't get the Wemos to work. Does the whole thing only work with a certain Wemos D1 Mini or why can I not access the web server after uploading. The Wemos also does not get an IP over DHCP. Does anyone have any idea what I might be doing wrong?
@ZielinskiIrek4 жыл бұрын
it should work with any wemos board really. Try flashing first some example scripts like "blink" to see if LED blinks, and I think there is a webserver example as well. This will be a good way to verify your board works correctly before you go ahead and connect it to the battery,
@mathschut5054 жыл бұрын
@@ZielinskiIrek Hello, I got it working now. But I only get values if the Wemos is a slave and not a master, is that correct?
@ZielinskiIrek4 жыл бұрын
@@mathschut505 what do you mean by master/slave?
@TheRealAnthony_real2 жыл бұрын
Nice stuff .. anything that can integrate with Home Assistant ?
@ZielinskiIrek2 жыл бұрын
Yes - this project will push data to MQTT server, and then in HA you can add MQTT sensors. This is how I do it.
@TheRealAnthony_real2 жыл бұрын
@@ZielinskiIrek great ! So you can automate .notify to let you know in an event of drastic changes and more ;)
@ZielinskiIrek2 жыл бұрын
@@TheRealAnthony_real yes absolutely
@ladydbandorchestra5 жыл бұрын
Thanks, it is working very well , but when I use a "pwr" there is a different image than your video, the data are only a 1 vertical line , is it normal? Thank you very much
@ZielinskiIrek5 жыл бұрын
hi - can you copy and paste what do you get? what about other commands like "help"?
@ladydbandorchestra5 жыл бұрын
@@ZielinskiIrek I tried but I can't put here the photo or file
@ZielinskiIrek5 жыл бұрын
@@ladydbandorchestra send it at irekz@yahoo.com
@ladydbandorchestra5 жыл бұрын
@@ZielinskiIrek now it is working very well thank you very much
@ZielinskiIrek5 жыл бұрын
Dario Enzo Awesome!
@ziobit51773 жыл бұрын
Hi, congratulations for the video, I ask you if it also works with esp-01 module, thanks
@ZielinskiIrek3 жыл бұрын
should work on any esp8266 board
@ziobit51773 жыл бұрын
@@ZielinskiIrek Sorry for the trouble, I can't understand why it gives me a blank page with "????" i am using max232 with suitable capacitor, where can i take a look? thank you
@ZielinskiIrek3 жыл бұрын
@@ziobit5177 check all electrical connections fitst, maybe you swapped tx with tx? if nothing works - connect PC to the console and see if you can establish a communication (you need to send "magic" string first, and change the baud rate as the C++ code does).
@ziobit51773 жыл бұрын
@@ZielinskiIrek Thanks for the advice, but unfortunately it does not work, I have tried to reverse tx / rx and I have shortened the cable, but I cannot wake up the battery, I have tried with Arduino one sending the data as you described, 1) active serial to 1200 , 2) I transmit the awakening code, 3) I reactivate serial to 115200, 4) I transmit pwr \ n, 5) I listen to the serial ... I am tired of the attempts I have made, I do not know what to do ... do you have any other advice to give me? thank you
@ZielinskiIrek3 жыл бұрын
@@ziobit5177 If you have more than one battery - are you connecting to a MASTER one? If you do - maybe try to separate one battery - and connect only to this one?
@tomhein14975 жыл бұрын
I did all the same with the same parts in the description. But all response I get back is "????" Can anyone help?
@ZielinskiIrek5 жыл бұрын
where do you see those question marks - in the runlog? check if tx is not swapped with rx, also make sure ground wires between battery and esp are connected together (had comms issues before when grounds were not propery connected).
@tomhein14975 жыл бұрын
Everything is connected like the drawing on github. should I also connect ground of the Battery to the ground of the Console Port of the Battery and the esp??? In the Event-log only ???? in the runtime log: 16 - 06:00 | New baud: 1200 16 - 06:00 | New baud: 115200
@ZielinskiIrek5 жыл бұрын
@@tomhein1497 no need to connect ground of the battery. Only ground on the RJ connector to ground of ESP (as per drawing on github). "????" means that ESP is reading some garbage. Are you sure RJ connection is correct? Diagram on github shows RJ connector from the front, double check this is how you wired it. If it still does not work - open a issue on github and post some photos of your setup.
@tomhein14975 жыл бұрын
Do I have to activate the console port first? Do I have to make settings on the dip-switches? I have two batteries(4 weeks old). Tested on both(single and together). Always the same. Wiring is like diagramm. Any help?
@ZielinskiIrek5 жыл бұрын
@@tomhein1497 Console port should be always active as far I know. Dip switches should have no effect on it (those control baud rate of rs485 only). To debug your console port you could get usb-to-rs232 adapter connect it to the PC and issue commands manually (a bit fiddly but I did that first before developing esp project to see if console works at all). More details here: www.photovoltaikforum.com/thread/118958-pylontech-us2000b-daten-%C3%BCber-konsole-rs232-auslesen/?pageNo=2 (used google translate as my German is non existing): translate.google.com/translate?hl=en&sl=auto&tl=en&u=https%3A%2F%2Fwww.photovoltaikforum.com%2Fthread%2F118958-pylontech-us2000b-daten-%25C3%25BCber-konsole-rs232-auslesen%2F%3FpageNo%3D2
@ManuPithiviers11 ай бұрын
Thank you very much for sharing with everyone. I am trying to simplify to see the data in serial monitor by removing wifi web server and all that. If anyone can help me I would appreciate it. 😊
@operadebarie4 жыл бұрын
hello, i sent you an email with your code changed to implement softwareserial, can you watch. I have the beginning of response from my pylontech battery, but the output stops. The advantage of the software serial port is that it allows debugging from the computer via Rx et Tx code : #include //Ports de réception de la liaison série avec SeriePylontech SoftwareSerial SeriePylontech(D1, D2); //RX t TX ..... const int readNow = SeriePylontech.readBytesUntil('>', szResponse, sizeof(szResponse)-1); //all commands terminate with "$$ pylon>" (no new line at the end) ...... can you help me because the answer is incomplete and I did not manage to make your initial program work (many connected objects and network address difficult to recover knowing that we are blind when rx and tx are already used)
@ZielinskiIrek4 жыл бұрын
check content of your_ip/log if there is any unrecognised or unexpected response from the battery it will be logged there - see if there is anything interesting if this does not help - try connecting your PC via USB to RS232 connector and see if you get correct response from it using terminal app
@operadebarie4 жыл бұрын
My log : 09 - 09:02 | Boot event 09 - 09:03 | New baud: 115200 09 - 09:03 | New baud: 1200 09 - 09:03 | New baud: 115200
@ZielinskiIrek4 жыл бұрын
@@operadebarie Looks like there is no response at all from the battery. Few options: - Check all electrical connections. - Make sure you are connecting RS232 cable to the master battery (if you have more than one). - Connect PC to the battery if you can and experiment to see if you get any response. Ps. you can use "Log()" function to log any string to /log - this might be helpful with debugging. Good luck!
@operadebarie4 жыл бұрын
@@ZielinskiIrek interface me repond when : 192.168.0.122/req?code=bat bat @ Battery Volt Curr Tempr Base State Volt. 192.168.0.122/req?code=pwr pwr @ Power Volt Curr TemprFa捷 Thigh Vlow Vhigh Bas Isn't the battery responding?
@operadebarie4 жыл бұрын
@@ZielinskiIrek It is ok now ! Thank you
@UsmanHameed3 жыл бұрын
Can you please make 1 for me , i am happy to pay fair price
@ZielinskiIrek3 жыл бұрын
Sorry Usman, can't help myself due to lack of time. Maybe someone reading this forum can. Cheers.
@johangroify4 жыл бұрын
Go check out the icc pi at centurionsolar.co.za, that's what I got
@ssuslik4091 Жыл бұрын
Great work! Its works for me without mqtt. But when commenting out line 17 to enable mqtt i get a compiler error... do you have any idea? c:\PylontechMonitoring\libraries\ESP8266_Microgear\MicroGear.cpp: In function 'void msgCallback(char*, uint8_t*, unsigned int)': c:\PylontechMonitoring\libraries\ESP8266_Microgear\MicroGear.cpp:19:28: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 19 | cb_present("present",payload,length); | ^~~~~~~~~ c:\PylontechMonitoring\libraries\ESP8266_Microgear\MicroGear.cpp:24:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 24 | cb_absent("absent",payload,length); Thanks
@ZielinskiIrek Жыл бұрын
where is the error, those looks like compiler warning to me?
@ssuslik4091 Жыл бұрын
@@ZielinskiIrek yes when sketch will be compiled this comes up. Only when activating mqqt. But no big problem, i am using your jsonOut output getting the data read by node red. Thanks