Has anyone played with getting data out of the ABMS either via RS485 or via Wifi module web server queries to home assistant.
ideally, I would like to get realtime battery health and individual cell voltages to be displayed on a dashboard realtime.
Has anyone played around with this? is there a way of getting data out of wifi module?
Sure, you can query the Wifi module or use the RS485. The RS485 protocol is covered in the manual.
I have a request in to enginerring for a list of http variables available and will post it when I can.
@Rick awesome, do you have any details on how and what to query the wifi module?
is there a list of URL syntax? i just want the individual cells, temp, amps etc
Here is something that may help. I havent had a chance to check it out myself yet.
## PLACEHOLDERS
Use __BACKTICK__ to use placeholders that are listed below.
You can type in a __BACKTICK__ ( __\`__ ) by pressing __ALT__ + __9__ + __6__
All HTML pages, except `login.html` go through this processor that replaces placeholders.
### Available placeholders
| Placeholder | Value |
|-------------------|---------------------------------------------------|
| WIFI_NAME | WiFi SSID |
| BMS_NAME | BMS's serial number |
| HW_VER | BMS's hardware version |
| SW_VER | BMS's software version |
| C_HW_V | WiFi's hardware version |
| C_SW_V | WiFi's software version |
| LOCK_STATUS | Communciation locked |
| FAHR | Temperature selection |
| LOGIN_USER | Login page username |
| LOGIN_EN | Login page enabled/disabled |
| WIFI_MODE | WiFi mode (STA/AP) |
| WIFI_MAC | Device's MAC address |
| SIGNAL | Device's signal strength |
| WIFI_IP | Set IP |
| WIFI_GATEWAY | Set Gateway |
| WIFI_SUBNET | Set subnet |
| SD_CARD_PROBLEM | HTML banner if there is a problem with SD card |
| INTERVAL | Logging interval text |
| SD_CARD_TOTAL | Total SD card space |
| SD_CARD_REMAINING | Remaining SD card space |
| SD_CARD_USED | Used SD card space |
| SD_CARD_TIME_LEFT | Time left to fill up the card |
| LOGGED_IN | Logged in && login page enabled |
## Getting data
All data in requests and logs is in JSON format. You can decode it into JavaScript by using `parseJSON(data);`
You can get data by making a request on `/get_data` to get system settings and `/cell` to get system status.
Also there are 2 web sockets running, one for system status and the other for system settings, both are being sent every second.
## JSON format
```json
http://192.168.1.165/cell
"bms_array": {
"master": {
"time_remaining": Time remaining string
"st_naprav": number of connected devices
"time": time (if BMS has RTC)
"date": date (if BMS has RTC)
"mincell": lowest cell voltage
"maxcell": highest cell voltage
"ibat": battery current
"tmax": max temperature
"vbat": battery voltage
"soc":SOC
"soh": SOH
"erro": {
"present": 0, if error present
"addr": 1, address of the device
"st": 0, error number
"con_st": 0 position of error
},
"error": error msg
},
"slave": { all connected slaves' data
"0": {
"address": address of bms,
"st_temp": number of temperature sensors,
"temp_bms": temperature of the bms,
"st_celic": number of cells,
"temp": sensor temperatures,
"res": cell impedances,
"nap": cell voltages
}
}
}
```
```
Nice, JSON interface for http://x.x.x.x/cell and http://x.x.x.x/get_data are really useful for quickly inspecting configuration and status.
Hey Lure, if you could share a bit of your code or a github link to help others get started, that would be awesome!!
after a lot of head-scratching I finally got this: