Skip to content

34: Device Status ​

Read battery, network and firmware status, or subscribe to later status updates. The fields returned depend on the target device and available readings; a response may contain only firmware information. Do not treat an omitted field as a zero value.

Documented Method (5) values GET, SUBSCRIBE, UNSUBSCRIBE

Shared optional header · Message ID (1) can identify a request, response or publication. A response's own ID is separate from Response To (3). Message ID and reply rules apply unless an interaction states an exception.

Message fields

Fields specific to Device Status. Operation sections below explain when each field is used.

FieldTypeDescriptionExample
BatteryField 1uint8

Battery level as a percentage.

Signal StrengthField 2uint8

Signal strength as a percentage.

ModeField 3uint8

Device mode.

  • 0 · Sleep
  • 1 · Awake
0 · SleepExample
Network typeField 4uint8

Current network.

  • 0 · No network
  • 2 · GSM (2G)
  • 3 · WCDMA (3G)
  • 4 · LTE (4G)
0 · No networkExample
Network MNCField 5uint16

MNC of the currently connected network. Can be 0 if not connected. Network code reference: https://mcc-mnc.net/

Network MCCField 6uint16

MCC of the currently connected network. Can be 0 if not connected. Network code reference: https://mcc-mnc.net/

Firmware VersionField 7uint32

Firmware version Can be a literal integer, or an encoded version number. Lightbug devices use a single integer for firmware version, e.g. 2287. ESP devices encode a semver version into an int, MAJOR*10000 + MINOR*100 + PATCH. 0.18.0 becomes 1800 and 1.1.1 becomes 10101.

Device TypeField 10uint8

Type of device, relates to the SN prefix. For devices released from 2025 onwards, this is documented on the device specification page.

Battery ResistanceField 12uint16

Estimated effective DC resistance of the whole battery pack, including protection circuitry and connections, in milliohms. This can be a configured starting estimate or a saved or newly learned value, not necessarily a fresh measurement. Available on supported devices and builds, including Viper6 firmware 2763. Omitted when unavailable.

Battery Resistance TemperatureField 13int16

Temperature at the latest battery resistance measurement, in centi-degrees Celsius (divide by 100 for degrees Celsius, except for declared sentinels). On RH2 this is the fuel gauge's internal temperature; Viper6 with an INA236 does not provide this temperature. Included with field 12 when battery diagnostics are available; otherwise the field may be omitted.

Sentinel values (raw, without conversion or units):
  • -32768: Unavailable: No temperature was available at the resistance measurement.
Lifetime Battery Charge ReceivedField 14float32

Cumulative charge received since tracking began or was reset, in amp-hours, including partial charges. This is not the current remaining charge or rated battery capacity. Divide by rated capacity in Ah for equivalent full charges. Included with field 12 when battery diagnostics are available. Omitted when unavailable.

Examples are observed values from the linked captures, not defaults.

GETMessage 34

Read device status

Request the currently available status fields.

Request

No payload fields are required. Method must be included; this message does not default to GET.

Shared optional Message ID and reply rules

Request headers

MethodHeader 5

Value 2 · GET

Request a service to be perform an action

Expected response (MT34)

Device status

A successful GET returns Device Status directly, without a separate success ACK. Returned fields vary by target and available readings.

Correlation, status and acknowledgment rules

Response data fields

BatteryField 1

Battery level as a percentage.

Signal StrengthField 2

Signal strength as a percentage.

ModeField 3

Device mode.

  • 0 · Sleep
  • 1 · Awake
Network typeField 4

Current network.

  • 0 · No network
  • 2 · GSM (2G)
  • 3 · WCDMA (3G)
  • 4 · LTE (4G)
Network MNCField 5

MNC of the currently connected network. Can be 0 if not connected. Network code reference: https://mcc-mnc.net/

Network MCCField 6

MCC of the currently connected network. Can be 0 if not connected. Network code reference: https://mcc-mnc.net/

Firmware VersionField 7

Firmware version Can be a literal integer, or an encoded version number. Lightbug devices use a single integer for firmware version, e.g. 2287. ESP devices encode a semver version into an int, MAJOR*10000 + MINOR*100 + PATCH. 0.18.0 becomes 1800 and 1.1.1 becomes 10101.

Device TypeField 10

Type of device, relates to the SN prefix. For devices released from 2025 onwards, this is documented on the device specification page.

Battery ResistanceField 12

Estimated effective DC resistance of the whole battery pack, including protection circuitry and connections, in milliohms. This can be a configured starting estimate or a saved or newly learned value, not necessarily a fresh measurement. Available on supported devices and builds, including Viper6 firmware 2763. Omitted when unavailable.

Battery Resistance TemperatureField 13

Temperature at the latest battery resistance measurement, in centi-degrees Celsius (divide by 100 for degrees Celsius, except for declared sentinels). On RH2 this is the fuel gauge's internal temperature; Viper6 with an INA236 does not provide this temperature. Included with field 12 when battery diagnostics are available; otherwise the field may be omitted.

Sentinel values (raw, without conversion or units):
  • -32768: Unavailable: No temperature was available at the resistance measurement.
Lifetime Battery Charge ReceivedField 14

Cumulative charge received since tracking began or was reset, in amp-hours, including partial charges. This is not the current remaining charge or rated battery capacity. Divide by rated capacity in Ah for equivalent full charges. Included with field 12 when battery diagnostics are available. Omitted when unavailable.

SUBSCRIBEMessage 34

Subscribe to status updates

Create or update the default Device Status subscription. Setup acknowledgment and later status publications are separate; subscribing does not itself request an immediate status snapshot. Use GET when you need the current status.

Request

No payload fields are required. Omit Subscription ID (header 17), or use 0, for the default subscription documented here. Updates are subject to the selected interval and message level.

Shared optional Message ID and reply rules

Request headers

MethodHeader 5

Value 3 · SUBSCRIBE

Request a service to be perform an action

IntervalHeader 6

Publication interval in milliseconds. Omitted or 0 allows updates as new status data becomes available.

DurationHeader 7

Subscription duration in milliseconds. Omitted or 0 keeps the subscription active until unsubscribed.

TimeoutHeader 8

Time in milliseconds to wait for the first matching status update. Omitted or 0 does not set a timeout.

Storage LevelHeader 15

Storage/retry policy for publications. Defaults to None (0).

  • 0 · None: Do not attempt to resend messages if they are not ACKed
  • 10 · RAM: Keep the messages in RAM until they are ACKed or overwritten. Messages are discarded on reboot
  • 20 · NVM: Keep the messages until they are ACKed or overwritten
Message LevelHeader 16

Minimum publication level. The default Info-Auto (2) receives normal status updates; no explicit level is required.

  • 1 · Info-Watch: Receive all messages if and when available, without explicitly requesting that the underlying hardware be turned on.
  • 2 · Info-Auto: Receive all messages and explicitly request underlying hardware be activated to provide the requested data where needed
  • 10 · Valid: Activate the relevant hardware but only receive valid data. May be used with subscription timeout feature to request usable data without leaving the hardware on indefinitely
Subscription IDHeader 17

Value 0

Default subscription. Omit this header or use 0 so UNSUBSCRIBE can cancel it.

Expected response (MT5 - ACK)

A successful setup returns an MT5 acknowledgment with Status 0. This acknowledges the request, not delivery of a status update.

Correlation, status and acknowledgment rules · MT5 packet format

Later publication (MT34)

Status update

Later status updates produce Device Status messages, filtered by the subscription interval and level. They are not replies to the original SUBSCRIBE request and do not carry its Response To. Available payload fields vary by target and readings.

Publication headers

Response toHeader 3

A later publication is not correlated to the subscription request.

StatusHeader 4

