Skip to content

Adds - Telemetry API#204

Open
tyeth wants to merge 4 commits into
api-v2from
rssi-v2
Open

Adds - Telemetry API#204
tyeth wants to merge 4 commits into
api-v2from
rssi-v2

Conversation

@tyeth

@tyeth tyeth commented Jun 5, 2026

Copy link
Copy Markdown
Member

This PR adds a new DeviceStats Telemetry proto hanging of signal.d2b, allowing RSSI or latency_ms to be sent up to the broker.

Long term we may wish to consider the broker sending the device it's currently reported battery level to be fed to displays. In theory it might make sense to keep the i2c battery sensor value locally when reporting it, but we cannot assume a voltage level = battery sensor so we have to add a way to track if sensors are battery monitors or rely on the broker disambiguating/using-an-action and then feeding back to device.

@tyeth tyeth changed the base branch from master to api-v2 June 5, 2026 16:31

@tyeth tyeth left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d2b.write needs removing, and d2b.event proving out along with an including b2d.write

message D2B {
oneof payload {
Event event = 1;
Write write = 2;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely Event is enough and d2b.write will be unused?

*/
message Add {
string name = 1; /** Unique name identifying this telemetry component (e.g. "rssi", "free_heap"). */
float period = 2; /** Reporting interval, in seconds. */

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document how this is used if a boot counter versus a periodic update

@brentru brentru changed the title Add RSSI support in v2 Adds - Telemetry API Jun 24, 2026
string name = 1; /** Name of the telemetry component to remove. */
}

/**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide an example of when a device would use a Write message within this API?

* Each telemetry metric (e.g. "rssi", "free_heap", "boot_count") is its own component instance.
*/
message Add {
string name = 1; /** Unique name identifying this telemetry component (e.g. "rssi", "free_heap"). */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is name unique enough? Will we only have one telemetry-type component (i.e: RSSI) per device?

name is a unbounded string size - could you also add a .options file for the telemetry.proto ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think name is probably unique enough. Can you think of an example where it might not be?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't, let's keep name but add the .options file for max_size for that string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants