This documentation is still very early and not complete nor well written.
logo

Introduction

Gouach batteries have been designed to be connected. This allows monitoring, control, and alerting.
The batteries can be monitored using either a Bluetooth connection (from the mobile “Gouach Clients” app), or through our dashboard and API (once the batteries have been connected to a Wifi network).
Once connected, the batteries can be controlled, with over-the-air (OTA) firmware updates, by sending commands, or setting the debug mode. They can also be monitored, looking at their last known state, and their measurements history. Finally, they will automatically send alerts if an issue arises (temperature, humidity, errors) that can be sent to any HTTPS webhook endpoint you provide.
This page will go into more details about each of these use-cases, like updating hundreds of your batteries at once over-the-air as shown below:
Image without caption
Using the dashboard, you are able to select a subset of batteries and launch an OTA update with a single click.
Image without caption

Get a Gouach account and the Gouach Clients app

In order to access the connectivity features, you will need a Gouach client account. The process for now is manual. You are only able to access batteries that are attributed to you as a client.
In order to get an account, you should send us an email with your details (work email, which Gouach client you belong to), and we will create an account for you.
You should then download the “Gouach Clients” app for your platform (iOS or Android), or access the web platform at https://clients.gouach.com.
To set your password, simply type your email address in the login screen (once your account has been created), and click the “Forgot password” link. An email will be sent with a password reset link (check your spam folder).
Image without caption

Connect to your battery using BLE

Image without caption
Using the app (or webapp with modern browsers) you can connect to your battery using Bluetooth.
This allows you to view the current battery state (cell voltages, global voltage, state of charge, temperatures, etc).
Simply click on the “Bluetooth” icon at the top, and allow Bluetooth permissions. A “scanning” screen will be shown with detected devices.
By clicking on one of the devices, you can connect to it and see its information.

Connect your battery to a Wifi network

In order for your device to send data to our backend servers and store it to visualize it over time and get alerts, it needs to be connected to wifi.
There are two ways to do this: either by setting a wifi hotspot that has an SSID and password that matches a given pattern (hardcoded in our BMSes), or by adding a custom wifi SSID and password manually (done on a battery-per-battery basis).
You can check that the battery is properly connected if you connect to it through BLE, and see that the “Wifi connection” information is updated with your current wifi SSID. Additionally, once connected, it should start sending data to the backend, so when viewing the battery data you should see some recent data.

Universal wifis

If you have a large battery fleet and do not want to setup manually each battery, you can setup a Wifi hotspot (for instance in your warehouse) that matches the “Gouach-XXX YYY” format, with password g0u4chm41nt3n4nc3.
In this case, the battery will automatically connect to it. In addition, our backend will detect such connections, and update the “location tag” of the battery to match “XXX YYY”. This allows you for instance to know what is the last warehouse where your battery was seen.
For instance, if your company is called “BikeForce” and you have two warehouses around Houston, you could set the respective wifis to “Gouach-BF Houston 1” and “Gouach-BF Houston 2”, and your batteries will get a “location tag” of “BF Houston 1” and “BF Houston 2” each time they connect to those wifis.

Custom wifi

If you want to set a custom wifi for a given battery, you can do so by connecting to it with Bluetooth of the app, and using the “Add wifi” functionality in the Bluetooth screen.

Monitor and update your battery fleet on the app / dashboard

Once batteries are connected to the wifi, they will start sending and receiving regularly data to and from our backend. This allows you to monitor them, update them, and get alerts.
This section will explain what kind of data is gathered, and how you can access and update it.
You can view batteries individually (battery page) or in groups (dashboard page), either on the “Gouach Clients” app or on the https://clients.gouach.com website.

List batteries

Once you are logged in, you can access a list of batteries, search them by their automated “id” or their manually-set “id tag” (that you control).
Image without caption

View a battery

