OpenZWave / Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue
MIT License
356 stars 92 forks source link

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

Open LordMike opened 4 years ago

LordMike commented 4 years ago

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:

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

robertsLando commented 4 years ago

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

LordMike commented 4 years ago

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.

robertsLando commented 4 years ago

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

There is no event for that AFAIK

robertsLando commented 3 years ago

@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