softwarecrash / Solar2MQTT

ESP8266 based WiFi and MQTT interface for MPPT Inverters that use watchpower
Other
175 stars 39 forks source link

no data display #3

Closed lucasimons closed 3 years ago

lucasimons commented 3 years ago

I have a easun 24v 2,4kw inverter , i change this value // PCM and PIP inverters use below QpiMessage _qpiMessage = {97}; QpigsMessage _qpigsMessage = {110}; QmodMessage _qmodMessage = {5}; QpiwsMessage _qpiwsMessage = {36}; QflagMessage _qflagMessage = {0}; QidMessage _qidMessage = {0};

but i see all value to 0

i try whit this value but not work

QflagMessage _qflagMessage = {15}; QidMessage _qidMessage = {18};

the mqtt works great

wifi = { "FreeRam": 37464, "rssi": -43, "dbm": 100} Info = {"Status":"Im alive!", "DeviceType": "PIP","IP ":"192.168.0.182"}

softwarecrash commented 3 years ago

can you connect a second uart (9600) to d4 to read the debug messages?

lucasimons commented 3 years ago

Yes I can...

I change only this value...

// PCM and PIP inverters use below QpiMessage _qpiMessage = {97}; QpigsMessage _qpigsMessage = {110}; QmodMessage _qmodMessage = {5}; QpiwsMessage _qpiwsMessage = {36};

This value is correct because I use an other software and it works but I must use a raspberry butI want use a wemos

This value i don't know if are correct QflagMessage _qflagMessage = {15}; QidMessage _qidMessage = {18}

I must change other variables?

I can try different value of

QflagMessage _qflagMessage = {X}; QidMessage _qidMessage = {Y};

softwarecrash commented 3 years ago

Dont Change any of this, that are Not values.

On my Inverter ist works, so Take a Look in the debug what your Inverter ändert in the qpigs command.

lucasimons commented 3 years ago

Ah ok so I only must set the inverter type to pip or pcm?

softwarecrash commented 3 years ago

At the Moment only PCM is supported, i dont can Test it on Other inverters. When you have the easun 2,4 so i think it Work. The best way to Check is to Look at the serial1 this Show the answer from the Inverter.

I have updated some Code, so get a fresh Copy to Test it.

Please Report when tested

lucasimons commented 3 years ago

I soldered two cables to gnd and D4 now I have to connect a usb ttl converter to my PC ... Do you have a code to test to see how the inverter responds?

softwarecrash commented 3 years ago

I soldered two cables to gnd and D4 now I have to connect a usb ttl converter to my PC ... Do you have a code to test to see how the inverter responds?

just load putty connect the esp to power and the inverter and then start putty then you can see the second serial output. to speed up the request frequenz open the webpage and go to live data

image

lucasimons commented 3 years ago

Putty show this in loop

▒▒▒:0,"busV":0,"heatSinkDegC":0,"battV":0,"battPercent":0,"battChargeA":0,"battDischargeA":0,"sccBattV":0,"solarV":0,"solarA":0} Ajax Request answer: {"gridV":0,"gridHz":0,"acOutV":0,"acOutHz":0,"acOutVa":0,"acOutW":0,"acOutPercent":0,"busV":0,"heatSinkDegC":0,"battV":0,"battPercent":0,"battChargeA":0,"battDischargeA":0,"sccBattV":0,"solarV":0,"solarA":0} Sent Command: QPIGS Ajax Request answer: {"gridV":0,"gridHz":0,"acOutV":0,"acOutHz":0,"acOutVa":0,"acOutW":0,"acOutPercent":0,"busV":0,"heatSinkDegC":0,"battV":0,"battPercent":0,"battChargeA":0,"battDischargeA":0,"sccBattV":0,"solarV":0,"solarA":0}

the only modification I have in the circuit are the LEDs, i haven't the two leds but I don't think they create problems

IMG_20210325_112358

softwarecrash commented 3 years ago

the led an the link to this rs232 inverter is relict from the fork, i dont have rework the complete code at the moment.

this rs232-ttl inverter is garbage, that dint work for me, the pins from this little inverter goes on other pins on the max chip, i dont know how daromeer move to work i have the one with d9 sub jack.