By clicking on a battery (or going to https://clients.gouach.com/v/battery_id) you can view the backend informations on the battery, as well as its latest state and historical measurements.
This page contains multiple tabs (displayed at the bottom), each type providing a different type of informations.

Battery tab

Image without caption
The initial tab, the “Battery” tab, contains at the top an overview of recent battery data, encoded as a graph for each day of each year week (W1 to W51 of each year).
You can scroll through the weeks by clicking on the arrows, and display more informations on the graph by clicking on them, or refresh the corresponding data by clicking on the week number link. More information on these graphs in the “Dashboard” section below.
A “Bluetooth connect” button is available at the top, which is useful when you have multiple batteries around you, but you want to quickly and easily connect to this particular one.
Different informations are then displayed on the battery:
  • It’s unique ID in the tab title (”G997”),
  • a manually set (and editable) “id tag” which allows you to give a more meaningful name (”POBO1-72-6” in this case),
  • a “location tag” which allows you to provide optional location data on the battery (for instance if it’s on a bike, or in a warehouse). This location tag can be automatically set by our backend if you provide us with location data,
  • a status, which can be one of “operating”, “alert”, “in_maintenance”, “out_of_order” or “discarded”,
  • a firmware, which can be updated (by clicking on the edit button)
  • its client id, allowing only the corresponding client to access its data,
  • and an optional description, which can be convenient to set in some situations when observing or repairing the battery, in addition to notes (in the “Notes” tab)
Below is the history of all the statuses of the battery, as a reference, as well as the “End of line tests” results for the battery.

Debug tab

Image without caption
The “Debug” tab provides you with the latest known battery state (not necessarily the current one, but the latest which was sent to the backend, usually every 10 minutes while the battery is running). The last communication time represents when the battery has last connected to the backend, and the Core State time represents the timestamp corresponding to the following measurements.
It shows a summary of various battery measurements, like the state of charge, the cell voltages (with cells having a meaningful imbalance highlighted in red), temperatures, firmware, etc.
At the bottom of the screen, a “Commands” panel allows you to send commands to the battery, to flash its lights or set its state to “debug” (in which case it will send debug informations over MQTT)
Image without caption
Finally, the latest known MQTT messages received or sent by the batteries are displayed below (they are mostly useful in debug mode)

Data history tab

Image without caption
The data history screen allows you to query for past historical data, which can be useful when observing or repairing a battery. You can select a date-time range of observation, and zoom on the data by either using the zoom buttons, or dragging on the top graph.
The top graph is a “summary representation” of the battery data, similar to that of the “Battery” tab, for the selected timerange.
Below, you can see individual measurements. You can download the data as JSON, or select different graphs to be displayed or hidden. Dragging on the graphs will scroll them.

Notes tab

Finally the notes tab allows you to leave time-stamped notes on the battery object, for later reference.

Dashboard view

Image without caption
The “Dashboard” view is accessible with the Dashboard button of the side menu. It will display an aggregated list of all your batteries, that you can search and filter.

Summary graphs

Each graph displays a summary of recorded battery events for that day, organized in ISO year weeks. Colors encode the battery state (idle, charging, discharging, error), and height represents the battery state of charge, while the horizontal position represent the time of day.
If a battery has an error, a red outline will be displayed, and hovering on it, or clicking on it will show the corresponding errors.
Image without caption
The yellow bar below the graphs display a graphical representation of the maximal temperature of the cells for the day.
Clicking on a graph allows you to get a pop-up frame with the historical data for the day, similar to what you would get on the “Data history” tab of the battery.

Searching and filtering

You can search and filter batteries using the top dropdown lists and text fields. Multiple attributes are searchable, like the id, id tag, location tag, status, etc.
Searching and filtering allows you to select some batteries for batch updates more easily.
Image without caption

Batch battery updates

If you select multiple batteries, by clicking on the checkbox next to them, the “Update” button at the bottom will allow you to apply batch updates (location tag, firmware, status, etc).
This allows you to update the firmware of an entire battery fleet very easily.

Get battery informations through the API

If you need programmatic access to the latest battery informations for your backend, you can use our API.
For this, you first need to contact us to create a Service Account and get an Authorization token. Using this token in the “Authorization” headers of your API requests will allow you to access your data.
You can then store this token in a variable and use it to query our API like so:
shell
curl -H "Authorization: Bearer <YOUR_TOKEN>" \ "https://api.gouach.com/v1/clients/batteries/report"
This will return paginated data, in the following format
json
{ "success": true, "data": { "count": number_of_items, "pages": total_number_of_pages, "startAfterId": id_of_next_battery, "pageItems": [...list of items in the current page] } }
You can get successive pages by adding ?startAfterId=<id_of_next_battery> in the query and doing it again.
The items have the following schema:
typescript
{ id: "G137", id_tag: "Some id tag", status: "operating", created_at: /*battery creation timestamp*/, last_known_location: {...}, last_communication_at: /*last communication timestamp*/, last_state_timestamp: /* last known state timestamp */, last_state: { battery_current: ..., battery_voltage: ..., battery_output_voltage: ..., cell_balancing_times: [..., ], cell_voltages: [..., ], errors: [..., ], fsm_state: ..., state_of_charge: ..., min_temp_cells: ..., max_temp_cells: ..., min_temp_bms: ..., max_temp_bms: ..., temperatures: { cells_back: ..., cells_front: ..., bms_ic: ..., bms_mosfet: ..., bms_shunt: ..., }, }, bms_id: "...", }; });

