manio / skymax-demo

https://skyboo.net/2017/03/monitoring-voltronic-power-axpert-mex-inverter-under-linux/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid JSON in hex stream

cowpen opened this issue · comments

I have an MPP Solar LV 5048. It's a split phase unit containing two inverters and two charge controllers. It shares the same comms protocol as the supported models listed here, although it supports more query & result codes (i,e, QPIGS2 for the second phase, etc.). I'm using node-red to call skymax-demo and injecting stdout to influxdb. The flow is successful, but the output returned contains an 0x0 in the buffer stream which the function to parse to a JSON object chokes on. The location of the 0x0 in the output string is at the value location for "AC_charge_on:,"

image

I've looked through the skymax code but I don't really have a clue for what I'm looking for. Could it be related to the "-" in line 202 of main.cpp?

Thanks for your help!

The problem is in the line:
"AC_charge_on":,
It is wrong formatted JSON.

Ahh... thank you. Looking more carefully, I see now that the QPIGS protocol for my inverter is a bit different for the parameter response at position "x". That must be where the bad JSON is coming from.
LV5048 5KW protocol-20190222 for customer-1.pdf

hey cowpen! I am at this stage to try to talk to my inverter with node red. Would u do me a favor and post your flow file that works? Would be greatly appreciated. to do that, click the hamburger menu than "export". Thanks

Here's what I had when I gave up on this particular solution since it didn't support the queries and responses required for my inverter. Hope it's helpful in some way.
flows(1).zip