Status updates carry status data, not a command-result envelope.

  • 0 · OK: Everything appears to be OK
  • 1 · Generic Error
  • 2 · Missing Parameter
  • 3 · Method Not Supported: e.g., SETting GPS position
  • 4 · Invalid Parameter: Unsupported values requested (e.g., requesting the GPS data at 100hz)
  • 5 · Invalid State: e.g., requesting GPS data stream before turning GPS on
  • 6 · No Data: e.g., requesting GPS or time data when not yet available
  • 7 · Not Supported: If the receiver does not support the requested action or method
  • 8 · Failed Will Retry: Currently only used for tx now
  • 9 · Failed Permanently
  • 10 · Abandoned: Status code when an actioned has timed out or been deliberately cancelled by another process
  • 11 · Expired: Status code when a request has expired and has been cancelled, typically subscriptions
  • 12 · Missing Subscription Parameter: Status code when a subscription request is missing required parameters such as Interval or Duration
  • 13 · Invalid Subscription Parameter: Status code when a subscription request has invalid parameters such as Interval or Duration
  • 14 · Bad Encryption: The receiver was expected to be able to decrypt the message, but decryption failed e.g., due to incorrect keys or corrupted data
  • 99 · Unknown Message: The receiver does not recognize the requested message type
  • -127 · Already Responded
  • -126 · No ACK
  • -1 · Processing: Processing; further responses are expected.

Publication data fields

BatteryField 1

Battery level as a percentage.

Signal StrengthField 2

Signal strength as a percentage.

ModeField 3

Device mode.

  • 0 · Sleep
  • 1 · Awake
Network typeField 4

Current network.

  • 0 · No network
  • 2 · GSM (2G)
  • 3 · WCDMA (3G)
  • 4 · LTE (4G)
Network MNCField 5

MNC of the currently connected network. Can be 0 if not connected. Network code reference: https://mcc-mnc.net/

Network MCCField 6

MCC of the currently connected network. Can be 0 if not connected. Network code reference: https://mcc-mnc.net/

Firmware VersionField 7

Firmware version Can be a literal integer, or an encoded version number. Lightbug devices use a single integer for firmware version, e.g. 2287. ESP devices encode a semver version into an int, MAJOR*10000 + MINOR*100 + PATCH. 0.18.0 becomes 1800 and 1.1.1 becomes 10101.

Device TypeField 10

Type of device, relates to the SN prefix. For devices released from 2025 onwards, this is documented on the device specification page.

Battery ResistanceField 12

Estimated effective DC resistance of the whole battery pack, including protection circuitry and connections, in milliohms. This can be a configured starting estimate or a saved or newly learned value, not necessarily a fresh measurement. Available on supported devices and builds, including Viper6 firmware 2763. Omitted when unavailable.

Battery Resistance TemperatureField 13

Temperature at the latest battery resistance measurement, in centi-degrees Celsius (divide by 100 for degrees Celsius, except for declared sentinels). On RH2 this is the fuel gauge's internal temperature; Viper6 with an INA236 does not provide this temperature. Included with field 12 when battery diagnostics are available; otherwise the field may be omitted.

Sentinel values (raw, without conversion or units):
  • -32768: Unavailable: No temperature was available at the resistance measurement.
Lifetime Battery Charge ReceivedField 14

Cumulative charge received since tracking began or was reset, in amp-hours, including partial charges. This is not the current remaining charge or rated battery capacity. Divide by rated capacity in Ah for equivalent full charges. Included with field 12 when battery diagnostics are available. Omitted when unavailable.

UNSUBSCRIBEMessage 34

Stop the default status subscription

Stop the default Device Status subscription (ID 0). This operation does not select a named subscription; supplying another Subscription ID does not cancel that named subscription.

Request

No payload fields are required. Omit Subscription ID; this operation removes the default subscription only.

Shared optional Message ID and reply rules

Request headers

MethodHeader 5

Value 5 · UNSUBSCRIBE

Request a service to be perform an action

Expected response (MT5 - ACK)

A successful cancellation returns an MT5 acknowledgment with Status 0.

Correlation, status and acknowledgment rules · MT5 packet format

Message and field constants

Identifiers for this message type and its fields. See the operation sections above for rules and limits.