give me a bit time, i can take a look what pins on the max chip is used by my inverter.

"Sent Command: QPIGS" after this comes the message from the inverter, so your inverter not answer to the qpigs command, or the communication is wrong, i think the rs232 communication its not correct.

on my rs232 ttl pice the pins from the chip ar not the same as this little type

edit: i have this https://www.amazon.de/DollaTek-Serieller-Anschluss-Konverter-Sprungkabel/dp/B07DK3874B/ref=sr_1_5?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=rs232+ttl&qid=1616670689&sr=8-5 that works, i have addet pictures to the repo

edit2: the pinout of the rj45 is wrong too on many pictures

lucasimons commented 3 years ago

yes this converter i think that is garbage ..... now i buy the converter like yours

this are the answere of my inverter

Sent Command: QPIGS Sent Command: QPIGS Data sent to MQTT SERver - up: Sent Command: QPIGS Sent Command: QPIGS Sent Command: QPIGS Sent Command: QPIGS Sent Command: QPIGS Sent Command: QPIGS Data sent to MQTT SERver - up: Sent Command: QPIGS Sent Command: QPIGS Sent Command: QPIGS Sent Command: QPIGS Ajax Request answer: {"gridV":0,"gridHz":0,"acOutV":0,"acOutHz":0,"acOutVa":0,"acOutW":0,"acOutPercent":0,"busV":0,"heatSinkDegC":0,"battV":0,"battPercent":0,"battChargeA":0,"battDischargeA":0,"sccBattV":0,"solarV":0,"solarA":0} Ajax Request answer: {"gridV":0,"gridHz":0,"acOutV":0,"acOutHz":0,"acOutVa":0,"acOutW":0,"acOutPercent":0,"busV":0,"heatSinkDegC":0,"battV":0,"battPercent":0,"battChargeA":0,"battDischargeA":0,"sccBattV":0,"solarV":0,"solarA":0} Ajax Request answer: {"gridV":0,"gridHz":0,"acOutV":0,"acOutHz":0,"acOutVa":0,"acOutW":0,"acOutPercent":0,"busV":0,"heatSinkDegC":0,"battV":0,"battPercent":0,"battChargeA":0,"battDischargeA":0,"sccBattV":0,"solarV":0,"solarA":0}

now i can change with other converter and try if it is defective

The connetion # IMG_20210325_154716

softwarecrash commented 3 years ago

i have tried it with this little rs232-ttl pice and nothing work, with the bigger version with D9 jack it works.

i will look later, i think the little converter has another pinout from the chip. it must work on an other way, its the same chip, i must chek the pinout.

the log show it clear, that the command is send, but no answer, any answer will show up in this.

(sorry my english is not the best)

lucasimons commented 3 years ago

I made a mistake in connecting the wires from the rj45 to the converter now I do a further test and fix the cables because I have inverted the white one with the red one

Edit 1 now I connect the wire correctly IMG_20210325_161604

But not work

tomorrow i receive the big converter and i try with that

softwarecrash commented 3 years ago

i guess... just for test, can you connect the red and with cable to the underside of the pcb? it looks like the pads from top ar not connected to bottom, or messaure it

lucasimons commented 3 years ago

I tried with the multimeter to see the continuity actually the two sides are not connected together, I tried to connect the cables from the other side but it doesn't work ... tomorrow the new converter should arrive I will do the test with that

softwarecrash commented 3 years ago

ok i have checked it, with the little converter you musst both connect on the bottom (chip side is top). the top are other signal lanes. like this https://github.com/softwarecrash/Solar2MQTT/blob/master/images/drawing.png

lucasimons commented 3 years ago

I try to solder to the button side but there isn't any answer from the inverter IMG_20210325_203354

softwarecrash commented 3 years ago

I try to solder to the button side but there isn't any answer from the inverter Uploading IMG_20210325_203354.jpg…

with your image is some wrong

lucasimons commented 3 years ago

Yes now I re-upload the image... Your small convert works with the cables on the back?

softwarecrash commented 3 years ago

Yes now I re-upload the image... Your small convert works with the cables on the back?

I dont have Test it with the small

softwarecrash commented 3 years ago

can you show me a link to your inverter or pictures?

lucasimons commented 3 years ago

