Zwave2Mqtt icon indicating copy to clipboard operation
Zwave2Mqtt copied to clipboard

[feat] Surface z-wave queue stats and metrics data over MQTT

Open LordMike opened this issue 5 years ago • 4 comments

Is your feature request related to a problem? Please describe. I sometimes experience delays in operations of devices. Usually, it works fine - but if I stress the system (many changes at once), I get delays.. It may be expected, but I'd like to know more about why these delays occur, and more about the network in general.

Describe the solution you'd like To start with, if it would be possible to push some metrics over MQTT, such as:

  • Queue sizes - I suppose there's an outbound queue for devices that may be busy or asleep
  • Time-to-delivery metrics - any kind of number, showing how long it took to deliver messages - maybe an average over N hours?
  • Congestion metrics - any kind of metrics that may indicate, that too many messages are being sent/received

Later, UI's could be added in Z2M that displays the same stats.

I don't know what metrics are available, or what else might be interesting.. But these are my initial ideas.

I imagine they could be pushed to MQTT under some prefix, f.ex. zwave2mqtt/metrics/... .. or maybe for node-specific metrics, to zwave2mqtt/metrics/<node name or id>/...

Describe alternatives you've considered N/A

Additional context N/A

LordMike avatar May 20 '20 11:05 LordMike

Metrics are available using getNodeStatistics against a specific node, why not using mqtt apis to manually get them?

robertsLando avatar May 20 '20 13:05 robertsLando

Oooh. Neat. There's a whole section on API's I've skipped.

I could possibly whip something up that will get me details. Do the z-wave events tell me anything about queues and their sizes, when they happen?

It's counterproductive if I (or Z2M) has to poll for it .. that wouldn't tell anyone how long a queue was at a given size.

LordMike avatar May 21 '20 12:05 LordMike

Do the z-wave events tell me anything about queues and their sizes, when they happen?

There is no event for that AFAIK

robertsLando avatar May 25 '20 15:05 robertsLando

@LordMike Did you take a look at: https://github.com/zwave-js/zwavejs2mqtt?

If you wonder why: https://github.com/zwave-js/zwavejs2mqtt#why-zwavejs

robertsLando avatar Dec 15 '20 15:12 robertsLando