[APP] Smart (Components) Toolkit (was: Boolean Toolbox) - Create advanced logic with simple formulas [v1.10.16 store / v1.10.38 test - Presence+, Collection pause detection]

Smart (Components) Toolkit — store v1.10.16 / test v1.10.38

:books: Full Documentation: Smart (Components) Toolkit for Homey

Replace complex flow networks with powerful logic devices controlled by dynamic formulas. Make your flows cleaner, more readable, and easier to maintain.

→ Full Documentation & Interactive Tools


What’s new

v1.10.38 (test channel)

  • New Presence+. Trigger a Flow only after one selected person, or everyone, has remained away for a chosen number of minutes. A return before the delay expires cancels the pending trigger, filtering out brief Home/Away glitches. Countdown state survives an app restart. Read the Presence+ guide.
  • Repeated departures are re-armed. If someone returns Home and leaves again while the previous Presence+ trigger call is still finishing, the new absence keeps its own start time and triggers after the configured delay.
  • Collection pause detection fixed. Is paused on a Circadian Light Group Collection now answers yes when the Collection itself or at least one available member group is paused.
  • Reliable All on after a partial pause. An All on Flow can now take its Resume branch when one member group is paused. Resume still reaches every member group before the Flow continues to turn the lights on.

v1.10.35 (test channel)

  • Circadian Light Group: no more “Timeout after 60000ms”. Homey stops an app’s Flow card after 60 seconds, and the rest of the Flow then never runs. With a few lights that don’t answer (an unplugged bulb, a Z-Wave module out of range), turning a group or Collection on could take almost that long, because the card waited for every retry. Now the card lets the Flow continue as soon as every light has its commands and has been checked, usually within a few seconds. Lights that haven’t confirmed are retried in the background, and no Circadian card waits more than 50 seconds.
  • New: Turn on / Turn off / Toggle and report the result (Then cards, Advanced Flow). They work like the device’s own On/Off/Toggle cards and add two tags: All lights confirmed (yes/no) and Status (text), for example “Continued before everything was confirmed. Lights still being retried in the background (1 of 11): Dining room bulb.”
  • Retries stop when you change your mind: a newer command, pausing the group or deleting it stops retries that are still running, so a retry never turns a light back on after you paused or switched off.
  • Clearer Collection errors: the error message for groups with unresponsive lights now names the groups (it said undefined).
  • Tip: a lamp that is unplugged slows every command down. Untick Enabled for it in the group’s light settings until it works again; the Status tag tells you which lamps don’t answer.
WHEN: Button "All on" pressed
THEN: Turn on and report the result (Circadian Light Group Collection)
AND:  All lights confirmed is no
THEN: Create a notification with "Lights: [Status]"

Circadian Light Group guide — retries and result tags

v1.10.34 (test channel)

  • Clearer waiter log: when a wait takes over a Waiter ID that is already waiting, the app log now says so. The earlier wait still ends on its NO path, as before. Internal clean-up only; nothing changes in your Flows. Waiter Gates guide

v1.10.33 (test channel)

  • Get the name of [this Flow] (Then card, Advanced Flow). Returns the name, id and folder of the Flow the card is in as tags, so a notification or log line can say which Flow sent it. No more typing the Flow name by hand.
  • Pick once, rename freely: click the field and pick the only choice, this Flow. The name is read every time the card runs, so it follows when you rename the Flow.
  • Copies are caught: if you copy the card or duplicate the Flow, Flow name shows [Duplicate], Has error is yes and the Error message tag names the Flows, until you pick this Flow again in the copy. A Flow that is not saved yet gives [Unknown – save the Flow]. The card always continues on its normal output, so put a Logic condition on Has error to branch.
  • Translated into all 11 app languages.
WHEN: This Flow is started
THEN: Get the name of this Flow
THEN: Create a notification with "[Flow name] ran"

Get this Flow’s name — reference

v1.10.32 (test channel)

  • Circadian schedule on local time: clock-time anchors, lux anchors and Pause until time now follow your Homey’s time zone, including daylight saving time. Homey runs apps on UTC, so in Norway the schedule ran 2 hours late in summer (1 hour in winter), and mornings stayed dim and red until about 09:00. If you moved your anchors earlier to compensate, move them back.
  • Correct outdoor light estimate: the astronomical estimate (the default outdoor source, also used for MET.no) now follows the real sun at your location. It was up to an hour off in Norway and several hours off in the Americas.
  • Optional morning profile: tick Own morning profile under Repair → Light Profile to give mornings their own brightness and colour temperature. It applies from the Morning anchor and fades into Day. It is off by default, so existing groups behave exactly as before. With it on, Is in phase and Phase changed also use a Morning phase.
  • Lux anchors kept in the editors: the pairing and Repair editors no longer turn lux-sensor anchors back into clock times when you open or save them. A saved lux sensor that is missing from the list (deleted, or not loaded yet) now shows as Unknown sensor instead of being cleared on save.

Circadian Light Group guide

v1.10.31 (test channel)

  • More reliable realtime updates: the Homey Web API library is updated to 3.20.0, which shares device subscriptions and restores them automatically after a connection drop. Logic Devices, Circadian Light Groups and capability waiters keep receiving device changes after network hiccups.

v1.10.30 (test channel)

  • No more app restarts from leaked subscriptions: realtime device subscriptions are shared, so the Logic Device health check no longer grows memory until Homey restarts the app, and one listener finishing no longer stops updates for other Logic Devices on the same device.
  • Wait longer than one minute: Start waiting for Conditional Gate GO and Start waiting until device capability becomes value wait in the background; the …wait finished triggers continue your Flow. Conditional Gates guide · Waiter Gates guide
  • Clear 60-second limit handling: waits inside a card end with an explanatory message at 55 s instead of Homey’s generic Timeout after 60000ms.
  • Better diagnostics: warnings show where they come from, memory is sampled over time, and unclean shutdowns are reported.

v1.10.29 (test channel)

  • Diagnostic report generation fixed: Homey models that cannot provide process-memory or other resource metrics can now generate a report successfully.
  • Graceful resource fallback: unavailable CPU, memory, or storage values are shown as unavailable; all other diagnostics remain in the report.

v1.10.28 (test channel)

  • Diagnostic report from App Settings: generate a readable report containing the installed version, current-session uptime, recent warnings/errors and stack traces.
  • Resource and setup load: includes available app/Homey CPU, memory and storage data, anonymous app-device counts, and Circadian Light Group member, watcher and scheduler details.
  • Prefilled GitHub issue: review the report, then open a new issue with the version and report already filled in. Nothing is uploaded automatically.
  • Privacy-conscious: device names and IDs are omitted from structured data, and common identifiers and secrets are redacted from captured log lines. Always review before submitting.

v1.10.27 (test channel)

This test release is a general reliability improvement based on a thorough code review.

  • Reliable Logic Device updates: formula evaluations are serialized and stale results are discarded, so bursts of linked-device updates cannot leave a Logic Device on an old result.
  • Quieter diagnostics: normal Logic Unit updates no longer flood the app log.
  • Lean release package: development-only material is excluded and manifest assets are verified before release.

v1.10.25 (test channel)

  • Ordered Collection flows: Collection cards wait for all member work before downstream cards run.
  • Deterministic conflicts: pause/resume runs before simultaneous on/off operations.
  • Cascading pause: pausing or resuming a Collection propagates to every member Circadian Light Group.

v1.10.24 (test channel)

  • Reliable activation from all-off: member lights now acknowledge on before receiving dim and colour targets.
  • Settling-safe watcher: short off/on bounces during intentional activation are accepted, while an explicit off still wins immediately.
  • Race-free scheduling: explicit member commands are no longer superseded by scheduler ticks, and the Collection no longer duplicates member schedulers or resume applies.