Get battery alerts through a webhook

In order to be alerted in case your battery has an alert, you need to provide us with an HTTPs URL to which we will send POST requests with the alert data. For now, this process is manual, and you need to send us an email.
The alerts will have the following format:
typescript
export interface ClientAlert { version: number; battery_id: string; created_at: number; source: string; triggers: AlertTrigger[]; description: string; // description message metadata: { gouach_battery_model: string; id_tag: string; // empty when unknown state_of_charge: number; // -1 when unknown fsm_state: string; // empty when unknown latest_state_update_timestamp: number; last_known_location: BatteryLastKnownLocation; }; }
The “version” corresponds to the alert format version (in case it later changes). The “created_at” is the ISO timestamp of the alert creation. The “source” is the alert source (for now the backend automated alerts), and the triggers is the description of all the events that generated an alert. The metadata is sent, containing the latest known data on the battery at the time when the alert was created.

Alert state detection

Each time a battery sends data to the backend, we run an alert detection on it. The alerts can come from different measurements, that will be explained below. Each type of measurement can generate a trigger of a certain type (for instance “voltage:imbalance”), and if multiple triggers of the same type happen during an analysis of a batch of recently sent events, only the last such trigger of that type will be sent.

Voltage alert

We detect an alert if there is a voltage imbalance above a given threshold, between the minimal and the maximal voltage of a cell. For now the threshold is set to 0.2V (absolute).
NOTE: This alert is SKIPPED if the battery has a “SCD” (short-circuit in discharge) error.

Software alert

We detect a software alert if the battery is in the “ENVIF” (environment initialization failure) or “ICIF” (battery IC initialization failure) error modes.

Temperature alert

We detect a temperature alert in one of the following cases (we say that we have a “significant charge current” if the charge current is above 300 mA):
  • there is a significant charge current and the cell temperatures are strictly less than 0°C
  • there is a significant charge current and the cell temperatures are strictly above 43°C
  • at any time, if the cell temperatures are strictly above 60°C
  • at any time, if cells or BMS temperatures are strictly below -20°C
  • at any time, if there is a difference of temperature between cells strictly above 10°C
  • at any time, if the BMS temperature is strictly above 75°C

References

We write here a reference of the values of the battery possible FSM states and errors.

Battery FSM states

The battery state can be:
  • INIT: initialization
  • IDLE: idle state
  • DISCHARGE: battery used, in discharge
  • CHARGE: battery is in charge
  • ERROR: a major error state
  • SHUTDOWN: battery is shutting down

Battery errors

The battery errors can be a list of the following values:
  • SCD: short-circuit
  • OCD: over-current in discharge
  • OCC: over-current in charge
  • UV: cell under-voltage
  • OV: cell over-voltage
  • IUT: internal under-temperature
  • IOT: internal over-temperature
  • COTC: cells over-temperature in charge
  • CUTC: cells under-temperature in charge
  • COTD: cells over-temperature in discharge
  • CUTD: cells under-temperature in discharge
  • FOT: fet over-temperature
  • BQ_PF: BQ permanent failure
  • ENVIF: environment initialization failure
  • ICIF: battery IC initialization failure
  • SCDL: short-circuit in discharge latched
  • SUV: safety under-voltage
  • CUDEP: copper deposit