Coder Social home page Coder Social logo

Comments (25)

carsonfee avatar carsonfee commented on August 22, 2024

I have heard mumblings that Skybox uses Sunspec Modbus but I am not entirely sure. Outback tech support is abysmal.

Simpliphi's documentation says this:

It is also possible to communicate with OutBack devices using the Modbus protocol and SunSpec
client software as described in OutBack AXS Port Owner’s Manual. The SunSpec Interface
menu item enables or disables this type of data stream from the MATE3

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

Hi @carsonfee,
so you are trying to connect the Skybox to some other (not supported) BMS using the CANBus right?
I would need some CAN specification from Outback or any supported battery manufacturer to create a binding. Unless its speaks a more common specification like the PylonTech CAN specification.

Another way would be to 'listen in' on the communication of a running system (Skybox and supported BMS) and try to reverse engineer the protocol specification. For that you would need a CAN device hooked up on the CAN bus of the system, monitor the communication and protocol the current values (like SOC, current, voltage, etc.).

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

I have that 2 Channel Can hat for my RPi. Can I just plug in to the inverter and capture the traffic?
The supported batteries are in my top post ^^
The batteries I have are sungold power. I think it uses the same bms as EG4 and jaikiper.

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

Yes, you can connect the 2CH CAN hat to the inverter and use candump to capture the traffic.

If you can provide CAN or RS485 or ModBus specifications for your inverter or supported batteries it would make life easier. Maybe inquire at the manufacturer (inverter or any supported battery manufacturer) with your exact inverter model and be persistent that you cannot use it without the CAN/RS485/ModBus communication specification.

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

My batteries use a PACE bms. Sungold power

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

Hi Carson,
can you configure your PACE BMS to use the Pylontech CAN protocol?
I've read somewhere that you can configure it to use it?

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

getting somewhere, can bus needed to be set to 500kbps
image
getting this error, so it looks like they are talking just not the same language.
I have the config set to PYLON_CAN on the Pi and BMS Can bus protocol is set to PYLON on the battery
would a candump help ?

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

candump looks more or less right I think? 35E shows LEOCH as the manufacturer ID. That looks like the frames have correct ids but data is wonky/different from PYLON ?

can0 351 [8] 00110100 00000010 11010000 00000111 10100000 00001111 10110000 00000001 '4.......'
can0 355 [8] 00110011 00000000 01100100 00000000 00000000 00000000 00000000 00000000 '3.d.....'
can0 356 [8] 11110010 00010100 10101000 00000010 11110000 00000000 00000000 00000000 '........'
can0 35C [8] 11000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 '........'
can0 35E [8] 01001100 01000101 01001111 01000011 01001000 00100000 00100000 00100000 'LEOCH '
can0 359 [8] 00000000 00000000 00000000 00000000 00000100 01010000 01001110 00000000 '.....PN.'

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

is the endianess
right? 356 Should be Pack Voltage so 11110010 00010100 is F214 which looks like garbage (-3,564) but 14F2 = 5362 * .01 which would be 53.62 which seems about right

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

ok, cool - that's definitely the Pylon protocol!
Could you do the candump in standard hex format next time please. Binary is a bit of a hassle reading and converting ;)

So for command:
0x351:
Max voltage = 56.4V
Charge limit = 200.0A
Discharge limit = 400.0A
Min voltage = 43.2V

0x355:
SOC: 51%
SOH: 100%

0x356:
Pack voltage: 53.62V
Pack current: 6.8A
Avg Cell Temp: 24.0C
etc.

So that looks all good!

I've added a fix for the SOC and SOH and more logging, so please do a Clean install with the Configurator.
Could you also set the log-level set to debug and provide the log file, then I can see what the application is getting.

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

can0 35E [8] 4C 45 4F 43 48 20 20 20 'LEOCH '
can0 359 [8] 00 00 00 00 04 50 4E 00 '.....PN.'
can0 351 [8] 34 02 D0 07 A0 0F B0 01 '4.......'
can0 355 [8] 2A 00 64 00 00 00 00 00 '.d.....'
can0 356 [8] 63 14 0F FF EB 00 00 00 'c.......'
can0 35C [8] C0 00 00 00 00 00 00 00 '........'
can0 35E [8] 4C 45 4F 43 48 20 20 20 'LEOCH '
can0 359 [8] 00 00 00 00 04 50 4E 00 '.....PN.'
can0 351 [8] 34 02 D0 07 A0 0F B0 01 '4.......'
can0 355 [8] 2A 00 64 00 00 00 00 00 '
.d.....'
can0 356 [8] 63 14 18 FF EB 00 00 00 'c.......'
can0 35C [8] C0 00 00 00 00 00 00 00 '........'
can0 35E [8] 4C 45 4F 43 48 20 20 20 'LEOCH '
can0 359 [8] 00 00 00 00 04 50 4E 00 '.....PN.'
can0 351 [8] 34 02 D0 07 A0 0F B0 01 '4.......'
can0 355 [8] 2A 00 64 00 00 00 00 00 '.d.....'
can0 356 [8] 63 14 3D FF EB 00 00 00 'c.=.....'
can0 35C [8] C0 00 00 00 00 00 00 00 '........'
can0 35E [8] 4C 45 4F 43 48 20 20 20 'LEOCH '
can0 359 [8] 00 00 00 00 04 50 4E 00 '.....PN.'
can0 351 [8] 34 02 D0 07 A0 0F B0 01 '4.......'
can0 355 [8] 2A 00 64 00 00 00 00 00 '
.d.....'
can0 356 [8] 63 14 35 FF EB 00 00 00 'c.5.....'
can0 35C [8] C0 00 00 00 00 00 00 00 '........'

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

Ok, so its the short Pylon protocol version.

What does the application do? It should read values now from the BMS.

Could you please update to the lastest version (Clean install in Configurator) and attach the log file (please with debug log-level set).

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

Hi,
I wrote some tests with the candump data and it is read and processed correctly.
I think the problem you might have lies in the communication between your webserver and the application's MQTT broker.

Could you update your application and send me the BMS-to-Inverter.log and the BMS-to-Inverter_Webserver.log from the installations log folder and if possible a screenshot of your browsers debug console output.

Please start the webserver sepeartely after the application is logging some decent data.

First start the application from your installation folder (in terminal 1):

java -DconfigFile=config/config.properties -Dlog4j2.configurationFile=file:config/log4j2.xml -jar lib/bms-to-inverter-main-0.0.1-SNAPSHOT.jar

Then wait until it reads data from the BMS and after that start the webserver (in terminal 2):

java -jar lib/webserver-0.0.1-SNAPSHOT.jar --spring.config.location=file:config/config.properties

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

just running the application it looks like its reading garbage from the can bus.

2024-03-21 11:46:47.406 | INFO | Thread-3 | verter.BmsToInverter:190 | Sending to inverter NONE on can1...
2024-03-21 11:46:47.407 | DEBUG | Thread-3 | verter.core.Inverter:79 | Inverter received: Buffer (HEX): [null]

2024-03-21 11:46:48.144 | INFO | Thread-2 | verter.BmsToInverter:164 | Reading BMS #0 PYLON_CAN on can0...
2024-03-21 11:46:48.145 | INFO | Thread-2 | stoinverter.core.BMS:120 | ---------------------------------> Thread 43
2024-03-21 11:46:48.145 | DEBUG | Thread-2 | ocol.can.JavaCANPort:66 | CAN frame read...
2024-03-21 11:46:48.146 | DEBUG | Thread-2 | ocol.can.JavaCANPort:72 | CAN read frame Buffer (HEX): [0x56, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9E, 0x14, 0xF9, 0xFE, 0xF7, 0x00, 0x00, 0x00]

2024-03-21 11:46:48.147 | DEBUG | Thread-2 | PylonBmsCANProcessor:98 | Pack V Pack A Avg Temp
20.48 0.0 -2506.8
2024-03-21 11:46:48.147 | INFO | Thread-2 | verter.BmsToInverter:216 |
BMS SOC V A CellMinV CellMaxV CellDiff
#1 204.8 204.8 0.0 0.0(#0) 0.0(#0) 0.0

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

Pylon protocol is little endian, seems like you're reading big endian but the BMS-to-inverter.log the byte buffer it is displaying is entirely different from what candump outputs

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

BMS-to-Inverter.log

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

BMS-to-Inverter_Webserver.log

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

Hi,
I just committed a fix. Could you please do a Clean install and update your installation.
Let's see what we get :)

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

BMS-to-Inverter.log

New log. Looks somewhat closer but still not right

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

your change to little endian for the byte buffer looks good but the actual data that's in the buffer is out of order or maybe padded somehow? the first 2 bytes look correct e.g.
CAN read frame Buffer (HEX): [0x55, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00]

candump reads right, the values in your buffer are the same but there's all those extra 0 bytes.
355 [8] 1E 00 64 00 00 00 00 00

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

CAN read frame Buffer (HEX): [0x55, 0x03, | 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, |0x1E, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00]

I think the 6 bytes after the ID is the DLC and other parts of the can arbitration field

from bms-to-inverter.

ai-republic avatar ai-republic commented on August 22, 2024

yes, that is just the extended CAN frame 4 byte frame id, length and flags(3 bytes after length), then comes the 8 byte data.
But good point, forgot to skip the next 4 bytes before reading the data.
I fixed it now - this will give the correct values now! :)

from bms-to-inverter.

carsonfee avatar carsonfee commented on August 22, 2024

That fixed it!

now to figure out if the skybox can actually give any useful output from a candump

from bms-to-inverter.

Related Issues (19)

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.