|
| 1 | +URL: https://community.homey.app/t/app-smart-components-toolkit-was-boolean-toolbox-create-advanced-logic-with-simple-formulas/143906 |
| 2 | + |
| 3 | +Title: [APP] Smart (Components) Toolkit (was: Boolean Toolbox) - Create advanced logic with simple formulas |
| 4 | + |
| 5 | +Content: |
| 6 | + |
| 7 | + |
| 8 | +# Smart (Components) Toolkit — v1.9.2 stable / **v1.10.0 test** |
| 9 | + |
| 10 | +> **📚 Full Documentation:** https://tiwas.github.io/SmartComponentsToolkit/ |
| 11 | +
|
| 12 | +Replace complex flow networks with powerful logic devices controlled by dynamic formulas. Make your flows cleaner, more readable, and easier to maintain. |
| 13 | + |
| 14 | +<a href="https://tiwas.github.io/SmartComponentsToolkit/" target="_blank">→ Full Documentation & Interactive Tools</a> |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## 🧪 New in test (v1.10.0): Circadian Light Group |
| 19 | + |
| 20 | +A virtual **light device** that adjusts brightness and color temperature for a group of real lights — automatically following a circadian rhythm. Available now in the [test channel](https://homey.app/a/no.tiwas.booleantoolbox/test/) only; the stable channel still ships v1.9.2 without this device. |
| 21 | + |
| 22 | +**Why use it?** |
| 23 | +- Bright cool light during the day, warm dim light in the evening, deep red at night to preserve melatonin and night vision. |
| 24 | +- Works at any latitude — pick clock times, solar events, or lux-sensor thresholds per phase. |
| 25 | +- Doesn't turn lights on or off; it only adjusts already-on lights, so it never fights with your other automations. |
| 26 | + |
| 27 | +### Anchor modes (mix and match per phase) |
| 28 | + |
| 29 | +| Mode | Description | |
| 30 | +|------|-------------| |
| 31 | +| **Time** | Fixed clock time (HH:MM). Best near the equator. | |
| 32 | +| **Solar event** | Sunrise, sunset, civil/nautical/astronomical dawn/dusk, golden hour, blue hour, solar noon/midnight — with offset minutes and a polar fallback time. | |
| 33 | +| **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. | |
| 34 | + |
| 35 | +### Light profile |
| 36 | + |
| 37 | +- Per-phase **dim** and **temperature** with smooth interpolation between anchors. |
| 38 | +- **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. |
| 39 | +- Per-light tweaks: enable/disable, prewarm before on, allow red mode, min/max dim. |
| 40 | + |
| 41 | +### Outdoor light source |
| 42 | + |
| 43 | +Choose how the device knows how bright it is outside: |
| 44 | +- **Astronomical** (sun-elevation calculation) |
| 45 | +- **Homey lux sensor** |
| 46 | +- **Open-Meteo / MET.no** (radiation-based estimate) |
| 47 | +- **External value** pushed from a Flow |
| 48 | + |
| 49 | +### 24 new flow cards |
| 50 | + |
| 51 | +**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. |
| 52 | + |
| 53 | +**Conditions**: is in phase, red mode active, is paused, is on. |
| 54 | + |
| 55 | +**Actions**: pause (sec/min/hour), pause until time, pause until solar event, resume, turn on/off/toggle, 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. |
| 56 | + |
| 57 | +<a href="https://tiwas.github.io/SmartComponentsToolkit/docs/circadian-light-group.html" target="_blank">→ Read full Circadian Light Group guide</a> |
| 58 | + |
| 59 | +<a href="https://homey.app/a/no.tiwas.booleantoolbox/test/" target="_blank">→ Install v1.10.0 test version</a> |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## What's already in stable (v1.9.2) |
| 64 | + |
| 65 | +| Device | Purpose | |
| 66 | +|--------|---------| |
| 67 | +| **Logic Device** | Boolean logic with visual wizard. Combine device states into TRUE/FALSE using formulas like `A AND B`. | |
| 68 | +| **Logic Unit** | Advanced boolean logic with multiple formulas per device. JSON configuration. | |
| 69 | +| **State Device** | Scene management — capture states at setup, apply with one action. | |
| 70 | +| **State Capture Device** | Dynamic state capture at runtime. Push/pop stack for temporary changes, named slots, JSON backup/restore. | |
| 71 | + |
| 72 | +| Flow Card (no device needed) | Purpose | |
| 73 | +|------------------------------|---------| |
| 74 | +| **Conditional Gates** | Simple GO/NO GO flow control without variables or devices. | |
| 75 | +| **Waiter Gates** | Pause flow until a device capability reaches a target value. | |
| 76 | +| **Evaluate Expression** | Range checking and value mapping with AND/OR logic. | |
| 77 | + |
| 78 | +<a href="https://tiwas.github.io/SmartComponentsToolkit/docs/devices.html" target="_blank">→ Complete Device Guide</a> |
| 79 | + |
| 80 | +### Quick examples |
| 81 | + |
| 82 | +**Doorbell ring → push state, change lights, restore:** |
| 83 | +``` |
| 84 | +WHEN: Doorbell rings |
| 85 | +THEN: Push current state to stack |
| 86 | +THEN: Set all lights to 100% |
| 87 | +THEN: Wait 5 minutes |
| 88 | +THEN: Pop state (restore previous) |
| 89 | +``` |
| 90 | + |
| 91 | +**Conditional Gate gating two flows:** |
| 92 | +``` |
| 93 | +Flow 1 — WHEN: Motion sensor triggered |
| 94 | + THEN: Modify Conditional Gate "allow_lights" → GO |
| 95 | +
|
| 96 | +Flow 2 — WHEN: Door opened |
| 97 | + AND: Gate "allow_lights" is GO |
| 98 | + THEN: Turn on lights |
| 99 | +``` |
| 100 | + |
| 101 | +**Waiter Gate waiting for temperature:** |
| 102 | +``` |
| 103 | +WHEN: Button pressed |
| 104 | +THEN: Turn on coffee machine |
| 105 | +THEN: Wait until coffee machine temperature ≥ 90°C (timeout 5 min) |
| 106 | + → YES: Send notification "Coffee ready!" |
| 107 | + → NO: Send notification "Coffee machine timeout" |
| 108 | +``` |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Documentation |
| 113 | + |
| 114 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/getting-started.html" target="_blank">**Getting Started Guide**</a> |
| 115 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/devices.html" target="_blank">**Device Types Guide**</a> |
| 116 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/circadian-light-group.html" target="_blank">**Circadian Light Group**</a> 🧪 (test only) |
| 117 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/state-device.html" target="_blank">**State Device**</a> |
| 118 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/state-capture-device.html" target="_blank">**State Capture Device**</a> |
| 119 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/conditional-gates.html" target="_blank">**Conditional Gates**</a> |
| 120 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/waiter-gates.html" target="_blank">**Waiter Gates**</a> |
| 121 | +- <a href="https://tiwas.github.io/SmartComponentsToolkit/docs/flow-cards.html" target="_blank">**Flow Cards Reference**</a> |
| 122 | + |
| 123 | +--- |
| 124 | + |
| 125 | +## Installation and Links |
| 126 | + |
| 127 | +* **Homey App Store (stable v1.9.2):** <a href="https://homey.app/en-no/app/no.tiwas.booleantoolbox/" target="_blank">Install Smart (Components) Toolkit</a> |
| 128 | +* **Test channel (v1.10.0 — Circadian Light Group):** <a href="https://homey.app/a/no.tiwas.booleantoolbox/test/" target="_blank">Install test version</a> |
| 129 | +* **GitHub Repo:** <a href="https://github.com/tiwas/SmartComponentsToolkit" target="_blank">github.com/tiwas/SmartComponentsToolkit</a> |
| 130 | +* **Online Emulator:** <a href="https://tiwas.github.io/SmartComponentsToolkit/tools/emulator.html" target="_blank">Boolean Logic Emulator</a> |
| 131 | +* **Formula Builder:** <a href="https://tiwas.github.io/SmartComponentsToolkit/tools/formula-builder.html" target="_blank">Formula Builder</a> |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +## Feedback & Support |
| 136 | + |
| 137 | +Found a bug or have a suggestion? Please report it: |
| 138 | + |
| 139 | +* **GitHub Issues:** <a href="https://github.com/tiwas/SmartComponentsToolkit/issues" target="_blank">Report here</a> |
| 140 | +* **This Forum Thread:** Reply below! |
| 141 | + |
| 142 | +Test-channel feedback on Circadian Light Group is especially appreciated — that's where polish happens before stable release. |
| 143 | + |
| 144 | +--- |
| 145 | + |
| 146 | +## Support the Project |
| 147 | + |
| 148 | +If you find Smart (Components) Toolkit useful, consider supporting its development: |
| 149 | + |
| 150 | +<a href="https://paypal.me/tiwasno" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-blue.svg" alt="PayPal"></a> |
| 151 | + |
| 152 | +--- |
| 153 | + |
| 154 | +**Smart (Components) Toolkit** — Simplify complex logic, state management and circadian lighting in your Homey flows ⚡ |
0 commit comments