CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/hubitat-dev

Context for developing and debugging Hubitat Elevation apps, drivers, and hub environment — sandbox constraints, lifecycle idioms, capability contracts, plus grounded deploy/log-tail/lint mechanisms.

Quality

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

High

Do not use without reviewing

Overview
Quality
Evals
Security
Files

README.mdskills/_scripts/

scripts

Deterministic mechanisms the skills call. Python 3.9+, standard library only — no external dependencies, so nothing to install and nothing to pin. Each script is JSON-producing, self-error-handling (non-zero exit + stderr diagnostic on failure), and has an entry-point guard.

The floor is 3.9 for zoneinfo (stdlib from 3.9), which hub_mesh.py needs to read a hub's naive lastTime stamps in the hub's own zone. Guarding the import and degrading to UTC was the alternative and is worse than a clear ImportError: it silently overstates every zwaveJS node's age by the hub's UTC offset, which is the bug the zone lookup exists to fix. Python 3.8 reached end-of-life on 2024-10-07; CI runs 3.11.

ScriptDoesNetwork
hub_lint.pyFlag sandbox violations and silent-failure traps in Groovy sourcenone (offline)
hubclient.pyShared: hub config resolution + code enumerate/pull/deploy (imported, not a CLI)
hub_pull.pyPull an app or driver's source + version from a hubHTTP
hub_deploy.pyDeploy source to a hub (create/update, version optimistic-concurrency)HTTP
hub_logtail.pyTail the /logsocket or /eventsocket websocket, filteredWebSocket
hub_mesh.pyFetch Z-Wave/Zigbee mesh detail and hub-mesh peer health; flag failed/ghost nodes, PER, weak routes, incomplete joins, unreachable peers; rank timestamp livenessHTTP
hub_radiolog.pyTail the zwaveLogsocket/zigbeeLogsocket for per-frame radio trafficWebSocket
hub_device_usage.pyReport a device's delete blast radius; --live audits subscriptions and Rule Machine trigDevs separatelyHTTP
hub_device_command.pyRun a command on a device (enumerate the real command surface, coerce args, POST runmethod) and verify it landed by re-reading the relatedAttributeHTTP
hub_device_sequence.pyFire an ordered list of devices with a timed hold on each (built on hub_device_command); live per-step narration for a field walk that binds observations to device idsHTTP
hub_fw_update.pyBatch-flash Z-Wave firmware via the native zwaveJS updater, with a no-progress watchdog, canary radio-health probe + auto-reboot recovery, and an RSSI floor (a failed/stalled OTA can hang the whole controller)HTTP
hubs_config.pyOwner of hubs.json — init/add/set-default/remove/list hubs (imported + CLI)

The hub endpoints these drive are undocumented and version-sensitive — see ../_reference/endpoints.md for what was verified and against which platform. The deterministic cores are unit-tested; only the socket/HTTP loops touch the network.

Tests

python3 -m unittest discover -s tests -p 'test_*.py'

Tests are stdlib unittest, deterministic, and network-free — HTTP and websocket layers are exercised through injected fakes. The live-hub end-to-end checks live in the deploy/debug skills.

README.md

tile.json