v1.10.23 (test channel)

  • Logic Unit alarm restored: the read-only Formula result alarm now follows the combined result of all enabled formulas, so Homey’s standard generic-alarm turned on/off cards work again.
  • New Formula changed card: fires on every TRUE/FALSE transition for the selected formula and provides the current and previous result as tags.
  • Fixed Formula changed to… card: correctly filters on both the selected formula and the chosen TRUE/FALSE result.
  • Existing formula-trigger IDs are retained for backwards compatibility with saved flows.

v1.10.22 (test channel)

  • Composite value changed: a new device trigger that fires for real numeric, alarm/boolean, text, enum, or clock-value changes and exposes current value, previous value, value type, and device name.
  • Composite value changed by more than: a numeric trigger with a configurable fixed-unit or percentage threshold plus signed, absolute, and percentage change tags.
  • Startup establishes the comparison baseline without firing either card. Thresholds compare consecutive exposed values and do not accumulate smaller changes.

v1.10.21 (test channel)

v1.10.20 (test channel)

  • New Composite Device. Combine the same capability from two or more devices into one live virtual sensor, alarm, or text value.
  • Numbers: average, minimum, maximum, sum, and median. A five-sensor humidity group can now expose its highest or lowest reading directly.
  • Alarms and booleans: any/all, majority, count on, and percentage on. For example, a composite contact alarm is active when any selected door or window is open.
  • Text and clock values: most common, min/max, most recently updated, and circular average clock time. For example, 23:00 and 01:00 average to 00:00.
  • Logic Unit guide: illustrated Advanced Settings and Flow examples are now included in the online documentation.

v1.10.19 (test channel)

  • Logic Device restart fix. Logic Device groups that depend on another Logic Device now re-fetch their linked inputs after an app restart, so nested groups keep working after Smart (Components) Toolkit restarts.
  • Circadian Light Group member verification. Improved handling around member verification so group state reporting is more reliable when members are checked or temporarily unavailable.

v1.10.18 (test channel)

  • Math Compare (And card). Calculate one value with +, -, * or /, then compare the result with another value. Useful for rules like temperature + 3 is greater than high_threshold.
  • Gradient Map (Then card). Map an input value from one range to another and expose the result as a Mapped value tag for the next card. Supports range offsets and configurable rounding, for example mapping a room temperature into a heat pump / aircondition fan speed.
  • Token fix (v1.10.18). The Gradient Map token now has a distinct Mapped value tag, so it is easier to pick the token from the specific map card that actually ran.

Heat pump / aircondition example:

WHEN: Temperature changes
AND:  Temperature is less than low_threshold_livingroom
THEN: Set fan speed to 0%

WHEN: Temperature changes
AND:  Temperature is greater than or equal to low_threshold_livingroom
THEN: Map Temperature in range low_threshold_livingroom to high_threshold_livingroom into 100-500, round to 1
THEN: Set fan speed to Mapped value

:magnifying_glass_tilted_right: Debugging across Flows — Get the name of this Flow + Flow Doctor

When Flows start each other, or several Flows send notifications, log lines or variables to the same place, it is hard to see which Flow actually did what.

New card: Get the name of [this Flow] (Advanced Flow, test v1.10.33 and later)

  • Put it in any Advanced Flow and use the Flow name tag in notifications, timeline entries, log lines or values you pass on to a shared Flow. You see at once which Flow sent each message.
  • No hard-coded names that go stale: the name is read every time the card runs, so it follows when you rename the Flow. Flow id and Folder tags are there too, for example to group log lines by folder.
  • A log never names the wrong Flow: if you copy the card or duplicate the Flow, Flow name shows [Duplicate], Has error turns yes and Error message names the Flows until you pick this Flow again in the copy.

Flow Doctor: Flow tree and loop check

  • The new Flow tree tab shows all your Flows in their folders. Select one to see every Flow that starts, enables or disables it, through the whole chain, with flags for disabled Flows, unconnected cards, else branches and delays.
  • Circular references: Flow Doctor warns about Flows that start each other in a loop, which can keep running forever. It tells active loops from inactive ones (through a disabled Flow or an unconnected card). The Flows view also reports references to deleted Flows.

Together they cover both sides: Flow Doctor shows how your Flows are wired, and the new card shows at run time which Flow actually ran.

Get this Flow’s name — reference · Open Flow Doctor


:sparkles: Circadian Light Group — now on stable

A virtual light device that adjusts brightness and color temperature for a group of real lights — automatically following a circadian rhythm. Store is currently v1.10.16; v1.10.38 is available on the test channel.

Circadian Light Group highlights

  • No more 60-second timeouts (v1.10.35). Cards let the Flow continue once every light has its commands; lights that don’t answer are retried in the background. Turn on / Turn off / Toggle and report the result (Advanced Flow) tell you whether every light confirmed.
  • Local time and morning profile (v1.10.32). The schedule follows your Homey’s time zone instead of UTC. Mornings can have their own dim and temperature, and lux anchors stay intact when you edit the group.
  • Device ID resolver (v1.10.16). The app now captures Homey device IDs and names so Flow Doctor can resolve references to previously deleted devices.
  • Parallel device writes (v1.10.7). Multi-device flow actions and the scheduler push to up to 5 lights at the same time instead of one-after-another. A 16-light “turn on all” goes from minute-scale to seconds.
  • Last-write-wins on conflicting commands (v1.10.7). Trigger “all off” right after “all on” and the off command supersedes the in-flight on, instead of fighting it on every lamp. Each pass also verifies the on/off state afterwards and serially retries transient Z-Wave / Zigbee timeouts.
  • Group-level “Turn on / off all members” actions (v1.10.7). Convenience cards that switch every enabled light in the group, respecting the current circadian dim/temperature when turning on.
  • Tunable-light fix (v1.10.5). Tuneable bulbs now correctly become warmer (not cooler) towards evening.
  • Pre-warm auto-detection during pairing (v1.10.2). A wizard step tests each light by briefly cycling it off, pre-setting dim / light_temperature / light_hue / light_saturation, then turning back on to verify the value persisted. Each capability is marked ✓/✗ per device, with a re-test button available later via Repair.
  • Smarter candidate filter (v1.10.2). Lights registered as socket with virtualClass: light (Hue/Z2M-bridged lamps) and Z-Wave dimmer modules with a dim capability are now picked up automatically.
  • “Turn on light at current circadian level” action (v1.10.2). Pick any member of the group from a dropdown — the action sets temperature/colour and dim, then turns the light on, in one step. Avoids the brief flash at the previous brightness for lamps that don’t support pre-warming.

Why use it?

  • Bright cool light during the day, warm dim light in the evening, deep red at night to preserve melatonin and night vision.
  • Works at any latitude — pick clock times, solar events, or lux-sensor thresholds per phase.
  • Doesn’t turn lights on or off; it only adjusts already-on lights, so it never fights with your other automations.

Anchor modes (mix and match per phase)

Mode Description
Time Fixed clock time (HH:MM) in your Homey’s time zone. Best near the equator.
Solar event Sunrise, sunset, civil/nautical/astronomical dawn/dusk, golden hour, blue hour, solar noon/midnight — with offset minutes and a polar fallback time.
Lux sensor A real lux sensor crosses a configurable threshold (rising or falling). Falls back to a fixed time until the first crossing of the day.

Light profile

  • Per-phase dim and temperature with smooth interpolation between anchors, and an optional own morning profile.
  • Red mode threshold: when the calculated temperature drops below the threshold, color-capable lights shift to red. Saturation scales with how deep below the threshold you are.
  • Per-light tweaks: enable/disable, prewarm before on, allow red mode, min/max dim.

Outdoor light source

Choose how the device knows how bright it is outside:

  • Astronomical (sun-elevation calculation)
  • Homey lux sensor
  • Open-Meteo / MET.no (radiation-based estimate)
  • External value pushed from a Flow

