Git Product home page Git Product logo

Comments (8)

syssi avatar syssi commented on September 23, 2024

If the CRC is wrong your inverter should respond with <<< NAK. I don't see any responses so I assume your inverter isn't connected properly to your ESP. Please double check the RX/TX lines between the ESP and the RS232 converter as well as the RX/TX lines between the RS232 converter and the inverter. How did you power the RS232 converter? In most cases these converter boards must be powered twice (low voltage level + high voltage level).

from esphome-pipsolar.

PhilKloppers avatar PhilKloppers commented on September 23, 2024

I've tried alternately swapping RX/TX on both ends without success. The RS232 is a MAX232-based board. I'm providing power on the 3.3v side from the ESP, and it's getting 12v from the inverter. The datasheet says it doesn't actually need voltage on the RS232 side as it has a charge pump onboard to boost the level to 12v from the 3.3v supply, but it's connected anyway. The only response I've ever seen in the log was an echo of the sent data, and that only when I disconnected the ground line to the MAX232 board. I assumed that this means that the RX/TX on the ESP side are incorrect in that configuration. I will try to connect the RS232+ESP to a USB-Serial cable I have and try sending data to see if it gets through - at least I can then confirm orientation! Failing that I'll have to dig the oscilloscope out...

Update 1 - I connected the USB-Serial cable to the MAX board with the SolarPower app running on the PC and saw the following in the log:

[13:09:01][D][uart_debug:158]: >>> "QMODI\xC3\x81\r"
[13:09:01][D][uart_debug:158]: <<< "QPI\r"
[13:09:03][D][uart_debug:158]: <<< "QPI\r"
[13:09:03][D][uart_debug:158]: >>> "QFLAG\xC2\x98t\r"
[13:09:03][D][uart_debug:158]: <<< "QPI\r"
[13:09:06][D][uart_debug:158]: <<< "^P003PI\r"
[13:09:08][D][uart_debug:158]: <<< "^P003PI\r"
[13:09:09][D][uart_debug:158]: <<< "^P003PI\r"
[13:09:10][D][uart_debug:158]: <<< "^P003PI\r"
[13:09:11][D][uart_debug:158]: <<< "^P006GMN\xDDW\r"
[13:09:13][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:14][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:15][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:15][D][uart_debug:158]: >>> "QPI\r"
[13:09:15][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:17][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:17][D][uart_debug:158]: >>> "^P003PI\r"
[13:09:17][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:19][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:19][D][uart_debug:158]: >>> "^P005PIq\xC2\x8B\r"
[13:09:19][D][uart_debug:158]: <<< "^P005PIq\x8B\r"
[13:09:21][D][uart_debug:158]: <<< "^P006GMN\xDDW\r"

It's clearly receiving the requests from the app, so the MAX232 board is working and the RX/TX must be correct, right?

Update 2 - I sniffed the serial traffic on the PC, which showed the following:

+0.0000056	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 35 50 49 71 8b 0d 	^P005PIq..
+0.0040083	IRP_MJ_READ	UP	0x00000000	5e 50 30 30 35 50 49 71 c2 8b 0d 	^P005PIq...
+0.0000042	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 33 50 49 0d 	^P003PI.
+0.0042622	IRP_MJ_READ	UP	0x00000000	51 50 49 52 49 c3 b8 54 0d 	QPIRI..T.
+0.0000042	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 33 50 49 0d 	^P003PI.
+0.0000045	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 33 50 49 0d 	^P003PI.
+0.0041469	IRP_MJ_READ	UP	0x00000000	51 50 49 47 53 c2 b7 c2 a9 0d 	QPIGS.....
+0.0000049	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 33 50 49 0d 	^P003PI.
+0.0000047	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 33 50 49 0d 	^P003PI.
+0.0042847	IRP_MJ_READ	UP	0x00000000	51 4d 4f 44 49 c3 81 0d 	QMODI...
+0.0000048	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 33 50 49 0d 	^P003PI.
+0.0000096	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 33 50 49 0d 	^P003PI.
+0.0040406	IRP_MJ_READ	UP	0x00000000	51 46 4c 41 47 c2 98 74 0d 	QFLAG..t.

So on the PC side it's also receiving the commands from the ESP.

from esphome-pipsolar.

syssi avatar syssi commented on September 23, 2024

Your first paragraphs sounds good. The log is a bit weird. What did you do exactly? In general the should be one response to one request. Could you capture some traffic between the SolarPower app and your inverter without noise of the third party (the ESPHome implementation)? This should help to identify the protocol of your inverter and to make sure the ESPHome component is compatible or not.

from esphome-pipsolar.

PhilKloppers avatar PhilKloppers commented on September 23, 2024

