Device health card
Device status on one card: battery level, signal strength from RSSI or dBm, and last-seen time, with low, critical and stale indicators when a device stops reporting.
Who it’s for
Fleet and asset operators who want one compact card summarizing a device’s health - battery, signal, and last-seen - instead of stacking three separate widgets on every device dashboard.
What it does
Shows battery level (with low / critical coloring and optional charging state), signal strength (bars from an RSSI or percent value) and when the device was last seen, for one bound entity, under a header carrying the device name and a one-word status chip. The signal tier and the SNR reading sit on a footer line beneath the rows, which keeps every row label short enough to stay readable at any card width. Unlike the built-in Battery level and Signal strength widgets, which each show a single metric, this combines them into one device-health card and adds a last-seen readout and a stale indicator. It renders as a clean bordered card sized to sit alongside the platform’s built-in cards. A card with nothing to draw says which of the four reasons applies - no keys bound, keys bound but never reported, keys reporting nothing this card can draw, or every section switched off - rather than showing a placeholder reading, and a card with no data source configured says so and offers a retry.
How to set up
Bind a single device - the card shows one entity - and add the telemetry keys you track. Out of the box it reads batteryLevel for the battery percent, charging for the optional charging flag, rssi for the signal value, and snr for the optional signal-to-noise ratio. If your device reports different names, override them in Battery level key, Charging key, Signal key and SNR key.
Last seen needs no key of its own: it uses the newest timestamp among the keys you bound. Name a Last-activity timestamp key only if you want it read from an explicit key instead; that key must hold a millisecond epoch value.
The widget accepts at most five data keys, so battery, charging, signal, SNR and an explicit last-activity key all fit together. Hide any row you do not use with the Show toggles, and pick the radio preset so the signal bars use thresholds that suit your radio.
How to customize
The dialog hides the controls that would do nothing. Battery level key, Charging key, both thresholds and all three colours appear only while Show battery row is on. Signal key, Show SNR, Radio preset, Signal mode, Signal unit override and the three cut-offs appear only while Show signal row is on, and SNR key needs both that and Show SNR, since the SNR reading belongs to the signal section. Last-activity timestamp key appears only while Show last seen row is on. Everything else - the no-data window, the status chip, the auto-scale switch and the three font controls - is always shown, because it applies whatever else is turned off.
- To label the card - the card heads itself with the bound device’s name automatically; it shows one device only.
- To pick which rows show - toggle Show battery row, Show signal row and Show last seen row. Show SNR is separate: it controls the
SNR x dBreading on the footer line under the rows, not the signal row itself. - To show or hide the status chip - Show status chip (on by default) puts one word in the top right corner: OK, Low or Crit from the battery reading, or No data 3h - the words plus how long the silence has lasted - once the card has gone quiet. It reuses the thresholds and the colour the battery row already computed, so the chip and the row underneath it can never disagree. Turn it off to leave the header showing only the device name.
- To set battery thresholds - Low below % (default 50) and Critical below % (default 20). The battery turns amber at or below the first and red at or below the second; Healthy color, Low color and Critical color set the three fills. The status chip reads the same two thresholds, so moving them moves the chip with it.
- To read signal correctly - Signal mode defaults to Auto detect, which treats a negative value as dBm and a zero-or-positive value as a percent; force it with dBm or Percent. In dBm mode the Radio preset sets the Excellent / Good / Fair cut-offs: LoRaWAN -85 / -105 / -118, Cellular -75 / -90 / -105, Wi-Fi -55 / -67 / -80. In percent mode those default to 80 / 60 / 40 and the preset does not apply. Override any of the three with Excellent at, Good at and Fair at, and change the printed unit with Signal unit override. The tier word itself is printed on the footer line rather than beside the value.
- To flag a silent device - Dim the card after no data for ships at 1440 minutes, one day, so a device that has stopped reporting becomes visible without configuring anything, while a LoRaWAN or NB-IoT sensor that reports every few hours is not dimmed for working normally. Set it a little longer than your own reporting interval, so a healthy device is never dimmed and a silent one always is. Set it to 0 to switch the dimming off entirely and leave the last-seen row purely informational. A dimmed card is not a disabled card: every reading stays legible, and the status chip replaces the battery state with No data and how long the silence has lasted, so the card says in words why it looks different.
- To fit the card to its tile - Auto-scale text and spacing to card size is on by default and sizes the card from its own box. Text steps to 90% below 200 px wide or 150 px tall and to 125% on a tile at least 300 x 200. The vertical rhythm - the card padding, the gaps between header, rows and footer, the gap between the rows, the space above the footer rule - tightens to 60% below 150 px tall and to 35% below 125 px, which is what lets all three rows and the footer fit a 110 px cell. Nothing is added or removed at any size; only how big it is changes. Switch it off to pin every size to one fixed scale, which is what you want if you have set your own font sizes and expect them obeyed literally - though an explicit size in the three controls below wins over the auto-scale either way.
- To restyle the text - Device name text, Value text and Row label text are font controls; size, family, weight and style each apply to the rendered card.
- As the card narrows - the row labels stay. There is no size at which a reading, a label or the footer is removed; resizing changes type size and spacing only. A label shortens with an ellipsis only once the card is squeezed below about 215 px, and exactly where depends on how long the readings beside it are - narrower in every case than a 4 x 3 cell, which measures roughly 250 px on a standard dashboard grid. Every row still carries a tooltip with its full text, including the charging state, and so do the device name and the status chip.
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.