25 new flow cards

Triggers: phase changed, red mode started/ended, paused/resumed, turned on/off, target changed, error, outdoor light requested. Plus an app-level “Solar event occurred” card with all 14 events + offset, usable from any flow.

Conditions: is in phase, red mode active, is paused, is on.

Actions: pause (sec/min/hour), pause until time, pause until solar event, resume, turn on/off/toggle (also as … and report the result with All lights confirmed and Status tags, Advanced Flow), set red threshold, apply temporary state (override dim/temp/saturation/red — restored on next tick, perfect for testing or quick “moods”), force red mode (with optional duration), apply now, set outdoor lux, turn on light at current circadian level (pick any group member from dropdown), turn on / off all members (group-level convenience).

→ Read full Circadian Light Group guide

→ Install store v1.10.16


→ Install test v1.10.32


Other devices and flow cards

Device Purpose
Composite Device Aggregate a shared capability across multiple devices as min/max/average, alarm, count, text, or clock time.
Logic Device Boolean logic with visual wizard. Combine device states into TRUE/FALSE using formulas like A AND B.
Logic Unit Advanced boolean logic with multiple formulas per device. JSON configuration.
State Device Scene management — capture states at setup, apply with one action.
State Capture Device Dynamic state capture at runtime. Push/pop stack for temporary changes, named slots, JSON backup/restore.
Flow Card (no device needed) Purpose
Conditional Gates Simple GO/NO GO flow control without variables or devices. Short waits in the card, long waits in the background with a “wait finished” trigger.
Waiter Gates Wait until a device capability reaches a target value — in the card (up to 55 s) or in the background with a “wait finished” trigger.
Presence+ Wait until one selected person, or everyone, has remained away for the configured minutes; any return cancels the pending trigger.
Evaluate Expression Range checking and value mapping with AND/OR logic.
Math Compare Compare a calculated number, e.g. Temperature + 3 against a threshold.
Gradient Map Map a number from one range to another and pass the Mapped value tag to the next card.
Get this Flow’s name Return the name, id and folder of the Advanced Flow the card is in as tags, e.g. for notifications and logs.

→ Complete Device Guide

Quick examples

Doorbell ring → push state, change lights, restore:

WHEN: Doorbell rings
THEN: Push current state to stack
THEN: Set all lights to 100%
THEN: Pop state (restore previous) [Homey Flow delay: 5 minutes]

Conditional Gate gating two flows:

Flow 1 — WHEN: Motion sensor triggered
        THEN: Modify Conditional Gate "allow_lights" → GO

Flow 2 — WHEN: Door opened
        AND:  Gate "allow_lights" is GO
        THEN: Turn on lights

Long wait with a Conditional Gate (more than 60 seconds):

Flow 1 — WHEN: Razor turned on
        THEN: Modify Conditional Gate "Razor" → NO GO
        THEN: Start waiting for Conditional Gate GO "Razor" (timeout 2 minutes)

Flow 2 — WHEN: Conditional Gate wait finished "Razor"
        THEN: Turn off Razor   (Result tag: GO = released early, TIMEOUT = 2 minutes passed)

Waiter Gate waiting for a device (more than 60 seconds):

Flow 1 — WHEN: Button pressed
        THEN: Turn on kettle
        THEN: Start waiting until Kettle onoff becomes false (timeout 10 min, id kettle_boil)

Flow 2 — WHEN: Capability wait finished "kettle_boil"
        AND:  "Value matched" tag is Yes
        THEN: Send notification "Water is ready!"

Homey stops every app Flow card after 60 seconds. The in-card waits (Conditional Gate: Wait for GO, Wait until device capability becomes value, Wait) therefore end after at most 55 seconds; use the Start waiting… cards plus their …wait finished trigger for anything longer. In an Advanced Flow both parts can live on one canvas. Pending waits are kept in memory and are lost if the app restarts.


