Integrations

Z-Wave

Spook adds actions to Z-Wave that rebuild the routes of a device or of the whole network, and re-interview devices, so an automation can do the upkeep the Z-Wave pages ask you to do by hand.

The Z-Wave integration connects Home Assistant to your Z-Wave network, through Z-Wave JS. Every Z-Wave device is a device in Home Assistant, with its entities.

A Z-Wave network needs some upkeep now and then. When you move a device, or add a few, the routes the messages take through the mesh get stale: rebuild them. When Z-Wave JS gets a newer configuration file for a device, some of what it knows about that device is stale until the device is asked again: re-interview it. Home Assistant raises a repair that tells you to do that.

Home Assistant has all of this, but only as buttons: on a device page, and on the Z-Wave settings page. An automation cannot press them, not early every Sunday morning, and not for every device in a room at once.

Spook adds three actions for that: rebuild the routes of devices, rebuild the routes of the whole network, and re-interview devices.

Actions

Spook adds three actions to the Z-Wave integration. You find them wherever you add an action, marked with a 👻. All three are for administrators only, as the buttons in Home Assistant are.

Rebuild device routes

Rebuilds the routes of one or more Z-Wave devices, like Rebuild routes on a device page.

One device at a time, sorted by node ID, and each rebuild finished before the next one starts. A Z-Wave network is one radio: a rebuild keeps it busy, and two at the same time would only get in each other's way. The action waits until the last one is done.

Pick the devices, their entities, or areas that hold them, like Z-Wave's own actions take them. An entity or a device of another integration is passed over, so an area with a mix of devices is fine. A target without a single Z-Wave device is refused with an error.

One device failing does not stop the rest. What happens next depends on whether you ask for the response:

  • With a response variable, nothing is raised. The response lists the devices that were rebuilt, and the ones that failed and why. Check it in your automation.
  • Without one, nobody would see a failure. So once every device had its turn, the action fails with an error that names each device that failed, and why.

How to use it

  1. Open the automation or script that should rebuild the routes, and select Add action.
  2. Search for rebuild device routes, and select Z-Wave: Rebuild device routes 👻.
  3. Choose the devices, the entities or the areas.
  4. Select Save.

Rebuild network routes

Starts rebuilding the routes of every device in a Z-Wave network, like Rebuild under the network on the Z-Wave settings page.

It only starts the rebuild. Z-Wave JS works through the network on its own, which takes from minutes to hours, so the action does not wait for it. The Z-Wave settings page shows how far it is.

Pick the network with Network, the integration entry of your Z-Wave stick. Leave it empty to rebuild every Z-Wave network that is loaded; most homes have one. A network that is already rebuilding is fine: it is not started again, and it is no error.

An integration entry that is not Z-Wave, or a network that is not loaded, is refused with an error. When one of several networks fails to start, the others still start, and the action fails with an error that names the one that did not.

How to use it

  1. Open the automation or script that should rebuild the network, and select Add action.
  2. Search for rebuild network routes, and select Z-Wave: Rebuild network routes 👻.
  3. Pick the Network, or leave it empty for all of them.
  4. Select Save.

Re-interview devices

Asks one or more Z-Wave devices to be interviewed again, like Re-interview on a device page. Z-Wave JS asks the device everything again: what it is, what it can do, how it is set up. Home Assistant then sets up its entities anew.

One device at a time, sorted by node ID. Each request goes out without waiting for an answer, the way Home Assistant's own repair sends it. The interview itself runs afterwards, in Z-Wave JS, so the action is done long before the interviews are.

Pick the devices, their entities, or areas that hold them, the same as for Rebuild device routes. A target without a single Z-Wave device is refused with an error.

A request that does not get out, because the connection to Z-Wave JS dropped, does not stop the rest. With a response variable, the response lists it; without one, the action fails with an error that names the devices, once every device had its turn.

How to use it

  1. Open the automation or script that should re-interview the devices, and select Add action.
  2. Search for re-interview, and select Z-Wave: Re-interview devices 👻.
  3. Choose the devices, the entities or the areas.
  4. Select Save.

Missing something here?

An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.