What is this?
- Driver that measures the number of milliseconds from Switch On to Off,
- An optional auto off stops the timer, and sends an off event. You can adjust the auto off time with the
setTimeRemaining
function/attribute. - It implements a TimedSession and Switch
What can I do with this?
- Time how long rules or events takes to process
- Use the influx-db logger to send events and graph them with grafana
For example:
or
Measure how long an RM4 rule takes:
Or measure how long it takes to for a Zigbee lamp to reply:
Where do I get it?
- Driver: LatencySensor/latency-driver.groovy at master · as-j/LatencySensor · GitHub
- Influxdb updated to support TimedSessions: GitHub - as-j/InfluxDB-Logger
How do I use it?
Go To:
- Driver's Code
- New Driver
- Import URL: https://raw.githubusercontent.com/as-j/LatencySensor/master/latency-driver.groovy
- Save it
- Create new a new virtual devices using the Latency Device
If using influx-db
- Go to influxdb App
- Under TimedSessions add the new device
Optimal bit
- There's also a latency app: LatencySensor/latency-app.groovy at master · as-j/LatencySensor · GitHub
You can create schedule and time triggers time for groovy applications. Not useful for much else.
Why a Switch and a TimedSession?
Most automations can work with switches and turn them on and off. Few things can start and stop a TimedSession.
Hopefully this makes sense and might be useful to someone.