Documentation


Installation and Links


Feedback & Support

Found a bug or have a suggestion? Please report it:

  • GitHub Issues: Report here
  • This Forum Thread: Reply below!

Circadian Light Group feedback is especially appreciated — Z-Wave/Zigbee mesh behaviour varies a lot between setups, so real-world reports help tuning.


Support the Project

If you find Smart (Components) Toolkit useful, consider supporting its development:

PayPal


Smart (Components) Toolkit — Simplify complex logic, state management and circadian lighting in your Homey flows :high_voltage:

[placeholder]

going to follow this! great idea. Had for myself already built out the various logic gates and how to do that in flows, but would applaud doing that easier:

Yeah, that’s why I started this project. I was sick and tired of having to think boolean in new ways. And starting out in electronics, not being able to deal with boolean logic was a bummer.

Would love to find a better action card for it, but this is making it one heck of a lot easier to create logic. And I finally have an output that will be false if the logic didn’t stick.

Please tell me if you test it with some fancy formulas. I still haven’t had time to be really creative with it yet. But I will - because now I can :wink:

I need to try this. I need to find a scenario where this would fit :thinking::grin:

F(A,B,C,D,E)=(((A∗!B)⊕(C∗B))+(D∗(A⊕E)))⊕((C+E)∗(!D+B))

Returns TRUE for the following, with all five inputs used :slight_smile:

| A | B | C | D | E |
| FALSE | FALSE | FALSE | FALSE | TRUE |
| FALSE | FALSE | FALSE | TRUE | TRUE |
| FALSE | FALSE | TRUE | FALSE | FALSE |
| FALSE | FALSE | TRUE | FALSE | TRUE |
| FALSE | FALSE | TRUE | TRUE | TRUE |
| FALSE | TRUE | FALSE | FALSE | TRUE |
| TRUE | FALSE | FALSE | FALSE | FALSE |
| TRUE | FALSE | FALSE | TRUE | FALSE |
| TRUE | FALSE | FALSE | TRUE | TRUE |
| TRUE | FALSE | TRUE | TRUE | FALSE |
| TRUE | FALSE | TRUE | TRUE | TRUE |
| TRUE | TRUE | FALSE | FALSE | TRUE |
| TRUE | TRUE | FALSE | TRUE | FALSE |
| TRUE | TRUE | FALSE | TRUE | TRUE |

why not use + for and and / for or? would be a bit more logical and readable

and what is the circle with the plus sign in it, and the !?

Usually, in electronics we use + for OR, for AND, ! for NOT and the plus in the circle for XOR. It makes sense as AND is a more powerful “addition” than OR - * is more powerful than + :slight_smile:

To make it easier to type, I’ve stuck with the +, * and ! that I’m used to. For XOR, I “created” a new easy to access sign with “^”.

EDIT: If people want to, I can probably make aliases where AND could be either & or *, OR could be | or +, and XOR could be ^ or !=

I discovered two things the other day - my code was incomprehensible, and it didn’t work. I did a complete rehaul and pretty much made the whole thing from scratch again. The good thing now is that it works, and it’s better than the original :slight_smile:

I’ve made some more major changes and launched v1. Should be plenty of reasons to try this one instead of the 0.7 launched earlier today :slight_smile:

I’ve made an update to the version on Github and would love some feedback! I’ve added a logic device, so you can make a virtual device made up of any (I hope…) device type and capability. For most people, this should be more user friendly than the logic unit (although not as flexible).

Want to create a device that will be active when a door is open, there’s a water leak and the backyard camera is not active? Sure! Go ahead!

:rocket: New Feature: State Device (Snapshot & Restore)

I’m excited to announce a major new feature currently available in the test version of Boolean Toolbox: The State Device.

:link: Test Link: https://homey.app/en-no/app/no.tiwas.booleantoolbox/Boolean-Toolbox/test/

What is it?

