XNACS07-GB2015 Dual-gun Charger Panel
Monitor and control an XNACS07-GB2015 Dual-gun AC charger from one card. Each gun shows voltage, current, power, energy, control pilot and PWM with the time of every reading, plus its charge state, stop reason, holster and output switch. Gun and board temperatures and the LTE signal sit around them, with a live online status. Buttons send switch_ON, switchOFF, all_ONOFF, pwm_gl_EN / pwm_gr_EN, beepTIMES and to_reload as two-way RPC and show the charger’s reply.
Who it’s for
The XNACS07-GB2015 Dual-gun Charger Panel is for people who run XNACS07-GB2015 Dual-gun AC chargers on ThingsBoard: site operators, installers and support staff. They want to see on one screen what each gun is doing right now and whether the charger is online, and to control the guns from the dashboard without opening the device’s telemetry tab.
What it does
The panel splits the charger into its two guns. When Gun L charges a car, its card shows about 230 V, 15.6 A and 3.6 kW and counts the session energy in kWh. Gun R at the same moment shows its state, its last stop reason, whether the gun sits in its holster, and whether its output is on.
- Each gun’s readings. Voltage, current, power, energy, control pilot and PWM, each with the time of its last reading. The widget converts the charger’s raw units: mA to A, Wh to kWh, and W to kW from 1000 W.
- Raw codes are shown. Where the charger reports a code, the panel shows the code next to the name, for example a charge state of
Charging (6), a stop reason ofUnplugged (3)and a control-pilot reading of6.0 V · raw 60. The tables below give every code, its meaning and the scale. - Charger status. A chip shows Online, Offline since a time, or Status unknown, and updates live. While the charger is offline the control buttons are disabled.
- Charger health. Gun and board temperatures, the LTE signal, the line-to-ground voltage and the emergency-stop input, when the charger reports them.
- Switch on and off. Each gun has a Switch on / Switch off button that sends
switch_ONorswitchOFFas a two-way RPC with the gun number. The panel waits for the reply and shows the result, or the error, at the bottom of the card. - PWM control. The PWM row on each gun card sends
pwm_gl_ENorpwm_gr_ENin 0.1 % units. The presets are set in the widget settings; Off sends 999 and closes the control pilot. - Commands. All on (
all_ONOFF 1), All off (all_ONOFF 0), Beep (beepTIMES 3) and Refresh (to_reload 30) sit below the gun cards. - Scope. The panel shows one charger and its latest values. It does not draw charts or session history. It does not show location, firmware or boot information; the device page is the place for those fields.
Requirements
The panel is built for the XNACS07-GB2015 Dual-gun AC EV Charger. Connect the charger to ThingsBoard first, so its telemetry and attributes reach the device the panel shows.
How to set up
Data keys
The panel needs one datasource: the charger device. Its keys come pre-filled with the charger’s own names and readable labels, such as Gun L · Voltage, so picking the charger’s alias is the whole setup for this firmware. Each key has a Shows as setting, plus a Gun setting for per-gun values. If your device reports a value under another name, replace the key and set its Shows as. A key left on From key name is matched by the charger’s own key name. A missing key shows a dash in its place, and the rest of the panel keeps working.
- Per-gun telemetry —
Timeseries, one set for each gun, ending inLorR:_voltage(V),_cur(mA),_pow(W),_energy(Wh),_state,_stp,_swt,_cp(positive half, 0.1 V per count),_cz(negative half, 0.1 V per count),_pwm(0.1 % per count),_holster(1 seated, 0 removed) and_tmp(°C). A gun with no_stateshows No data._swtdrives the output text and the Switch on / Switch off button. - Charger telemetry —
Timeseries:_tmpB(°C),_lteSign,_volgnd(V) and_stopkey(0 or 1). - Online —
active, aServerattribute that ThingsBoard maintains, read only. Without it the chip shows Status unknown and the buttons stay enabled. If your server stores activity as telemetry, change this key’s type toTimeseries. - Connection times —
lastConnectTime,lastDisconnectTime,Serverattributes from ThingsBoard, read only. They give the times in the status chip.
Codes and units
The panel shows the raw code next to every name, so each reading can be checked against the charger’s own values. The codes, names and scales below are the ones in the charger’s public specification: Telemetry (section 5), Remote commands (section 6), PWM (section 7) and Stop reasons (section 8) at https://www.mosf.cn/spec/xn-2gun-en.html. The same codes and names are listed in the XNACS07-GB2015 device package.
Charge state, _stateL / _stateR:
| Raw code | Name (as published) |
|---|---|
| 0 | Idle |
| 1 | Gun inserted, waiting for the vehicle |
| 2 | Control-pilot handshake |
| 3 | Ready to charge |
| 4 | Vehicle ready |
| 5 | Contactor closing |
| 6 | Charging |
| 7 | Stopping |
| 8 | Output off |
| 9 | Reset |
Stop reason, _stpL / _stpR:
| Raw code | Panel label | Meaning |
|---|---|---|
| 0 | No stop | No stop recorded |
| 3 | Unplugged | Gun removed during the charge |
| 4 | Normal stop | Stopped by the gun button or a server time-out (off_TMOUT) |
| 5 | No credit | Prepaid balance exhausted (off_NOMEY) |
| 6 | Over-temp, overcurrent or voltage drop | Safety limit reached |
| 7 | RCD, CP or ground fault | Control pilot lost, ground fault or residual-current test failed |
| 9 | Remote off | Stopped from the dashboard (switchOFF) |
Control pilot, _cpL / _cpR and _czL / _czR: the positive and negative half-wave readings in 0.1 V per count. Raw 60 is 6.0 V, raw 120 is 12.0 V. The panel shows both, for example 6.0 V · raw 60.
PWM, _pwmL / _pwmR: the duty in 0.1 % per count, and 0.06 A per percent. Raw 266 is 26.6 % and about 16 A. Raw 1–990 is a valid duty; a value above 990 (the panel sends 999) closes the output.
Holster, _holsterL / _holsterR: 1 = Seated, the gun rests in its holster on the charger; 0 = Out, the gun is lifted off. The panel shows Seated (1) or Out (0).
Other raw values the panel reads: _swt 1 = output on, 0 = output off; _stopkey 1 = the emergency-stop input is active; _volgnd line-to-ground voltage in V; _cur in mA; _energy in Wh; _pow in W.
Commands
The panel sends these two-way RPCs to the charger with params.value:
| Button | Method | params.value |
|---|---|---|
| Switch on, Gun L / Gun R | switch_ON |
0 / 1 |
| Switch off, Gun L / Gun R | switchOFF |
0 / 1 |
| All on | all_ONOFF |
1 |
| All off | all_ONOFF |
0 |
| PWM 8 A, 10 A, 16 A, 24 A, 32 A | pwm_gl_EN / pwm_gr_EN |
duty in 0.1 %, for example 133 for 8 A |
| PWM Off | pwm_gl_EN / pwm_gr_EN |
999 |
| Beep | beepTIMES |
3 |
| Refresh | to_reload |
30 |
The device page and the product specification describe the same commands, including the ones the panel does not send.
Settings
- Request timeout, s — 8 by default. How long the panel waits for the charger to answer a command before it reports a timeout.
- PWM current presets, A — comma-separated amps for the PWM buttons on each gun card, 1 to 32. Defaults to
8,10,16,24,32. The charger is rated 32 A maximum. - Show PWM buttons — show or hide the PWM row on each gun card.
How to customize
- To rename the panel — change the widget title. It defaults to “XNACS07-GB2015 Dual-gun Charger Panel”.
- To hide the PWM row — turn off Show PWM buttons in the widget settings.
Tips
- Before you pick a device, the panel shows a demo charger, so you can check the layout on the dashboard first. A demo command changes the demo values and sends nothing.
Share Your Widget with the Community
Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.