Sure! (The ESP-Home log is just showing both sides trying to discover, so won't actually be a coherent exchange).

Here's some of the sniffed serial data between the app and the inverter:

+0.0000061	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 36 56 46 57 f6 e6 0d 	^P006VFW...
+0.0040702	IRP_MJ_READ	UP	0x00000000	5e 44 30 32 30 30 35 34 30 32 2c 30 34 30 32 35 2c 30 30 30 …	^D02005402,04025,000…
+0.0000056	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 49 52 49 ee 38 0d 	^P007PIRI.8.
+0.0039939	IRP_MJ_READ	UP	0x00000000	5e 44 30 38 39 32 34 30 30 2c 32 33 33 2c 32 34 30 30 2c 35 …	^D0892400,233,2400,5…
+0.0000093	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 36 46 57 53 c5 43 0d 	^P006FWS.C.
+0.0041065	IRP_MJ_READ	UP	0x00000000	5e 44 30 33 39 30 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c …	^D03900,0,0,0,0,0,0,…
+0.0000063	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 30 6d 9d 0d 	^P007PRI0m..
+0.0041183	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 31 2c 31 34 2c 39 36 31 33 32 31 31 30 31 30 …	^D0401,14,9613211010…
+0.0000063	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 47 53 30 29 b6 0d 	^P007PGS0)..
+0.0041749	IRP_MJ_READ	UP	0x00000000	5e 44 31 31 33 31 2c 35 2c 30 30 2c 32 33 35 37 2c 35 30 31 …	^D1131,5,00,2357,501…
+0.0000065	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 30 6d 9d 0d 	^P007PRI0m..
+0.0040325	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 31 2c 31 34 2c 39 36 31 33 32 31 31 30 31 30 …	^D0401,14,9613211010…
+0.0000092	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 31 7d bc 0d 	^P007PRI1}..
+0.0040749	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 31 2c 31 34 2c 39 36 31 33 32 31 31 30 31 30 …	^D0401,14,9613211010…
+0.0000061	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 47 53 31 39 97 0d 	^P007PGS19..
+0.0040898	IRP_MJ_READ	UP	0x00000000	5e 44 31 31 33 31 2c 35 2c 30 30 2c 32 33 35 38 2c 35 30 31 …	^D1131,5,00,2358,501…
+0.0000074	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 36 46 57 53 c5 43 0d 	^P006FWS.C.
+0.0040879	IRP_MJ_READ	UP	0x00000000	5e 44 30 33 39 30 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c …	^D03900,0,0,0,0,0,0,…
+0.0000057	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 31 7d bc 0d 	^P007PRI1}..
+0.0040908	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 31 2c 31 34 2c 39 36 31 33 32 31 31 30 31 30 …	^D0401,14,9613211010…
+0.0000059	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 32 4d df 0d 	^P007PRI2M..
+0.0040996	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 30 2c 30 30 2c 30 30 30 30 30 30 30 30 30 30 …	^D0400,00,0000000000…
+0.0000059	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 33 5d fe 0d 	^P007PRI3]..
+0.0041905	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 30 2c 30 30 2c 30 30 30 30 30 30 30 30 30 30 …	^D0400,00,0000000000…
+0.0000064	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 34 2d 19 0d 	^P007PRI4-..
+0.0041518	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 30 2c 30 30 2c 30 30 30 30 30 30 30 30 30 30 …	^D0400,00,0000000000…
+0.0000084	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 35 3d 38 0d 	^P007PRI5=8.
+0.0041289	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 30 2c 30 30 2c 30 30 30 30 30 30 30 30 30 30 …	^D0400,00,0000000000…
+0.0000066	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 36 0e 5b 0d 	^P007PRI6.[.
+0.0041180	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 30 2c 30 30 2c 30 30 30 30 30 30 30 30 30 30 …	^D0400,00,0000000000…
+0.0000064	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 37 1d 7a 0d 	^P007PRI7.z.
+0.0040962	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 30 2c 30 30 2c 30 30 30 30 30 30 30 30 30 30 …	^D0400,00,0000000000…
+0.0000066	IRP_MJ_WRITE	DOWN	0x00000000	5e 50 30 30 37 50 52 49 38 ec 95 0d 	^P007PRI8...
+0.0040332	IRP_MJ_READ	UP	0x00000000	5e 44 30 34 30 30 2c 30 30 2c 30 30 30 30 30 30 30 30 30 30 …	^D0400,00,0000000000…

from esphome-pipsolar.

syssi avatar syssi commented on September 23, 2024

Unfortunately this protocol isn't supported by the pipsolar component.

from esphome-pipsolar.

PhilKloppers avatar PhilKloppers commented on September 23, 2024

Ah! That would explain all the difficulties!😂 I did see the protocol listed in the documents in this issue #39 (specifically this one I think: https://github.com/ardupic/voltronic-inverter-communication-protocols/blob/main/Infini-Solar%20V%26VII%26VIII%26VIV%26%20V%20II%206K%20LV%20Split-Phase%26TWIN%20protocol%20202205....xlsx)

Are there any plans to include the protocol, and if not, could you suggest any package that could work? I also don't mind doing the legwork to get it included if that's feasible?

from esphome-pipsolar.

SeByDocKy avatar SeByDocKy commented on September 23, 2024

As far I know for MPI models, there is no CRC ....

from esphome-pipsolar.

syssi avatar syssi commented on September 23, 2024

@PhilKloppers I've fixed and improved the protocol test YAML. Could you give it another try?

https://github.com/syssi/esphome-pipsolar/blob/main/tests/esp8266-test-protocols.yaml

from esphome-pipsolar.

Related Issues (20)

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.