The State Device allows you to take a “snapshot” of the current state of your devices (lights, blinds, thermostats, etc.) in specific zones (rooms) or your whole house. You can then restore this state later using a simple Flow card.

Think of it as creating your own complex Scenes on the fly, without having to manually add every single card to a Flow.

How to use it

  1. Add a new Device: Go to Devices → + → Boolean Toolbox → State Device.
  2. Select Scope: Choose which Zones (Rooms) you want to capture. You can select “Whole House” or pick specific rooms like “Living Room” and “Kitchen”.
  3. Select Devices: You will see a list of all compatible devices found in those zones. Uncheck any devices you don’t want to include in the snapshot.
  4. Edit Configuration (Optional): You will see the generated JSON configuration. This contains the exact values captured (e.g., dim: 0.8, onoff: true). You can edit this manually if you want to fine-tune values or remove specific capabilities.
  5. Done!

Editing an existing State Device

You are not locked into the initial snapshot forever. If you want to add a new lamp, remove an old one, or tweak the brightness level:

  1. Open the State Device in the Homey app.
  2. Go to Settings (gear icon) → Advanced Settings.
  3. Look for the Configuration (JSON) field.
  4. Here you can manually edit the list. You can delete blocks for devices you want to remove, or adjust values (e.g., change "dim": 0.5 to "dim": 0.8).
  5. Click Save.

Restoring the State

Once the device is created, simply use the “Apply state” action card in any Flow to restore all the captured devices to their saved settings.


:warning: Important “Gotchas” & Tips

1. The “Dim turns it back on” trap

When capturing a state, the app saves all setable capabilities.
If a light is currently OFF but has a dim level of 50% (0.5) in memory, the snapshot might look like this:

"My Light": {
  "onoff": false,
  "dim": 0.5
}

When restoring this state, Homey sends commands sequentially. If it sends onoff: false (Light turns off) and then dim: 0.5, many Zigbee/Z-Wave bulbs will turn back ON to 50% brightness automatically because they received a dim command.

Solution: If you want a light to stay OFF in your scene, you should manually edit the JSON during the pairing wizard (Step 3) and remove the "dim" line for that device, leaving only "onoff": false.

2. Delays and Network Traffic

Restoring a state for 50 devices at once can flood your Zigbee/Z-Wave network.

  • The State Device has a built-in default delay (default 200ms) between each command to help with this.
  • You can edit the default_delay in the JSON configuration (in Advanced Settings of the device) if you need it to go slower.

3. Missing Devices

If you remove a physical device from Homey that is part of a State Device snapshot, the State Device will log an error when you try to run it.

  • You can enable “Ignore Errors” in the JSON config ("ignore_errors": true) to make it skip missing devices silently.
  • You can also enable Debug Mode in the App Settings to see exactly which device is failing.

Feedback

This is a powerful tool, but it’s complex under the hood. Please let me know if you encounter any issues or have suggestions for improvements!

Happy automating! :hammer_and_wrench:

Hi,

I wondered if you weren’t aware of this app? Or did you still like to build similar functionality yourself anyway?

Thanks. I’m aware of it, but I liked my way of doing it better. It might have gone a long way since I tested it, but I think mine makes it a lot easier (at least than it used to be) to configure and change the scenes.

I’d love some feedback, though :slight_smile:

Ah wow! The states section is indeed a lot more user friendly, and not needing flows is a big plus.

So I played a bit with it.
It’s great we can edit the created JSON, but i can imagine it’s not for everyone. Maybe it’s possible to call the checklist again in edit mode, for changing devices

Nice to have:

  • Is it possible to add a capability (un)check list prior or following the zone checklist?
    This would be nice when I want to create lights-only scenes for example.

Findings / remarks:

  • When selecting a zone, devices in the subzone are listed in the selection list of the next screen.
    But the subzones were deselected.

  • The activated tiles are switched off after a minute. I’d prefer the tile to stay on (but I can imagine others don’t). Additionally there will be a tag with the state available for use in flows.