I have this http://www.easunpower.com/Products/Off-Grid/241.html

I think that is the same of this pip 2424mse1 https://www.mppsolar.com/v3/pip-hsemse-series/

softwarecrash commented 3 years ago

I have this http://www.easunpower.com/Products/Off-Grid/241.html

I think that is the same of this pip 2424mse1 https://www.mppsolar.com/v3/pip-hsemse-series/

thanks, ok lets go a little bit deeper. have you the watchpower software and and can connect over serial? the software have the option when right click on the taskbar icon click on debug, then you become a lot of tx files with answers of every command from your inverter. please zip and upload.

have you made any changes on the code? i have found a little issue with the inverter type select, the pcm is the pip. for thest work you can take the code without any changes, it works for pip devices. edit: i have corrected the inverter name typ

lucasimons commented 3 years ago

Today the big converter arrived and I made the welds tomorrow I try it ... If anything I also do the tests with whatch power ... initially I had modified your files then after I flashed your bin file directly

softwarecrash commented 3 years ago

Today the big converter arrived and I made the welds tomorrow I try it ... If anything I also do the tests with whatch power ... initially I had modified your files then after I flashed your bin file directly IMG_20210326_210804

You have a Wireing issued, the yellow cable is your vcc so ist Looks, but going to tx

lucasimons commented 3 years ago

Yes I send a wrong image i connect vcc to 3.3v gnd to gnd e rx to TX e tx to rx... Now I think it is correct

Edit 1 I try a big converter but the inverter not responding IMG_20210327_074057 , now I do some test with watchpower

lucasimons commented 3 years ago

I connect the pc with the USB cable but I don't find any debug features on watchpower.... Where it is?

softwarecrash commented 3 years ago

In the taskbar right click on the watchpower icon

lucasimons commented 3 years ago

I think that I have a different version of watchpower 1616865418817447860213562679208

softwarecrash commented 3 years ago

grafik the watchpower icon on the taskbar, right click and debug

lucasimons commented 3 years ago

debug-watchpower.zip This is my file in the log folder

softwarecrash commented 3 years ago

the top is yours, the bottom from me grafik so it looks okay, i think the problem must be on another place. Please Look At watchpower when connected what serial baut rate ist Set. have you connect it on the pc over usb or serial? when serial the port works just for fun, try swap the rx/tx cables from the inverter, i have seen shematics with other pinouts.

you can test the communication another way when you connmect the esp with converter to the pc com port, with putty you can see then the request from the esp, then copy one line from the qpigs file begin at ( in the console to simluate the inverter.

what is the little switch on your esp?

Edit. now i have tested it with the little converter, and no data or crushed data at start, its curios, with my big converter with 8 pin heater out it works like a charm. unfortanly i cant find exaclty the one that i have, its a old like this https://i.ebayimg.com/images/g/HZsAAOSwngxdUT3H/s-l300.jpg but on this the leds other sorted. its pissibil that are not every max232 work, i dont know about this

lucasimons commented 3 years ago

IMG_20210328_214426 I have always used the usb port ... if I did the test with the console and putty I would only see if the esp works? what parameters should I put on putty? (data bit, stop bit, etc) ... I had inserted the small switch to reprogram the esp via usb ...

https://community.home-assistant.io/t/programmatically-read-data-from-your-solar-inverter-voltronic-axpert-mppsolar-pip-voltacon-effekta-etc-and-interface-with-home-assistant-via-mqtt-works-with-rs232-usb/119053/62

Immagine 2021-03-28 221403

the data rate is 2400 bps?

in this project there is a way to select automatically the inverter type https://github.com/ned-kelly/docker-voltronic-homeassistant/blob/master/sources/inverter-cli/inverter.cpp

softwarecrash commented 3 years ago

yes, the inverter rate is all 2400 8N1 when putty conected to the rs232-esp you can send the string from the qpigs txt file statring at (... when recive the qgpis request from the esp in putty.

i dont have build actual an automatic function, its not easy for me to implement a automatic function, but thanks i will take al look later. my version its early alpha, so many bugs and rare feauteres.

so i hope i can work in future on it, or/and find people there help me with this

for programing you can just unplug the rj45 then its run, so when you use the web updater you dont need to cut the serial line.