Issue:

  • (My) RGBW lights are in white mode, temperature as capability. When saving it’s state, sometimes somehow it was in color mode
    When recalling the state, the lights turn into some color, like blue;
    I recall the dev of Zone Memory having troubles with this similar issue as well.
    → When I manually replace “color” by “temperature” in the JSON, and remove the saturation and hue capabilities, changing states goes well.

Just an idea: have the user select if color mode is used? Or the other way round

Thanks for the kind words and for great feedback.

Yeah, it’s probably more on the advanced side of things. I’ve been thinking about making a web page for my repo that will make it easier. But I had to choose beween keeping it really simple or really powerful. Those don’t always go hand-in-hand. Ask the maintainers of vi :stuck_out_tongue:

I’ve been thinking about making it a little more user-friendly, though. Adding an optional delay for every level (global, zone, room, device) that will override or add to the global delay. I’ve also been thinking about grouping the devices in the json on a room basis to make it easier to get a good overview. As I’m using the devices’ id, changing the numbers of levels in the json (I’ll just flatten it internally) shouldn’t break anything.

As for getting the checklist again, I had that on my todo, too, but couldn’t find a good way to do it. It’s no harder than just creating a new device, checking the devices you want, copy the json and cancel the creation. The other option is to make a web tool, but it seems to be a limit to the number of API hits (100, more than most people will need).

Any thoughts? Making tools here and there will make it harder to maintain, so if the “almost create a new device to get a fresh json” is good enough, I might stick with that for the time being.

Could you explain this a little better? I’m not sure I understood. You have three levels (Home → Zone → Subzone), you deselct Home and Subzone so that only Zone is selected and you still get devices from Subzone?

I’m very curious if you have a good solution for me here, because this was on my list. This is a solid idea, but I thought it might be a problem if you use them for “moods”. Like if you wanted to activate “Kitchen: romantic”, “Living room: pitch black” AND “Alarm sensors: Active, except cat door” so that you could mix and match.

How about I add a selection (default: true) to turn off the other devices (but take no action, just “turn off” the device card), so if you activate a new scene using three devices you’d turn off others when starting the flow, then activate the rest with the option set to false?

Did it read the wrong capabilities? Or were you thinking more that when selecting devices you could select capability instead? Say a device has dim, on/off, hue, saturation - you want to select only dim and saturation, and move saturation to the top?

Ok, I’ve worked on this further. Would you mind testing the new version?

There are some docs here: State Device - Boolean Toolbox for Homey

I’ll see if I can make some sort of editor without using the Homey-API, but first I’d appreciate it if you could see if this fixes your problems :slight_smile:

No problem!

Throw in the “I know what I’m doing” button :rofl:

No, it was a misunderstanding from my side because of the zones I selected.
After some new tests I noticed there’s nothing wrong with it :face_with_hand_over_mouth:

That sounds like a plan.

+1

I had the screens of the < group > app in mind;
it has an edit screen, which is, to the user, the same screen as the initial selection screen; it uses the Maintenance > Try to repair route
This is the edit screen:

Hmmm…so what you’re after is to be able to re-do the selection process? I guess this is doable, but I’m not sure how to do it and not change any of the settings.

Would you want a new snapshot, a new snapshot for any new devices, or to reselect from the old snapshot? The last one would require that I save every single device state in the json, and only make a new snapshot for new devices.

I guess I can create an option in the pairing dialog to save all devices and use a key to say it’s active or not. The json could be REALLY big for some installations, though. And if I were to save all devices to the json object, should I just include the ones in the selected zones or all devices in all zones?

I could make a web app that would let people edit the json object they already have, and getting a fresh object should be fairly easy by creating a new device and then just copy the json to the old one.

If you have any ideas I will see if I can do it in the app, or if it’s better done in a standalone json editor just for this app. I guess I could also create a function to import a new json, but only include new objects?

How about something like this? This should give a lot more value, and be very helpful to inexperienced users.

Well, that’ll do, Lars!