commit 66f85682df09cb0e89c7202484c76b2a30e188fc Author: Jan Kocoń Date: Tue Apr 14 00:58:38 2026 +0200 Initial commit diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..6f4e822 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,10 @@ +{ + "permissions": { + "allow": [ + "Bash(python3 -c \"import json,sys; data=json.load\\(sys.stdin\\); print\\(type\\(data\\)\\); print\\(len\\(data\\) if isinstance\\(data, list\\) else 'not list'\\); print\\([n.get\\('type'\\) for n in data[:20]] if isinstance\\(data, list\\) else ''\\)\")", + "Bash(ls:*)", + "Bash(sed -i '/^ on_click:$/{ n; /^ min_length:.*$/d }' \"C:/Users/jkocon/Documents/Gitea/ESP32-Hub/kuba-hub.yaml\")", + "Bash(sed -i '/^ on_click:$/{ n; /^ max_length:.*$/d }' \"C:/Users/jkocon/Documents/Gitea/ESP32-Hub/kuba-hub.yaml\")" + ] + } +} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..9719ede --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,67 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## What this repo is + +ESPHome firmware configuration for an ESP32-based smart home lighting hub. The device runs on an `esp32dev` board with `esp-idf` framework, connects via Ethernet (LAN8720), and controls lights and fans throughout the house. `flows.json` contains the corresponding Node-RED automation flows that run in Home Assistant and react to input sensor state changes from this device. + +## ESPHome commands + +```bash +esphome compile main-hub.yaml # compile only +esphome upload main-hub.yaml # OTA upload +esphome logs main-hub.yaml # stream logs from device +esphome run main-hub.yaml # compile + upload + logs +esphome config main-hub.yaml # validate and dump merged config +``` + +Secrets (wifi credentials, etc.) are expected in a `secrets.yaml` file in the same directory (WiFi is currently commented out in favor of Ethernet). + +## Architecture + +`main-hub.yaml` is the root config. It uses ESPHome's `packages:` feature to split the config across `packages/`: + +| File | Purpose | +|---|---| +| `packages/i2c.yaml` | I2C bus definition (SDA:13, SCL:16, 200kHz) | +| `packages/pca9685.yaml` | 2× PCA9685 PWM drivers + all dimmable/color lights | +| `packages/mcp23017_outputs.yaml` | 3× MCP23017 output expanders + binary light wrappers | +| `packages/mcp23017_inputs.yaml` | 3× MCP23017 input expanders + all switch click automations | +| `packages/scripts.yaml` | `off_all_lights`, `off_all_fans`, and WLED placeholder scripts | + +### I2C address map + +| Device | Address | Role | +|---|---|---| +| mcp23xxx_hub1_IN | 0x20 | 16 inputs | +| mcp23xxx_hub1_OUT | 0x21 | 16 outputs | +| mcp23xxx_hub2_IN | 0x22 | 16 inputs | +| mcp23xxx_hub2_OUT | 0x23 | 16 outputs | +| mcp23xxx_hub3_IN | 0x24 | 16 inputs | +| mcp23xxx_hub3_OUT | 0x25 | 16 outputs | +| pca9685_hub1 | 0x40 | 16-ch PWM | +| pca9685_hub2 | 0x41 | 16-ch PWM | + +### Naming conventions + +- Binary outputs: raw GPIO output id is `hubN_outM_gpio`; the binary light wrapping it is `hubN_outM` (all `restore_mode: ALWAYS_OFF`) +- PWM outputs: `PWMX_Y_HubN` where X = circuit group, Y = channel within group, N = PCA9685 instance; all capped at `max_power: 75%` (some hub2 channels at 95%) +- Named lights (cwww/rgbww/monochromatic on PCA9685): `serwer_led`, `jadalnia_led`, `biala_lazienka_wanna_led`, `kuchnia_lezka_led`, `spa_ledy`, `pokoj_dla_gosci_led`, `sypialnia_led` +- Inputs: `hubN_inM`; fans are specific binary outputs noted in comments (hub1_out4, hub2_out5, hub2_out8, hub3_out2) + +### Input click gestures + +All input switches use `on_multi_click` with 350ms as the single-click vs. multi-click boundary: +- **single** (≤350ms ON, then ≥350ms OFF) → primary light toggle +- **double** (two short pulses) → secondary action +- **triple** (three short pulses) → often `off_all_lights` or WLED control +- **long** (≥350ms hold) → often `off_all_fans` or `off_all_lights + off_all_fans` + +### WLED integration + +WLED-controlled strips (korytarz kinkiety, komin, salon kinkiety, schody, wc, salon wentylator) are currently **placeholder scripts** that only log. The TODO in `scripts.yaml` notes these should be replaced with actual WLED control via Home Assistant/MQTT. + +### `packages/main-hub.yaml` + +This file is an identical copy of the root `main-hub.yaml`. It appears to be a duplicate — the canonical entry point for `esphome` commands is the root `main-hub.yaml`. diff --git a/Kuba/flows.json b/Kuba/flows.json new file mode 100644 index 0000000..da99fc5 --- /dev/null +++ b/Kuba/flows.json @@ -0,0 +1 @@ +[{"id":"5c0986ec.93df28","type":"tab","label":"Biuro","disabled":false,"info":""},{"id":"64f43831.2c3f38","type":"server-state-changed","z":"5c0986ec.93df28","name":"Włącznik obok serwera","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in11"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":100,"wires":[["26d8854.1c92e7a"]]},{"id":"185ee5a7.e9852a","type":"function","z":"5c0986ec.93df28","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":100,"wires":[["ad10751c.4e9d88"]]},{"id":"922b2ae1.9b7608","type":"timed-counter","z":"5c0986ec.93df28","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":80,"wires":[["185ee5a7.e9852a"]]},{"id":"fdce932a.0ff7d","type":"timed-counter","z":"5c0986ec.93df28","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":120,"wires":[["185ee5a7.e9852a"]]},{"id":"5a6aae6b.c3d62","type":"switch","z":"5c0986ec.93df28","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":100,"wires":[["922b2ae1.9b7608"],["fdce932a.0ff7d"]]},{"id":"26d8854.1c92e7a","type":"change","z":"5c0986ec.93df28","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":100,"wires":[["5a6aae6b.c3d62"]]},{"id":"ad10751c.4e9d88","type":"switch","z":"5c0986ec.93df28","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":100,"wires":[["ac0f4d3f.cb48c"],["23d19588.08fa5a"],["a511bdb0.05322"],[]]},{"id":"ac0f4d3f.cb48c","type":"api-call-service","z":"5c0986ec.93df28","name":"Ledy nad Serwerem","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_serwer_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1260,"y":40,"wires":[[]]},{"id":"23d19588.08fa5a","type":"api-call-service","z":"5c0986ec.93df28","name":"Lampa Biuro","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.test_led_2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1230,"y":100,"wires":[[]]},{"id":"a511bdb0.05322","type":"api-call-service","z":"5c0986ec.93df28","name":"Wetnylator obieg","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.main_hub_hub3_out2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1250,"y":160,"wires":[[]]},{"id":"691f091e.80d828","type":"server-state-changed","z":"5c0986ec.93df28","name":"Włącznik obok serwera","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in12"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":360,"wires":[["76d9d38b.0407fc"]]},{"id":"6cc2cd65.3fbba4","type":"function","z":"5c0986ec.93df28","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":360,"wires":[["2aaf96fe.ca3d7a"]]},{"id":"5481b8a3.647a98","type":"timed-counter","z":"5c0986ec.93df28","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":340,"wires":[["6cc2cd65.3fbba4"]]},{"id":"9168e352.c5ac6","type":"timed-counter","z":"5c0986ec.93df28","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":380,"wires":[["6cc2cd65.3fbba4"]]},{"id":"228c19cf.a7b5b6","type":"switch","z":"5c0986ec.93df28","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":360,"wires":[["5481b8a3.647a98"],["9168e352.c5ac6"]]},{"id":"76d9d38b.0407fc","type":"change","z":"5c0986ec.93df28","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":360,"wires":[["228c19cf.a7b5b6"]]},{"id":"2aaf96fe.ca3d7a","type":"switch","z":"5c0986ec.93df28","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":360,"wires":[["2a979101.9179ae","ea459146.a9952"],["2a979101.9179ae"],[],["1a4a7aae818a0d97"]]},{"id":"ea459146.a9952","type":"api-call-service","z":"5c0986ec.93df28","name":"Lampa Biuro","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1230,"y":300,"wires":[[]]},{"id":"2a979101.9179ae","type":"api-call-service","z":"5c0986ec.93df28","name":"Korytarz Halogeny","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out14"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1250,"y":360,"wires":[[]]},{"id":"d7bb2e07.a463c","type":"api-call-service","z":"5c0986ec.93df28","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"switch.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["switch.lampa_biuro"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"switch","service":"toggle","x":670,"y":720,"wires":[[]]},{"id":"8e952a2c.76e198","type":"server-state-changed","z":"5c0986ec.93df28","name":"","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.wlacznik_biuro"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"off","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":320,"y":720,"wires":[["d7bb2e07.a463c"],[]]},{"id":"8bef34d.57956c8","type":"server-state-changed","z":"5c0986ec.93df28","name":"","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.wlacznik_biala_lazienka_kinkiety"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"off","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":440,"y":780,"wires":[["777b478.4e0c9b8"],[]]},{"id":"777b478.4e0c9b8","type":"api-call-service","z":"5c0986ec.93df28","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"switch.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["switch.kinkiety_lazenka_skos"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"switch","service":"toggle","x":750,"y":780,"wires":[[]]},{"id":"c8792435.16bd08","type":"server-state-changed","z":"5c0986ec.93df28","name":"Ogrzewanie na 3 godziny","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["input_boolean.switch"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":1700,"wires":[["a0836b00.ce08f8"],[]]},{"id":"dc3c4735.eb8a68","type":"api-call-service","z":"5c0986ec.93df28","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"input_boolean.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["input_boolean.switch"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"input_boolean","service":"turn_off","x":1090,"y":1700,"wires":[[]]},{"id":"a0836b00.ce08f8","type":"api-call-service","z":"5c0986ec.93df28","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"switch.turn_on","floorId":[],"areaId":[],"deviceId":[],"entityId":["switch.ogrzewanie_glowica_1_1","switch.ogrzewanie_glowica_1_2","switch.ogrzewanie_glowica_1_3","switch.ogrzewanie_glowica_1_4","switch.ogrzewanie_glowica_1_5","switch.ogrzewanie_glowica_1_6","switch.ogrzewanie_glowica_1_7","switch.ogrzewanie_glowica_1_8","switch.ogrzewanie_glowica_2_1","switch.ogrzewanie_glowica_2_2","switch.ogrzewanie_glowica_2_3","switch.ogrzewanie_glowica_2_4","switch.ogrzewanie_glowica_2_5_2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"switch","service":"turn_on","x":440,"y":1700,"wires":[["687b0b1f.ba3ba4"]]},{"id":"687b0b1f.ba3ba4","type":"delay","z":"5c0986ec.93df28","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"hours","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":600,"y":1700,"wires":[["a4021a9e.2aa1d8"]]},{"id":"a4021a9e.2aa1d8","type":"api-call-service","z":"5c0986ec.93df28","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"switch.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["switch.ogrzewanie_glowica_1_1","switch.ogrzewanie_glowica_1_2","switch.ogrzewanie_glowica_1_3","switch.ogrzewanie_glowica_1_4","switch.ogrzewanie_glowica_1_5","switch.ogrzewanie_glowica_1_6","switch.ogrzewanie_glowica_1_7","switch.ogrzewanie_glowica_1_8","switch.ogrzewanie_glowica_2_1","switch.ogrzewanie_glowica_2_2","switch.ogrzewanie_glowica_2_3","switch.ogrzewanie_glowica_2_4","switch.ogrzewanie_glowica_2_5_2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"switch","service":"turn_off","x":820,"y":1700,"wires":[["dc3c4735.eb8a68"]]},{"id":"64c1b8477d962e2f","type":"server-state-changed","z":"5c0986ec.93df28","name":"Biuro","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in10"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":90,"y":540,"wires":[["042cccc3c8c9434f"]]},{"id":"598ecaa3dd339a92","type":"function","z":"5c0986ec.93df28","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":540,"wires":[["04196e857862998f"]]},{"id":"ede3f4eb72e878b8","type":"timed-counter","z":"5c0986ec.93df28","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":520,"wires":[["598ecaa3dd339a92"]]},{"id":"9f98b593712fc2ac","type":"timed-counter","z":"5c0986ec.93df28","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":560,"wires":[["598ecaa3dd339a92"]]},{"id":"4495aff367736b75","type":"switch","z":"5c0986ec.93df28","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":540,"wires":[["ede3f4eb72e878b8"],["9f98b593712fc2ac"]]},{"id":"042cccc3c8c9434f","type":"change","z":"5c0986ec.93df28","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":540,"wires":[["4495aff367736b75"]]},{"id":"04196e857862998f","type":"switch","z":"5c0986ec.93df28","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":540,"wires":[["fcc00f49eeb6be15"],["78bef18eec058e78","44d6a5099c8e831b"],[],[]]},{"id":"fcc00f49eeb6be15","type":"api-call-service","z":"5c0986ec.93df28","name":"Lampa Biuro","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1230,"y":480,"wires":[[]]},{"id":"78bef18eec058e78","type":"api-call-service","z":"5c0986ec.93df28","name":"Ledy nad Serwerem","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_serwer_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"turn_off","x":1260,"y":600,"wires":[[]]},{"id":"44d6a5099c8e831b","type":"api-call-service","z":"5c0986ec.93df28","name":"Lampa Biuro","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"turn_off","x":1230,"y":540,"wires":[[]]},{"id":"1a4a7aae818a0d97","type":"api-call-service","z":"5c0986ec.93df28","name":"Wyłącz wszystkie lampy","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1270,"y":420,"wires":[["16d0a24839aca066"]]},{"id":"16d0a24839aca066","type":"api-call-service","z":"5c0986ec.93df28","name":"Wyłącz wszystkie wantylatory","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"fan.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"fan","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1540,"y":420,"wires":[[]]},{"id":"444bef4a.a25ef","type":"tab","label":"Korytarze + Wejście","disabled":false,"info":""},{"id":"8ffbabbb.6efb98","type":"server-state-changed","z":"444bef4a.a25ef","name":"Włącznik Wejście 1","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in0"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":160,"wires":[["d7757f18.15c55"]]},{"id":"98aacaab.6bce68","type":"function","z":"444bef4a.a25ef","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":160,"wires":[["305490e2.f4b92"]]},{"id":"83d89329.901ad","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":140,"wires":[["98aacaab.6bce68"]]},{"id":"cab085a3.baf2e8","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":180,"wires":[["98aacaab.6bce68"]]},{"id":"963349bf.20c418","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":160,"wires":[["83d89329.901ad"],["cab085a3.baf2e8"]]},{"id":"d7757f18.15c55","type":"change","z":"444bef4a.a25ef","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":160,"wires":[["963349bf.20c418"]]},{"id":"305490e2.f4b92","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":160,"wires":[["266b0f83.6ebcc"],[],[],["ce1412cf0c2ecc1b"]]},{"id":"266b0f83.6ebcc","type":"api-call-service","z":"444bef4a.a25ef","name":"Halogeny Wejście","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out15"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":100,"wires":[[]]},{"id":"4f46cda5.9dfc64","type":"server-state-changed","z":"444bef4a.a25ef","name":"Włącznik Wejście 2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in2"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":340,"wires":[["d2bc14f0.9604e8"]]},{"id":"a71a1217.e944a","type":"function","z":"444bef4a.a25ef","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":340,"wires":[["2fe17d8a.78a332"]]},{"id":"ecffca09.59c3a8","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":320,"wires":[["a71a1217.e944a"]]},{"id":"93017fb2.36034","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":360,"wires":[["a71a1217.e944a"]]},{"id":"39895e8d.b62072","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":340,"wires":[["ecffca09.59c3a8"],["93017fb2.36034"]]},{"id":"d2bc14f0.9604e8","type":"change","z":"444bef4a.a25ef","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":340,"wires":[["39895e8d.b62072"]]},{"id":"2fe17d8a.78a332","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":340,"wires":[["33e46d9e.3f1012"],[],[],[]]},{"id":"33e46d9e.3f1012","type":"api-call-service","z":"444bef4a.a25ef","name":"Halogeny Główny Korytarz","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out14"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1300,"y":280,"wires":[[]]},{"id":"2e955a0e.331646","type":"server-state-changed","z":"444bef4a.a25ef","name":"Włącznik Wejście 3","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in2"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":520,"wires":[["ead61c90.b5ae1"]]},{"id":"4e4bb15f.4542","type":"function","z":"444bef4a.a25ef","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":520,"wires":[["5239600d.06606"]]},{"id":"86f335cc.d4ea88","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":500,"wires":[["4e4bb15f.4542"]]},{"id":"1c4515aa.dfa56a","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":540,"wires":[["4e4bb15f.4542"]]},{"id":"bec31a49.2c2bc8","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":520,"wires":[["86f335cc.d4ea88"],["1c4515aa.dfa56a"]]},{"id":"ead61c90.b5ae1","type":"change","z":"444bef4a.a25ef","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":520,"wires":[["bec31a49.2c2bc8"]]},{"id":"5239600d.06606","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":520,"wires":[["47917dff.b52884"],[],[],["8b78888f2b4914db"]]},{"id":"47917dff.b52884","type":"api-call-service","z":"444bef4a.a25ef","name":"Kinkiety korytarz","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.korytarz_kinkiety"],"labelId":[],"data":"{\"effect\":\"Rise light\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1260,"y":460,"wires":[[]]},{"id":"caaa4ff3.a431b","type":"server-state-changed","z":"444bef4a.a25ef","name":"Włącznik Korytarz 1","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in2"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":740,"wires":[["708182c5.8f4e6c"]]},{"id":"eadd9c35.8ff2d","type":"function","z":"444bef4a.a25ef","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":740,"wires":[["2dc4091b.9da8a6"]]},{"id":"f793c7af.d07508","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":720,"wires":[["eadd9c35.8ff2d"]]},{"id":"c2de01bf.5dcb7","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":760,"wires":[["eadd9c35.8ff2d"]]},{"id":"d0206dcb.0b422","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":740,"wires":[["f793c7af.d07508"],["c2de01bf.5dcb7"]]},{"id":"708182c5.8f4e6c","type":"change","z":"444bef4a.a25ef","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":740,"wires":[["d0206dcb.0b422"]]},{"id":"2dc4091b.9da8a6","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":740,"wires":[["d35e4b30.7d3e98"],[],[],["a18ef0d3c2e525c1"]]},{"id":"54d6a813.d14418","type":"api-call-service","z":"444bef4a.a25ef","name":"Halogeny Wejście","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out15"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":860,"wires":[[]]},{"id":"433ecc13.e07064","type":"server-state-changed","z":"444bef4a.a25ef","name":"Włącznik Korytarz 2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in0"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":920,"wires":[["b404ef21.76c71"]]},{"id":"19f2ea8a.514ad5","type":"function","z":"444bef4a.a25ef","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":920,"wires":[["ff72cfe1.1cce9"]]},{"id":"f5ed615e.4ce7e","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":900,"wires":[["19f2ea8a.514ad5"]]},{"id":"9f699ce7.4d586","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":940,"wires":[["19f2ea8a.514ad5"]]},{"id":"bbf807a3.3da6e8","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":920,"wires":[["f5ed615e.4ce7e"],["9f699ce7.4d586"]]},{"id":"b404ef21.76c71","type":"change","z":"444bef4a.a25ef","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":920,"wires":[["bbf807a3.3da6e8"]]},{"id":"ff72cfe1.1cce9","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":920,"wires":[["54d6a813.d14418"],[],[],[]]},{"id":"d35e4b30.7d3e98","type":"api-call-service","z":"444bef4a.a25ef","name":"Halogeny Główny Korytarz","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out14"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1300,"y":680,"wires":[[]]},{"id":"fe0689a4.563018","type":"server-state-changed","z":"444bef4a.a25ef","name":"Włącznik Korytarz 3","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in1"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":1100,"wires":[["7d48dc2c.3986b4"]]},{"id":"d89451eb.c0778","type":"function","z":"444bef4a.a25ef","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":1100,"wires":[["2de932bc.c769de"]]},{"id":"ec239395.768db","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1080,"wires":[["d89451eb.c0778"]]},{"id":"65c8f0a3.98888","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1120,"wires":[["d89451eb.c0778"]]},{"id":"d5b7f0a.535621","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1100,"wires":[["ec239395.768db"],["65c8f0a3.98888"]]},{"id":"7d48dc2c.3986b4","type":"change","z":"444bef4a.a25ef","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1100,"wires":[["d5b7f0a.535621"]]},{"id":"2de932bc.c769de","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":1100,"wires":[["472a9c2f.cf8b24"],[],[],["d6f4f5cafe4d058e"]]},{"id":"472a9c2f.cf8b24","type":"api-call-service","z":"444bef4a.a25ef","name":"Kinkiety korytarz","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.korytarz_kinkiety"],"labelId":[],"data":"{\"effect\":\"Rise light\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1260,"y":1040,"wires":[[]]},{"id":"bc9e7d6f.3a5dc","type":"server-state-changed","z":"444bef4a.a25ef","name":"Włącznik Korytarz maŲ�y","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in3"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":1280,"wires":[["84f84bde.5d56e8"]]},{"id":"dbc0247d.eea2c8","type":"function","z":"444bef4a.a25ef","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>400) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"timeout":"","noerr":3,"initialize":"","finalize":"","libs":[],"x":900,"y":1280,"wires":[["8e259ef8.a7ca2"]]},{"id":"97e983e1.d7e95","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"400","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1260,"wires":[["dbc0247d.eea2c8"]]},{"id":"1cce02a2.b2380d","type":"timed-counter","z":"444bef4a.a25ef","name":"","timelimit":"400","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1300,"wires":[["dbc0247d.eea2c8"]]},{"id":"76c75bfc.4a76f4","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1280,"wires":[["97e983e1.d7e95"],["1cce02a2.b2380d"]]},{"id":"84f84bde.5d56e8","type":"change","z":"444bef4a.a25ef","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1280,"wires":[["76c75bfc.4a76f4"]]},{"id":"8e259ef8.a7ca2","type":"switch","z":"444bef4a.a25ef","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":1280,"wires":[["b66ca183.b16fa"],["d4d89278.2b956"],[],[]]},{"id":"f8e069e4.8292a8","type":"api-call-service","z":"444bef4a.a25ef","name":"Kinkiet Mały korytarz ","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out13"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1480,"y":1300,"wires":[[]]},{"id":"b8570112.3afd","type":"api-call-service","z":"444bef4a.a25ef","name":"Halogeny Mały Korytarz","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out3"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1490,"y":1220,"wires":[[]]},{"id":"b66ca183.b16fa","type":"time-range-switch","z":"444bef4a.a25ef","name":"6-20am","lat":"","lon":"","startTime":"06:00","endTime":"20:00","startOffset":0,"endOffset":0,"x":1220,"y":1240,"wires":[["b8570112.3afd"],["f8e069e4.8292a8"]]},{"id":"d4d89278.2b956","type":"time-range-switch","z":"444bef4a.a25ef","name":"6-20am","lat":"","lon":"","startTime":"06:00","endTime":"20:00","startOffset":0,"endOffset":0,"x":1220,"y":1300,"wires":[["f8e069e4.8292a8"],["b8570112.3afd"]]},{"id":"ce1412cf0c2ecc1b","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie lampy","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1290,"y":220,"wires":[["a2a602999b5ec910"]]},{"id":"8b78888f2b4914db","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie lampy","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1290,"y":580,"wires":[["a97e469dcb3d6d06"]]},{"id":"d6f4f5cafe4d058e","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie lampy","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1290,"y":1160,"wires":[["758b52a70e38c7a3"]]},{"id":"a18ef0d3c2e525c1","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie lampy","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1290,"y":780,"wires":[["ec0f7deb2634995f"]]},{"id":"a2a602999b5ec910","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie wantylatory","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"fan.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"fan","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1560,"y":220,"wires":[[]]},{"id":"a97e469dcb3d6d06","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie wantylatory","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"fan.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"fan","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1580,"y":580,"wires":[[]]},{"id":"ec0f7deb2634995f","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie wantylatory","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"fan.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"fan","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1580,"y":780,"wires":[[]]},{"id":"758b52a70e38c7a3","type":"api-call-service","z":"444bef4a.a25ef","name":"Wyłącz wszystkie wantylatory","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"fan.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"fan","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1580,"y":1160,"wires":[[]]},{"id":"c127068e.175598","type":"tab","label":"Garderoby","disabled":false,"info":""},{"id":"1d55c9cd.510e26","type":"server-state-changed","z":"c127068e.175598","name":"Włącznik Garderoba mała","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in4"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":100,"wires":[["e7be23bd.4018d"]]},{"id":"2625b203.45b0ce","type":"function","z":"c127068e.175598","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":100,"wires":[["9255890.a551678"]]},{"id":"8ce6556f.9f7fc8","type":"timed-counter","z":"c127068e.175598","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":80,"wires":[["2625b203.45b0ce"]]},{"id":"36c92b38.de68f4","type":"timed-counter","z":"c127068e.175598","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":120,"wires":[["2625b203.45b0ce"]]},{"id":"fe4ff6c.87d3408","type":"switch","z":"c127068e.175598","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":100,"wires":[["8ce6556f.9f7fc8"],["36c92b38.de68f4"]]},{"id":"e7be23bd.4018d","type":"change","z":"c127068e.175598","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":100,"wires":[["fe4ff6c.87d3408"]]},{"id":"9255890.a551678","type":"switch","z":"c127068e.175598","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":100,"wires":[["268581bc.10d02e"],["260d62fe.0f5a2e"],[],[]]},{"id":"268581bc.10d02e","type":"api-call-service","z":"c127068e.175598","name":"Garderoba mała","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out14"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1260,"y":40,"wires":[[]]},{"id":"260d62fe.0f5a2e","type":"api-call-service","z":"c127068e.175598","name":"Wetnylator obieg","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.main_hub_hub3_out2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":100,"wires":[[]]},{"id":"fdc8921b.93877","type":"api-call-service","z":"c127068e.175598","name":"Duża Garderoba","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out7"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":180,"wires":[[]]},{"id":"411903fe10828364","type":"function","z":"c127068e.175598","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":220,"wires":[["47194414a2d8b124"]]},{"id":"517e2c5d23f8ebef","type":"timed-counter","z":"c127068e.175598","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":200,"wires":[["411903fe10828364"]]},{"id":"26690934f928c9cd","type":"timed-counter","z":"c127068e.175598","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":240,"wires":[["411903fe10828364"]]},{"id":"019d83882c3da0fa","type":"switch","z":"c127068e.175598","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":220,"wires":[["517e2c5d23f8ebef"],["26690934f928c9cd"]]},{"id":"3f1982e3a36e6d7e","type":"change","z":"c127068e.175598","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":220,"wires":[["019d83882c3da0fa"]]},{"id":"47194414a2d8b124","type":"switch","z":"c127068e.175598","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":220,"wires":[["fdc8921b.93877"],[],[],[]]},{"id":"b37eb1fde81f629c","type":"server-state-changed","z":"c127068e.175598","name":"Włącznik Garderoba mała","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in0"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":220,"wires":[["3f1982e3a36e6d7e"]]},{"id":"9d9e14ecd8d04a3d","type":"api-call-service","z":"c127068e.175598","name":"Duża Garderoba","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out7"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":300,"wires":[[]]},{"id":"b1e33fa37d3fd378","type":"function","z":"c127068e.175598","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":340,"wires":[["1895d9c11c191f6b"]]},{"id":"6bca62b03969890a","type":"timed-counter","z":"c127068e.175598","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":320,"wires":[["b1e33fa37d3fd378"]]},{"id":"775b8f1f4ecb8ab3","type":"timed-counter","z":"c127068e.175598","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":360,"wires":[["b1e33fa37d3fd378"]]},{"id":"4d773c8fe83c1846","type":"switch","z":"c127068e.175598","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":340,"wires":[["6bca62b03969890a"],["775b8f1f4ecb8ab3"]]},{"id":"c9b9b3569d9fa91c","type":"change","z":"c127068e.175598","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":340,"wires":[["4d773c8fe83c1846"]]},{"id":"1895d9c11c191f6b","type":"switch","z":"c127068e.175598","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":340,"wires":[["9d9e14ecd8d04a3d"],[],[],[]]},{"id":"d4d51fdc49e62b0a","type":"server-state-changed","z":"c127068e.175598","name":"Włącznik Garderoba mała","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in1"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":340,"wires":[["c9b9b3569d9fa91c"]]},{"id":"dcac36e782856427","type":"server-state-changed","z":"c127068e.175598","name":"Włącznik Garderoba mała","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in1"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":480,"wires":[[]]},{"id":"ad18d5c7.ff8828","type":"tab","label":"Sypialnie","disabled":false,"info":""},{"id":"ff729c74.ce7ba","type":"server-state-changed","z":"ad18d5c7.ff8828","name":"Sypialnia mała 2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in8"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":100,"wires":[["87d5127d.0f944"]]},{"id":"f98f96d8.2b5628","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Halogen + Lampa sypialnia mała","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out10"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1260,"y":60,"wires":[[]]},{"id":"493f8ce4.750644","type":"server-state-changed","z":"ad18d5c7.ff8828","name":"Sypialnia mała 1","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in9"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"off","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":260,"wires":[["3efc4fc.d0831b"],[]]},{"id":"f8cffc03.5bdde","type":"server-state-changed","z":"ad18d5c7.ff8828","name":"Sypialnia duża 1","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in4"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":440,"wires":[["c3f56d4d.8b60a"]]},{"id":"4fae414e.e3586","type":"function","z":"ad18d5c7.ff8828","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":440,"wires":[["3904558a.188a9a"]]},{"id":"cbbf80f9.f10ca","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":420,"wires":[["4fae414e.e3586"]]},{"id":"5b0b75be.dae0ec","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":460,"wires":[["4fae414e.e3586"]]},{"id":"3e59815e.9c1f1e","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":440,"wires":[["cbbf80f9.f10ca"],["5b0b75be.dae0ec"]]},{"id":"c3f56d4d.8b60a","type":"change","z":"ad18d5c7.ff8828","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":440,"wires":[["3e59815e.9c1f1e"]]},{"id":"3904558a.188a9a","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":440,"wires":[["1f2acfcc.97ea2"],["8b8f9c9c0a5e875a"],[],[]]},{"id":"1f2acfcc.97ea2","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Ledy w suficie","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_sypialnia_led"],"labelId":[],"data":"{\t \"brightness\": 50,\t \"rgb_color\": [\t 255,\t 0,\t 0\t ]\t \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1240,"y":380,"wires":[[]]},{"id":"59fa2f9f.d081c","type":"server-state-changed","z":"ad18d5c7.ff8828","name":"Sypialnia duża 2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in5"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":600,"wires":[["99f06904.7d3698"]]},{"id":"7eb3c11c.fda55","type":"function","z":"ad18d5c7.ff8828","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":600,"wires":[["c5069d0f.2eab6"]]},{"id":"11219a6d.bfad06","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":580,"wires":[["7eb3c11c.fda55"]]},{"id":"c074fb60.0cbac8","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":620,"wires":[["7eb3c11c.fda55"]]},{"id":"db8f0c15.d87c6","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":600,"wires":[["11219a6d.bfad06"],["c074fb60.0cbac8"]]},{"id":"99f06904.7d3698","type":"change","z":"ad18d5c7.ff8828","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":600,"wires":[["db8f0c15.d87c6"]]},{"id":"c5069d0f.2eab6","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":600,"wires":[["f4809350.f8119"],[],[],[]]},{"id":"f4809350.f8119","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Sypialnia duża TV","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out7"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1250,"y":540,"wires":[[]]},{"id":"ff79160.e08dee8","type":"server-state-changed","z":"ad18d5c7.ff8828","name":"Sypialnia duża 3","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in3"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":760,"wires":[["33d2e841.0f2e98"]]},{"id":"7f4f1720.12e3f8","type":"function","z":"ad18d5c7.ff8828","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":760,"wires":[["52380b77.169044"]]},{"id":"d9f7c752.c4fad8","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":740,"wires":[["7f4f1720.12e3f8"]]},{"id":"c92d92df.60f66","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":780,"wires":[["7f4f1720.12e3f8"]]},{"id":"dadef394.2e7d9","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":760,"wires":[["d9f7c752.c4fad8"],["c92d92df.60f66"]]},{"id":"33d2e841.0f2e98","type":"change","z":"ad18d5c7.ff8828","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":760,"wires":[["dadef394.2e7d9"]]},{"id":"52380b77.169044","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":760,"wires":[["b2af43a6.d871a"],["ea662680.6a6a48"],[],[]]},{"id":"b2af43a6.d871a","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Włącz Lampy nad łóżkiem","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.turn_on","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out12","light.main_hub_hub2_out1"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"turn_on","x":1270,"y":700,"wires":[[]]},{"id":"ea662680.6a6a48","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Wyłącz Lampy nad łózkiem","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out12","light.main_hub_hub2_out1"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1280,"y":760,"wires":[[]]},{"id":"c1bb31a9.7313","type":"server-state-changed","z":"ad18d5c7.ff8828","name":"Sypialnia Łóżko prawo","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in6"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":940,"wires":[["3dc39e07.7a4e62"]]},{"id":"7fb0a74d.a83d28","type":"function","z":"ad18d5c7.ff8828","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":940,"wires":[["e43c2113.b46ee"]]},{"id":"c3a7365.573abc8","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":920,"wires":[["7fb0a74d.a83d28"]]},{"id":"6eac543a.dec74c","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":960,"wires":[["7fb0a74d.a83d28"]]},{"id":"5033dc65.fb60f4","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":940,"wires":[["c3a7365.573abc8"],["6eac543a.dec74c"]]},{"id":"3dc39e07.7a4e62","type":"change","z":"ad18d5c7.ff8828","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":940,"wires":[["5033dc65.fb60f4"]]},{"id":"e43c2113.b46ee","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":940,"wires":[["1b427f86.60162"],["66e8a832.486458"],[],["1d8725c151f8575c"]]},{"id":"1b427f86.60162","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Halogen nad łóżkiem prawy","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out1"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1280,"y":880,"wires":[[]]},{"id":"c8181846.257548","type":"server-state-changed","z":"ad18d5c7.ff8828","name":"Sypialnia Łóżko lewo","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub1_in7"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":1120,"wires":[["bf2c5cff.dad81"]]},{"id":"1e0548be.7419d7","type":"function","z":"ad18d5c7.ff8828","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":1120,"wires":[["da824854.49a0a8"]]},{"id":"184be79d.956ce8","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":1100,"wires":[["1e0548be.7419d7"]]},{"id":"8f5d4312.9880e","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":700,"y":1140,"wires":[["1e0548be.7419d7"]]},{"id":"4fbc7db2.0568a4","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":1120,"wires":[["184be79d.956ce8"],["8f5d4312.9880e"]]},{"id":"bf2c5cff.dad81","type":"change","z":"ad18d5c7.ff8828","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":1120,"wires":[["4fbc7db2.0568a4"]]},{"id":"da824854.49a0a8","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1030,"y":1120,"wires":[["250aae82.2406e2"],["66e8a832.486458"],[],["1d8725c151f8575c"]]},{"id":"250aae82.2406e2","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Halogen nad łóżkiem lewy","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out12"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":1060,"wires":[[]]},{"id":"3efc4fc.d0831b","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Ledy w suficie","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_pokoj_dla_gosci_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":360,"y":260,"wires":[[]]},{"id":"47ffce42.c7f11","type":"function","z":"ad18d5c7.ff8828","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":860,"y":100,"wires":[["19dfd9b9.d79586"]]},{"id":"7ab594f0.2b905c","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":680,"y":80,"wires":[["47ffce42.c7f11"]]},{"id":"fbece98d.516e48","type":"timed-counter","z":"ad18d5c7.ff8828","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":680,"y":120,"wires":[["47ffce42.c7f11"]]},{"id":"42721387.13eacc","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":510,"y":100,"wires":[["7ab594f0.2b905c"],["fbece98d.516e48"]]},{"id":"87d5127d.0f944","type":"change","z":"ad18d5c7.ff8828","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":100,"wires":[["42721387.13eacc"]]},{"id":"19dfd9b9.d79586","type":"switch","z":"ad18d5c7.ff8828","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1010,"y":100,"wires":[["f98f96d8.2b5628"],["a40ca866.d005c8"],[],[]]},{"id":"a40ca866.d005c8","type":"api-call-service","z":"ad18d5c7.ff8828","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out7"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1240,"y":120,"wires":[[]]},{"id":"66e8a832.486458","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Wyłąćz Halogen nad łóżkiem","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out12","light.main_hub_hub2_out1"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1280,"y":940,"wires":[[]]},{"id":"8b8f9c9c0a5e875a","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Ledy w suficie","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_sypialnia_led"],"labelId":[],"data":"{\t \"brightness\": 255,\t \"rgb_color\": [\t 255,\t 255,\t 255\t ]\t \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1240,"y":440,"wires":[[]]},{"id":"1d8725c151f8575c","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Wyłącz wszystkie lampy","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1270,"y":1000,"wires":[["d531d430f673c67e"]]},{"id":"d531d430f673c67e","type":"api-call-service","z":"ad18d5c7.ff8828","name":"Wyłącz wszystkie wantylatory","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"fan.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"fan","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1600,"y":1000,"wires":[[]]},{"id":"49d9a8ab.75a718","type":"tab","label":"Salon i Kuchnia","disabled":false,"info":""},{"id":"2ee0efb6.9053f","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":100,"wires":[["b380588.5b47ca8"]]},{"id":"35cc37c6.0088d8","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":80,"wires":[["2ee0efb6.9053f"]]},{"id":"9f2b5908.6fee68","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":120,"wires":[["2ee0efb6.9053f"]]},{"id":"ee4cd089.69895","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":100,"wires":[["35cc37c6.0088d8"],["9f2b5908.6fee68"]]},{"id":"26c78eb0.19b7b2","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":100,"wires":[["ee4cd089.69895"]]},{"id":"b380588.5b47ca8","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":100,"wires":[["1e40e868.60aa78"],["2684ae6c.728cd2"],[],[]]},{"id":"1e40e868.60aa78","type":"api-call-service","z":"49d9a8ab.75a718","name":"Plafon Salon","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out11"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"toggle","x":1250,"y":40,"wires":[[]]},{"id":"d2d087b3.0cec18","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Filar 1_2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in10"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":280,"wires":[["59b61177.68ab"]]},{"id":"644ba8e2.983168","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":280,"wires":[["405cea66.311ce4"]]},{"id":"aec18fed.41b65","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":260,"wires":[["644ba8e2.983168"]]},{"id":"c9852e06.55539","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":300,"wires":[["644ba8e2.983168"]]},{"id":"2b527e99.028742","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":280,"wires":[["aec18fed.41b65"],["c9852e06.55539"]]},{"id":"59b61177.68ab","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":280,"wires":[["2b527e99.028742"]]},{"id":"405cea66.311ce4","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":280,"wires":[["ac1f9b6c.3eb998"],["5de6ffb0.5e628"],[],["dadb851f.000ea8"]]},{"id":"ac1f9b6c.3eb998","type":"api-call-service","z":"49d9a8ab.75a718","name":"Kinkiety/Komin Salon","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.komin_led","light.salon_kinkiety_led"],"labelId":[],"data":"{\"effect\":\"Rise light\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1280,"y":220,"wires":[[]]},{"id":"627c651d.1c47cc","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Filar 2_1","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in7"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":460,"wires":[["57474187.594b1"]]},{"id":"aa98ccca.4c125","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":460,"wires":[["ed29d2bc.b78bf"]]},{"id":"ac6480c9.5436","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":440,"wires":[["aa98ccca.4c125"]]},{"id":"7023d2ee.4f179c","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":480,"wires":[["aa98ccca.4c125"]]},{"id":"e43c9071.131c4","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":460,"wires":[["ac6480c9.5436"],["7023d2ee.4f179c"]]},{"id":"57474187.594b1","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":460,"wires":[["e43c9071.131c4"]]},{"id":"ed29d2bc.b78bf","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":460,"wires":[["aa53aa20.d07478"],[],[],["e7bf5f0b84a73da3"]]},{"id":"aa53aa20.d07478","type":"api-call-service","z":"49d9a8ab.75a718","name":"Kuchnia","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out3"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"toggle","x":1240,"y":400,"wires":[[]]},{"id":"29e8b70f.f5c468","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Filar 2_2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in8"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":660,"wires":[["aa4c9fa0.a0ed1"]]},{"id":"5366e17e.e823e","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":660,"wires":[["9f2b1b4.7e161e8"]]},{"id":"5fa72c4a.f2e7a4","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":640,"wires":[["5366e17e.e823e"]]},{"id":"137c1a.a55b33e6","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":680,"wires":[["5366e17e.e823e"]]},{"id":"7a7a424c.22013c","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":660,"wires":[["5fa72c4a.f2e7a4"],["137c1a.a55b33e6"]]},{"id":"aa4c9fa0.a0ed1","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":660,"wires":[["7a7a424c.22013c"]]},{"id":"9f2b1b4.7e161e8","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":660,"wires":[["79c80769.1f9e78"],[],[],[]]},{"id":"53bad49d.d04cbc","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Filar 3_1","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in5"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":860,"wires":[["50d071e3.f48dd"]]},{"id":"c838882d.9aff38","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":860,"wires":[["426b7df7.bbad04"]]},{"id":"c44788bf.c6ec68","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"500","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":840,"wires":[["c838882d.9aff38"]]},{"id":"48b6d28a.4af14c","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"500","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":880,"wires":[["c838882d.9aff38"]]},{"id":"e9c45cca.80bcc","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":860,"wires":[["c44788bf.c6ec68"],["48b6d28a.4af14c"]]},{"id":"50d071e3.f48dd","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":860,"wires":[["e9c45cca.80bcc"]]},{"id":"426b7df7.bbad04","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":860,"wires":[["c4dc5fad.09d98"],[],[],[]]},{"id":"c4dc5fad.09d98","type":"api-call-service","z":"49d9a8ab.75a718","name":"Halogeny Jadalnia","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out8"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":800,"wires":[[]]},{"id":"1b9e0836.5ce898","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Filar 3_2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in6"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1060,"wires":[["caa76c00.dad35"]]},{"id":"3b30d96d.0d3e96","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":1060,"wires":[["566d2d5f.a9d824"]]},{"id":"53a62ee6.be399","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1040,"wires":[["3b30d96d.0d3e96"]]},{"id":"f9bfab22.591238","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1080,"wires":[["3b30d96d.0d3e96"]]},{"id":"334a1f33.74556","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1060,"wires":[["53a62ee6.be399"],["f9bfab22.591238"]]},{"id":"caa76c00.dad35","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1060,"wires":[["334a1f33.74556"]]},{"id":"566d2d5f.a9d824","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":1060,"wires":[["cbd7dde5.ca87c"],[],[],[]]},{"id":"cbd7dde5.ca87c","type":"api-call-service","z":"49d9a8ab.75a718","name":"Ledy Jadalnia","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_jadalnia_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"toggle","x":1260,"y":1000,"wires":[[]]},{"id":"79c80769.1f9e78","type":"api-call-service","z":"49d9a8ab.75a718","name":"Kuchnia","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_kuchnia_lezka_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1240,"y":600,"wires":[[]]},{"id":"61257db4.00aff4","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Salon 1","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in12"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":1260,"wires":[["833c50ad.80a46"]]},{"id":"2c6af5f6.c2c43a","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":1260,"wires":[["85cf8076.a273"]]},{"id":"bd6e77e0.864398","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1240,"wires":[["2c6af5f6.c2c43a"]]},{"id":"e85a64f2.d50228","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1280,"wires":[["2c6af5f6.c2c43a"]]},{"id":"3de7aed2.694712","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1260,"wires":[["bd6e77e0.864398"],["e85a64f2.d50228"]]},{"id":"833c50ad.80a46","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1260,"wires":[["3de7aed2.694712"]]},{"id":"85cf8076.a273","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":1260,"wires":[["b60a4176.e655b"],[],[],[]]},{"id":"256efad6.f3ebd6","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Salon 2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in13"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":1460,"wires":[["f8dda16e.b0184"]]},{"id":"a9a5fd7c.91fe3","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":1460,"wires":[["82fb47de.c8e3f8"]]},{"id":"afcf3846.592408","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1440,"wires":[["a9a5fd7c.91fe3"]]},{"id":"da8ac3b9.e5807","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1480,"wires":[["a9a5fd7c.91fe3"]]},{"id":"95033fc0.f8fa1","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1460,"wires":[["afcf3846.592408"],["da8ac3b9.e5807"]]},{"id":"f8dda16e.b0184","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1460,"wires":[["95033fc0.f8fa1"]]},{"id":"82fb47de.c8e3f8","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":1460,"wires":[["6ab760c7.6c4e8"],["7db12148.3c70f"],[],["b5cb681e.6b5cd8"]]},{"id":"f5d320f9.b9f76","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Salon 3","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in11"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":1660,"wires":[["e0a7dd80.bb4a8"]]},{"id":"5fb40943.d16cd8","type":"function","z":"49d9a8ab.75a718","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":1660,"wires":[["d2d5de11.b07b2"]]},{"id":"33e9af33.e9bda","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1640,"wires":[["5fb40943.d16cd8"]]},{"id":"1a59f2ec.ee6b7d","type":"timed-counter","z":"49d9a8ab.75a718","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":1680,"wires":[["5fb40943.d16cd8"]]},{"id":"3ab3c626.cc6a7a","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":1660,"wires":[["33e9af33.e9bda"],["1a59f2ec.ee6b7d"]]},{"id":"e0a7dd80.bb4a8","type":"change","z":"49d9a8ab.75a718","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":1660,"wires":[["3ab3c626.cc6a7a"]]},{"id":"d2d5de11.b07b2","type":"switch","z":"49d9a8ab.75a718","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":1660,"wires":[["3d8d47b4.addcb8"],[],[],[]]},{"id":"194e6551.84184b","type":"api-call-service","z":"49d9a8ab.75a718","name":"Schody LEDy","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.schody"],"labelId":[],"data":"{\"effect\":\"Rise light\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"toggle","x":1260,"y":1700,"wires":[[]]},{"id":"b5cb681e.6b5cd8","type":"api-call-service","z":"49d9a8ab.75a718","name":"Komin Led","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.komin_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"toggle","x":1250,"y":1520,"wires":[[]]},{"id":"2684ae6c.728cd2","type":"api-call-service","z":"49d9a8ab.75a718","name":"Wentylator Salon","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.salon_wentylator"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1270,"y":100,"wires":[[]]},{"id":"b60a4176.e655b","type":"api-call-service","z":"49d9a8ab.75a718","name":"Plafon Salon","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out11"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1250,"y":1200,"wires":[[]]},{"id":"6ab760c7.6c4e8","type":"api-call-service","z":"49d9a8ab.75a718","name":"Ledy Kinkiety","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.salon_kinkiet_1_led","light.salon_kinkiet_2_led","light.salon_kinkiet_3_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"toggle","x":1250,"y":1400,"wires":[[]]},{"id":"7db12148.3c70f","type":"api-call-service","z":"49d9a8ab.75a718","name":"Ledy Kinkiety","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.salon_kinkiety_led","light.salon_kinkiet_1_led","light.salon_kinkiet_2_led","light.salon_kinkiet_3_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","x":1250,"y":1460,"wires":[[]]},{"id":"3d8d47b4.addcb8","type":"api-call-service","z":"49d9a8ab.75a718","name":"Zwisy schody","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"light.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.oczka_taras_2","light.skrzynia_2","light.tunel_2","light.zwis_schody_2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"light","service":"toggle","x":1260,"y":1640,"wires":[[]]},{"id":"5de6ffb0.5e628","type":"api-call-service","z":"49d9a8ab.75a718","name":"Kinkiety/Komin Salon","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.turn_on","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.komin_led"],"labelId":[],"data":"{\"entity_id\":\"light.komin_led\",\"brightness_step_pct\":\"10\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"turn_on","x":1280,"y":260,"wires":[[]]},{"id":"dadb851f.000ea8","type":"api-call-service","z":"49d9a8ab.75a718","name":"Kinkiety/Komin Salon","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.turn_on","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.komin_led"],"labelId":[],"data":"{\"entity_id\":\"light.komin_led\",\"brightness_step_pct\":\"-10\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"turn_on","x":1280,"y":300,"wires":[[]]},{"id":"f9b79959.944478","type":"server-state-changed","z":"49d9a8ab.75a718","name":"Filar 1_1","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub2_in9"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":100,"wires":[["26c78eb0.19b7b2"]]},{"id":"e7bf5f0b84a73da3","type":"api-call-service","z":"49d9a8ab.75a718","name":"Wyłącz wszystkie lampy","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"light","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1290,"y":540,"wires":[["1cb575eaa9653ce7"]]},{"id":"1cb575eaa9653ce7","type":"api-call-service","z":"49d9a8ab.75a718","name":"Wyłącz wszystkie wantylatory","server":"e6b1b546.b23368","version":7,"debugenabled":false,"action":"fan.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":["all"],"labelId":[],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"fan","service":"turn_off","output_location":"payload","output_location_type":"msg","x":1600,"y":540,"wires":[[]]},{"id":"30212bee.794d64","type":"tab","label":"Łazienki","disabled":false,"info":""},{"id":"9946b814.9c17c8","type":"server-state-changed","z":"30212bee.794d64","name":"SPA Prawy","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in3"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":700,"wires":[["6f58fbd1.3b8d64"]]},{"id":"ddd62738.a6f868","type":"server-state-changed","z":"30212bee.794d64","name":"SPA Lewy","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in2"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":820,"wires":[["57a10cf5.276c44"]]},{"id":"eb3ae55f.697528","type":"api-call-service","z":"30212bee.794d64","name":"SPA Wentylator","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.main_hub_hub1_out4"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1560,"y":620,"wires":[[]]},{"id":"3b70701b.fde1f","type":"api-call-service","z":"30212bee.794d64","name":"SPA Ledy","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_spa_ledy"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1530,"y":760,"wires":[[]]},{"id":"1b559a4.fd94366","type":"api-call-service","z":"30212bee.794d64","name":"SPA Halongeny","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out10"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1560,"y":680,"wires":[[]]},{"id":"75fbe49f.07a49c","type":"api-call-service","z":"30212bee.794d64","name":"SPA Zwisy","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out13"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1550,"y":820,"wires":[[]]},{"id":"a25c8db4.995b6","type":"function","z":"30212bee.794d64","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1160,"y":700,"wires":[["2117e4bf.f964bc"]]},{"id":"b055b03f.b7739","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":980,"y":680,"wires":[["a25c8db4.995b6"]]},{"id":"96cfd509.f6f378","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":980,"y":720,"wires":[["a25c8db4.995b6"]]},{"id":"11c21e6f.9f0e42","type":"switch","z":"30212bee.794d64","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":700,"wires":[["b055b03f.b7739"],["96cfd509.f6f378"]]},{"id":"6f58fbd1.3b8d64","type":"change","z":"30212bee.794d64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":700,"wires":[["11c21e6f.9f0e42"]]},{"id":"2117e4bf.f964bc","type":"switch","z":"30212bee.794d64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1310,"y":700,"wires":[["eb3ae55f.697528","1b559a4.fd94366"],[],[],["3b70701b.fde1f"]]},{"id":"b9273595.e13478","type":"function","z":"30212bee.794d64","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1160,"y":820,"wires":[["e653b6b8.d5fb78"]]},{"id":"4c21d334.8c92ec","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":980,"y":800,"wires":[["b9273595.e13478"]]},{"id":"c0325c6a.a94e5","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":980,"y":840,"wires":[["b9273595.e13478"]]},{"id":"edacc0c3.90668","type":"switch","z":"30212bee.794d64","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":820,"wires":[["4c21d334.8c92ec"],["c0325c6a.a94e5"]]},{"id":"57a10cf5.276c44","type":"change","z":"30212bee.794d64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":820,"wires":[["edacc0c3.90668"]]},{"id":"e653b6b8.d5fb78","type":"switch","z":"30212bee.794d64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1310,"y":820,"wires":[["75fbe49f.07a49c"],[],[],["b7e5e517.8daba8"]]},{"id":"b7e5e517.8daba8","type":"api-call-service","z":"30212bee.794d64","name":"SPA Wentylator","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.main_hub_hub1_out4"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1540,"y":880,"wires":[[]]},{"id":"d592ffb6.70dc","type":"server-state-changed","z":"30212bee.794d64","name":"WC Prawy","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in5"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"off","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":940,"wires":[["6bf6bb1b.3654c4","7f5a798821eb50d3","82fcb0139accc567"],[]]},{"id":"6bf6bb1b.3654c4","type":"api-call-service","z":"30212bee.794d64","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out2"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":660,"y":940,"wires":[[]]},{"id":"b433dd7d.0350d","type":"server-state-changed","z":"30212bee.794d64","name":"WC Lewy","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in6"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"off","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":1080,"wires":[["8682d019.f3619"],[]]},{"id":"8682d019.f3619","type":"api-call-service","z":"30212bee.794d64","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out9"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":660,"y":1080,"wires":[[]]},{"id":"82fcb0139accc567","type":"api-call-service","z":"30212bee.794d64","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.main_hub_hub2_out5"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":660,"y":1000,"wires":[[]]},{"id":"7f5a798821eb50d3","type":"api-call-service","z":"30212bee.794d64","name":"","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.wc_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":660,"y":880,"wires":[[]]},{"id":"302f21b8.48bd2e","type":"api-call-service","z":"30212bee.794d64","name":"Kanciapa pod schodami","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out5"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1590,"y":300,"wires":[[]]},{"id":"cfbe8a46.ea6988","type":"api-call-service","z":"30212bee.794d64","name":"SPA Lustro Kinkiet","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub1_out1"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1570,"y":480,"wires":[[]]},{"id":"9c07253dc96776a7","type":"function","z":"30212bee.794d64","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1160,"y":360,"wires":[["b68aa77879b21d7c"]]},{"id":"432a318f4b2b79a5","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":980,"y":340,"wires":[["9c07253dc96776a7"]]},{"id":"d14eb46bc5bd3afc","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":980,"y":380,"wires":[["9c07253dc96776a7"]]},{"id":"513873295aadec99","type":"switch","z":"30212bee.794d64","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":360,"wires":[["432a318f4b2b79a5"],["d14eb46bc5bd3afc"]]},{"id":"55a3700ac54dde3e","type":"change","z":"30212bee.794d64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":360,"wires":[["513873295aadec99"]]},{"id":"b68aa77879b21d7c","type":"switch","z":"30212bee.794d64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1310,"y":360,"wires":[["302f21b8.48bd2e"],[],[],[]]},{"id":"2b85304acd7ff3b0","type":"function","z":"30212bee.794d64","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1180,"y":540,"wires":[["597c7fec97412171"]]},{"id":"d482633a2c194b8b","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":1000,"y":520,"wires":[["2b85304acd7ff3b0"]]},{"id":"bf74163629ac3e20","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":1000,"y":560,"wires":[["2b85304acd7ff3b0"]]},{"id":"b8fddaa4353c2af9","type":"switch","z":"30212bee.794d64","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":540,"wires":[["d482633a2c194b8b"],["bf74163629ac3e20"]]},{"id":"d81d12b6c363aa6f","type":"change","z":"30212bee.794d64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":540,"wires":[["b8fddaa4353c2af9"]]},{"id":"597c7fec97412171","type":"switch","z":"30212bee.794d64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1330,"y":540,"wires":[["cfbe8a46.ea6988"],[],[],[]]},{"id":"10d1f722985ad2b8","type":"server-state-changed","z":"30212bee.794d64","name":"SPA Prawy","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in9"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":540,"wires":[["d81d12b6c363aa6f"]]},{"id":"0d34be58720f462a","type":"server-state-changed","z":"30212bee.794d64","name":"SPA Prawy","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in8"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is_not","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":120,"y":360,"wires":[["55a3700ac54dde3e"]]},{"id":"10ef4fcb.79e94","type":"api-call-service","z":"30212bee.794d64","name":"Łazienka Plafon","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out0"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1520,"y":1160,"wires":[[]]},{"id":"1ffca80.0eb3158","type":"function","z":"30212bee.794d64","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1180,"y":1220,"wires":[["e3c2dea6.6bed2"]]},{"id":"d53ccbc4.9dada8","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":1000,"y":1200,"wires":[["1ffca80.0eb3158"]]},{"id":"4af3a53d.16a9fc","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":1000,"y":1240,"wires":[["1ffca80.0eb3158"]]},{"id":"18362d10.d9e1d3","type":"switch","z":"30212bee.794d64","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":1220,"wires":[["d53ccbc4.9dada8"],["4af3a53d.16a9fc"]]},{"id":"a8d373f4.84d1d","type":"change","z":"30212bee.794d64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":1220,"wires":[["18362d10.d9e1d3"]]},{"id":"e3c2dea6.6bed2","type":"switch","z":"30212bee.794d64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1330,"y":1220,"wires":[["10ef4fcb.79e94","2cde911a.203f0e"],["ee1871a9.9274d"],[],["21a9a2d2.aa07ee"]]},{"id":"20e1f7f7.dbe538","type":"server-state-changed","z":"30212bee.794d64","name":"Włącznik Biała łazienka plafon","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in4"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":1220,"wires":[["a8d373f4.84d1d"]]},{"id":"ee1871a9.9274d","type":"api-call-service","z":"30212bee.794d64","name":"Ledy pod wanną","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_biala_lazienka_wanna_led"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1520,"y":1220,"wires":[[]]},{"id":"21a9a2d2.aa07ee","type":"api-call-service","z":"30212bee.794d64","name":"Łazinka Wentylator","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.main_hub_hub2_out8"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1530,"y":1280,"wires":[[]]},{"id":"2cde911a.203f0e","type":"api-call-service","z":"30212bee.794d64","name":"Łazienka wentylator","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["fan.main_hub_hub2_out8"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1540,"y":1120,"wires":[[]]},{"id":"8a765ac78a9f36a7","type":"function","z":"30212bee.794d64","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1180,"y":1400,"wires":[["43d93904a31d7355"]]},{"id":"b28789e9b83b64c9","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":1000,"y":1380,"wires":[["8a765ac78a9f36a7"]]},{"id":"3e958a6293f28290","type":"timed-counter","z":"30212bee.794d64","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":1000,"y":1420,"wires":[["8a765ac78a9f36a7"]]},{"id":"6108c2fd9e9043b9","type":"switch","z":"30212bee.794d64","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":1400,"wires":[["b28789e9b83b64c9"],["3e958a6293f28290"]]},{"id":"c3f1aab441950b0e","type":"change","z":"30212bee.794d64","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":1400,"wires":[["6108c2fd9e9043b9"]]},{"id":"43d93904a31d7355","type":"switch","z":"30212bee.794d64","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1330,"y":1400,"wires":[["e276385b752e3458"],[],[],[]]},{"id":"7975d4b082b628e6","type":"server-state-changed","z":"30212bee.794d64","name":"Włącznik Biała łazienka skos","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.hub3_in7"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":1400,"wires":[["c3f1aab441950b0e"]]},{"id":"e276385b752e3458","type":"api-call-service","z":"30212bee.794d64","name":"Łazienka wentylator","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.main_hub_hub2_out4"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1540,"y":1340,"wires":[[]]},{"id":"8792feeb.c171","type":"tab","label":"Góra","disabled":false,"info":""},{"id":"803f2911.cde838","type":"server-state-changed","z":"8792feeb.c171","name":"Włącznik Góra 1","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.gora_1"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":100,"wires":[["9ead49f7.43ead8"],[]]},{"id":"e4ea2712.2e9868","type":"api-call-service","z":"8792feeb.c171","name":"Schody","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.zwis_schody"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":380,"y":380,"wires":[[]]},{"id":"3a135f18.6564e","type":"server-state-changed","z":"8792feeb.c171","name":"Włĝ�cznik Góra 2","server":"b8019c99.626c3","version":6,"outputs":1,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.gora_2"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":240,"wires":[["a7660a6d.53a2c8"]]},{"id":"563deac4.030bb4","type":"function","z":"8792feeb.c171","name":"function","func":"var pressTime;\n\nif (msg.count >= 3 && msg.payload.value == '1')\n{\n msg.payload = \"triple\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":240,"wires":[["e59a571.3a326a8"]]},{"id":"91c313fc.495d4","type":"timed-counter","z":"8792feeb.c171","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":220,"wires":[["563deac4.030bb4"]]},{"id":"80007490.7ddc58","type":"timed-counter","z":"8792feeb.c171","name":"","timelimit":"200","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":720,"y":260,"wires":[["563deac4.030bb4"]]},{"id":"111bb202.a09fae","type":"switch","z":"8792feeb.c171","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":550,"y":240,"wires":[["91c313fc.495d4"],["80007490.7ddc58"]]},{"id":"a7660a6d.53a2c8","type":"change","z":"8792feeb.c171","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"str"},{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":240,"wires":[["111bb202.a09fae"]]},{"id":"e59a571.3a326a8","type":"switch","z":"8792feeb.c171","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"single","vt":"str"},{"t":"eq","v":"double","vt":"str"},{"t":"eq","v":"triple","vt":"str"},{"t":"eq","v":"long","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1050,"y":240,"wires":[["15dcad7a.b0d143"],[],[],["8e522785.f936b8"]]},{"id":"15dcad7a.b0d143","type":"api-call-service","z":"8792feeb.c171","name":"Skrzynia","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.skrzynia"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1240,"y":200,"wires":[[]]},{"id":"9dc3730c.ef2a1","type":"server-state-changed","z":"8792feeb.c171","name":"Włącznik Góra 3","server":"b8019c99.626c3","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["binary_sensor.gora_3"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"20","forType":"num","forUnits":"milliseconds","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":380,"wires":[["e4ea2712.2e9868"],[]]},{"id":"9ead49f7.43ead8","type":"api-call-service","z":"8792feeb.c171","name":"Oczka Taras","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.oczka_taras"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":390,"y":100,"wires":[[]]},{"id":"8e522785.f936b8","type":"api-call-service","z":"8792feeb.c171","name":"Tunel","server":"b8019c99.626c3","version":7,"debugenabled":false,"action":"homeassistant.toggle","floorId":[],"areaId":[],"deviceId":[],"entityId":["light.tunel"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"homeassistant","service":"toggle","x":1230,"y":260,"wires":[[]]},{"id":"b8019c99.626c3","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"e6b1b546.b23368","type":"server","name":"Home Assistant","addon":true}] \ No newline at end of file diff --git a/Kuba/main-hub.yaml b/Kuba/main-hub.yaml new file mode 100644 index 0000000..9fd6c24 --- /dev/null +++ b/Kuba/main-hub.yaml @@ -0,0 +1,97 @@ +esphome: + name: main-hub + friendly_name: main-hub + +esp32: + board: esp32dev + framework: + type: esp-idf + +logger: + +api: + encryption: + key: "eyBNZWDUaBDCTIZsSIUzwHFpUcm/Kbc9UAWjX++ToL4=" + +ota: + - platform: esphome + password: "000f95472f1adc514d45abdc280a3903" + +#wifi: +# ssid: !secret wifi_ssid +# password: !secret wifi_password +# +# ap: +# ssid: "Main-Hub Fallback Hotspot" +# password: "y0LGSOyT5tjJ" + +#captive_portal: + +web_server: + port: 80 + +ethernet: + type: LAN8720 + mdc_pin: GPIO23 + mdio_pin: GPIO18 + clk_mode: GPIO17_OUT + phy_addr: 0 + power_pin: GPIO12 + +button: + - platform: restart + name: "main-hub Restart" + +packages: + i2c: !include packages/i2c.yaml + pca9685: !include packages/pca9685.yaml + mcp23017_outputs: !include packages/mcp23017_outputs.yaml + mcp23017_inputs: !include packages/mcp23017_inputs.yaml + scripts: !include packages/scripts.yaml + +esp32_ble_tracker: + +sensor: + - platform: uptime + type: seconds + name: Uptime Sensor + - platform: atc_mithermometer + mac_address: "A4:C1:38:C5:11:58" + temperature: + name: "Biuro Temperatura" + humidity: + name: "Biuro Nawilżenie" + battery_level: + name: "Biuro Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:5C:4F:38" + temperature: + name: "Serwer Temperatura" + humidity: + name: "Serwer Nawilżenie" + battery_level: + name: "Serwer Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:67:6B:94" + temperature: + name: "Kuchnia Temperatura" + humidity: + name: "Kuchnia Nawilżenie" + battery_level: + name: "Kuchnia Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:C9:FE:CA" + temperature: + name: "WC Temperatura" + humidity: + name: "WC Nawilżenie" + battery_level: + name: "WC Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:63:6D:DB" + temperature: + name: "Łazienka Temperatura" + humidity: + name: "Łazienka Nawilżenie" + battery_level: + name: "Łazienka Bateria" diff --git a/Kuba/packages/i2c.yaml b/Kuba/packages/i2c.yaml new file mode 100644 index 0000000..5cd2925 --- /dev/null +++ b/Kuba/packages/i2c.yaml @@ -0,0 +1,5 @@ +i2c: + sda: 13 + scl: 16 + scan: True + frequency: 200kHz diff --git a/Kuba/packages/main-hub.yaml b/Kuba/packages/main-hub.yaml new file mode 100644 index 0000000..9fd6c24 --- /dev/null +++ b/Kuba/packages/main-hub.yaml @@ -0,0 +1,97 @@ +esphome: + name: main-hub + friendly_name: main-hub + +esp32: + board: esp32dev + framework: + type: esp-idf + +logger: + +api: + encryption: + key: "eyBNZWDUaBDCTIZsSIUzwHFpUcm/Kbc9UAWjX++ToL4=" + +ota: + - platform: esphome + password: "000f95472f1adc514d45abdc280a3903" + +#wifi: +# ssid: !secret wifi_ssid +# password: !secret wifi_password +# +# ap: +# ssid: "Main-Hub Fallback Hotspot" +# password: "y0LGSOyT5tjJ" + +#captive_portal: + +web_server: + port: 80 + +ethernet: + type: LAN8720 + mdc_pin: GPIO23 + mdio_pin: GPIO18 + clk_mode: GPIO17_OUT + phy_addr: 0 + power_pin: GPIO12 + +button: + - platform: restart + name: "main-hub Restart" + +packages: + i2c: !include packages/i2c.yaml + pca9685: !include packages/pca9685.yaml + mcp23017_outputs: !include packages/mcp23017_outputs.yaml + mcp23017_inputs: !include packages/mcp23017_inputs.yaml + scripts: !include packages/scripts.yaml + +esp32_ble_tracker: + +sensor: + - platform: uptime + type: seconds + name: Uptime Sensor + - platform: atc_mithermometer + mac_address: "A4:C1:38:C5:11:58" + temperature: + name: "Biuro Temperatura" + humidity: + name: "Biuro Nawilżenie" + battery_level: + name: "Biuro Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:5C:4F:38" + temperature: + name: "Serwer Temperatura" + humidity: + name: "Serwer Nawilżenie" + battery_level: + name: "Serwer Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:67:6B:94" + temperature: + name: "Kuchnia Temperatura" + humidity: + name: "Kuchnia Nawilżenie" + battery_level: + name: "Kuchnia Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:C9:FE:CA" + temperature: + name: "WC Temperatura" + humidity: + name: "WC Nawilżenie" + battery_level: + name: "WC Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:63:6D:DB" + temperature: + name: "Łazienka Temperatura" + humidity: + name: "Łazienka Nawilżenie" + battery_level: + name: "Łazienka Bateria" diff --git a/Kuba/packages/mcp23017_inputs.yaml b/Kuba/packages/mcp23017_inputs.yaml new file mode 100644 index 0000000..3fcffd5 --- /dev/null +++ b/Kuba/packages/mcp23017_inputs.yaml @@ -0,0 +1,884 @@ +mcp23017: + - id: "mcp23xxx_hub1_IN" + address: 0x20 + - id: "mcp23xxx_hub2_IN" + address: 0x22 + - id: "mcp23xxx_hub3_IN" + address: 0x24 + + +binary_sensor: + ################## + #mcp23xxx_hub1_IN# + ################## + + # Wejście 1 — single: halogeny wejście, triple: wyłącz lampy, long: wyłącz wentylatory + - platform: gpio + name: "hub1_in0" + id: hub1_in0 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 0 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out15 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: off_all_lights + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_fans + + # Wejście 3 — brak automatyzacji w Node-RED + - platform: gpio + name: "hub1_in1" + id: hub1_in1 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 1 + mode: INPUT + inverted: True + + # Wejście 2 — single: hub1_out14, triple: WLED korytarz kinkiety + - platform: gpio + name: "hub1_in2" + id: hub1_in2 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 2 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out14 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_korytarz_kinkiety_toggle + + # Sypialnia 3 — single: turn_on hub2_out12+hub2_out1, double: toggle hub2_out12+hub2_out1 + - platform: gpio + name: "hub1_in3" + id: hub1_in3 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 3 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.turn_on: hub2_out12 + - light.turn_on: hub2_out1 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out12 + - light.toggle: hub2_out1 + + # Sypialnia 1 — single: sypialnia LED + - platform: gpio + name: "hub1_in4" + id: hub1_in4 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 4 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: sypialnia_led + + # Sypialnia 2 — single: hub2_out7 + - platform: gpio + name: "hub1_in5" + id: hub1_in5 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 5 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out7 + + # Sypialnia Łóżko Prawa Strona — single: hub2_out1, double: hub2_out12+hub2_out1, long: wyłącz wszystkie + - platform: gpio + name: "hub1_in6" + id: hub1_in6 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 6 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out1 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out12 + - light.toggle: hub2_out1 + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Sypialnia Łóżko Lewa Strona — single: hub2_out12, double: hub2_out12+hub2_out1, long: wyłącz wszystkie + - platform: gpio + name: "hub1_in7" + id: hub1_in7 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 7 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out12 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out12 + - light.toggle: hub2_out1 + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Niebieski Pokój Lewy — single: hub2_out10, double: hub1_out7 + - platform: gpio + name: "hub1_in8" + id: hub1_in8 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 8 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out10 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out7 + + # Niebieski Pokój Prawy — bezpośredni toggle pokój dla gości LED (bez gestów) + - platform: gpio + name: "hub1_in9" + id: hub1_in9 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 9 + mode: INPUT + inverted: True + on_click: + min_length: 50ms + max_length: 1000ms + then: + - light.toggle: pokoj_dla_gosci_led + + # Nie podpięte + - platform: gpio + name: "hub1_in10" + id: hub1_in10 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 10 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in11" + id: hub1_in11 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 11 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in12" + id: hub1_in12 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 12 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in13" + id: hub1_in13 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 13 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in14" + id: hub1_in14 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 14 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in15" + id: hub1_in15 + pin: + mcp23xxx: mcp23xxx_hub1_IN + number: 15 + mode: INPUT + inverted: True + + ################## + #mcp23xxx_hub2_IN# + ################## + + # Korytarz 2 — single: hub1_out15 + - platform: gpio + name: "hub2_in0" + id: hub2_in0 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 0 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out15 + + # Korytarz 3 — single: WLED korytarz kinkiety, long: wyłącz wszystkie + - platform: gpio + name: "hub2_in1" + id: hub2_in1 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 1 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_korytarz_kinkiety_toggle + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Korytarz 1 — single: hub1_out14, long: wyłącz wszystkie + - platform: gpio + name: "hub2_in2" + id: hub2_in2 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 2 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out14 + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Mały Korytarz — brak automatyzacji w Node-RED + - platform: gpio + name: "hub2_in3" + id: hub2_in3 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 3 + mode: INPUT + inverted: True + + # Garderoba Mała — single: hub2_out14, double: hub3_out2 (wentylator) + - platform: gpio + name: "hub2_in4" + id: hub2_in4 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 4 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out14 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub3_out2 + + # Kuchnia 3_1 — single: hub1_out8 + - platform: gpio + name: "hub2_in5" + id: hub2_in5 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 5 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out8 + + # Kuchnia 3_2 — single: jadalnia LED + - platform: gpio + name: "hub2_in6" + id: hub2_in6 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 6 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: jadalnia_led + + # Kuchnia 2_1 — single: hub1_out3, triple: wyłącz lampy, long: wyłącz wentylatory + - platform: gpio + name: "hub2_in7" + id: hub2_in7 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 7 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out3 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: off_all_lights + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_fans + + # Kuchnia 2_2 — single: kuchnia łezka LED + - platform: gpio + name: "hub2_in8" + id: hub2_in8 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 8 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: kuchnia_lezka_led + + # Kuchnia 1_1 — single: hub2_out11, double: WLED salon wentylator + - platform: gpio + name: "hub2_in9" + id: hub2_in9 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 9 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out11 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_salon_wentylator_toggle + + # Kuchnia 1_2 — single: WLED komin+salon kinkiety toggle, double: WLED komin on, long: WLED komin on + - platform: gpio + name: "hub2_in10" + id: hub2_in10 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 10 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_komin_toggle + - script.execute: wled_salon_kinkiety_toggle + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_komin_on + - timing: + - ON for at least 350ms + then: + - script.execute: wled_komin_on + + # Schody 3 — single: WLED oczka taras + skrzynia + tunel + zwis schody toggle + - platform: gpio + name: "hub2_in11" + id: hub2_in11 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 11 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_schody_all_toggle + + # Schody 1 — single: hub2_out11 + - platform: gpio + name: "hub2_in12" + id: hub2_in12 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 12 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out11 + + # Schody 2 — single: WLED salon kinkiety toggle, double: WLED salon kinkiety off, long: WLED komin toggle + - platform: gpio + name: "hub2_in13" + id: hub2_in13 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 13 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_salon_kinkiety_toggle + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_salon_kinkiety_off + - timing: + - ON for at least 350ms + then: + - script.execute: wled_komin_toggle + + # Nie podpięte + - platform: gpio + name: "hub2_in14" + id: hub2_in14 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 14 + mode: INPUT + inverted: True + - platform: gpio + name: "hub2_in15" + id: hub2_in15 + pin: + mcp23xxx: mcp23xxx_hub2_IN + number: 15 + mode: INPUT + inverted: True + + ################## + #mcp23xxx_hub3_IN# + ################## + + # Garderoba Duża Lewy — single: hub1_out7 + - platform: gpio + name: "hub3_in0" + id: hub3_in0 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 0 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out7 + + # Garderoba Duża Prawy — single: hub1_out7 + - platform: gpio + name: "hub3_in1" + id: hub3_in1 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 1 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out7 + + # SPA Lewy — single: hub2_out13, triple: hub1_out4 (wentylator) + - platform: gpio + name: "hub3_in2" + id: hub3_in2 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 2 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out13 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out4 + + # SPA Prawy — single: hub1_out4+hub1_out10, triple: SPA Ledy + - platform: gpio + name: "hub3_in3" + id: hub3_in3 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 3 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out4 + - light.toggle: hub1_out10 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: spa_ledy + + # Biała Łazienka Ściana — single: hub2_out0, double: biała łazienka wanna LED, long: hub2_out8 (wentylator) + - platform: gpio + name: "hub3_in4" + id: hub3_in4 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 4 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out0 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: biala_lazienka_wanna_led + - timing: + - ON for at least 350ms + then: + - light.toggle: hub2_out8 + + # Małe WC Lustro Prawy — bezpośredni toggle hub2_out2 + WLED wc_led + hub2_out5 (wentylator) + - platform: gpio + name: "hub3_in5" + id: hub3_in5 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 5 + mode: INPUT + inverted: True + on_click: + min_length: 50ms + max_length: 1000ms + then: + - light.toggle: hub2_out2 + - light.toggle: hub2_out5 + - script.execute: wled_wc_led_toggle + + # Małe WC Lustro Lewy — bezpośredni toggle hub1_out9 + - platform: gpio + name: "hub3_in6" + id: hub3_in6 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 6 + mode: INPUT + inverted: True + on_click: + min_length: 50ms + max_length: 1000ms + then: + - light.toggle: hub1_out9 + + # Biała Łazienka Skos — single: hub2_out4 + - platform: gpio + name: "hub3_in7" + id: hub3_in7 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 7 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub2_out4 + + # SPA Lustro Lewy — single: hub1_out5 + - platform: gpio + name: "hub3_in8" + id: hub3_in8 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 8 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out5 + + # SPA Lustro Prawy — single: hub1_out1 + - platform: gpio + name: "hub3_in9" + id: hub3_in9 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 9 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out1 + + # Biuro Skos — single: hub1_out2, double: serwer LED wyłącz + - platform: gpio + name: "hub3_in10" + id: hub3_in10 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 10 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out2 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.turn_off: serwer_led + + # Serwer Prawy — single: serwer LED, double: hub1_out2, triple: hub3_out2 (wentylator) + - platform: gpio + name: "hub3_in11" + id: hub3_in11 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 11 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: serwer_led + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out2 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub3_out2 + + # Serwer Lewy — single: hub1_out14, triple: wyłącz lampy, long: wyłącz wentylatory + - platform: gpio + name: "hub3_in12" + id: hub3_in12 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 12 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: hub1_out14 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: off_all_lights + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_fans + + # Nie podpięte + - platform: gpio + name: "hub3_in13" + id: hub3_in13 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 13 + mode: INPUT + inverted: True + - platform: gpio + name: "hub3_in14" + id: hub3_in14 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 14 + mode: INPUT + inverted: True + - platform: gpio + name: "hub3_in15" + id: hub3_in15 + pin: + mcp23xxx: mcp23xxx_hub3_IN + number: 15 + mode: INPUT + inverted: True diff --git a/Kuba/packages/mcp23017_outputs.yaml b/Kuba/packages/mcp23017_outputs.yaml new file mode 100644 index 0000000..30d9f8a --- /dev/null +++ b/Kuba/packages/mcp23017_outputs.yaml @@ -0,0 +1,407 @@ +mcp23017: + - id: "mcp23xxx_hub1_OUT" + address: 0x21 + - id: "mcp23xxx_hub2_OUT" + address: 0x23 + - id: "mcp23xxx_hub3_OUT" + address: 0x25 + + +output: + # MCP23017 GPIO outputs — hub1 + - platform: gpio + id: hub1_out0_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out1_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out2_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out3_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out4_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out5_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out6_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out7_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out8_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out9_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out10_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out11_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out12_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out13_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out14_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub1_out15_gpio + pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 15, mode: OUTPUT, inverted: False} + + # MCP23017 GPIO outputs — hub2 + - platform: gpio + id: hub2_out0_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out1_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out2_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out3_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out4_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out5_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out6_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out7_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out8_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out9_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out10_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out11_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out12_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out13_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out14_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub2_out15_gpio + pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 15, mode: OUTPUT, inverted: False} + + # MCP23017 GPIO outputs — hub3 + - platform: gpio + id: hub3_out0_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out1_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out2_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out3_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out4_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out5_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out6_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out7_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out8_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out9_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out10_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out11_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out12_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out13_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out14_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: hub3_out15_gpio + pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 15, mode: OUTPUT, inverted: False} + + +light: + # hub1 outputs + - platform: binary + name: "hub1_out0" + id: hub1_out0 + output: hub1_out0_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out1" + id: hub1_out1 + output: hub1_out1_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out2" + id: hub1_out2 + output: hub1_out2_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out3" + id: hub1_out3 + output: hub1_out3_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out4" # Fan: SPA/Łazienka + id: hub1_out4 + output: hub1_out4_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out5" + id: hub1_out5 + output: hub1_out5_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out6" + id: hub1_out6 + output: hub1_out6_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out7" + id: hub1_out7 + output: hub1_out7_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out8" + id: hub1_out8 + output: hub1_out8_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out9" + id: hub1_out9 + output: hub1_out9_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out10" + id: hub1_out10 + output: hub1_out10_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out11" + id: hub1_out11 + output: hub1_out11_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out12" + id: hub1_out12 + output: hub1_out12_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out13" + id: hub1_out13 + output: hub1_out13_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out14" + id: hub1_out14 + output: hub1_out14_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub1_out15" + id: hub1_out15 + output: hub1_out15_gpio + restore_mode: ALWAYS_OFF + + # hub2 outputs + - platform: binary + name: "hub2_out0" + id: hub2_out0 + output: hub2_out0_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out1" + id: hub2_out1 + output: hub2_out1_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out2" + id: hub2_out2 + output: hub2_out2_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out3" + id: hub2_out3 + output: hub2_out3_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out4" + id: hub2_out4 + output: hub2_out4_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out5" # Fan: Małe WC + id: hub2_out5 + output: hub2_out5_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out6" + id: hub2_out6 + output: hub2_out6_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out7" + id: hub2_out7 + output: hub2_out7_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out8" # Fan: Biała Łazienka + id: hub2_out8 + output: hub2_out8_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out9" + id: hub2_out9 + output: hub2_out9_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out10" + id: hub2_out10 + output: hub2_out10_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out11" + id: hub2_out11 + output: hub2_out11_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out12" + id: hub2_out12 + output: hub2_out12_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out13" + id: hub2_out13 + output: hub2_out13_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out14" + id: hub2_out14 + output: hub2_out14_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub2_out15" + id: hub2_out15 + output: hub2_out15_gpio + restore_mode: ALWAYS_OFF + + # hub3 outputs + - platform: binary + name: "hub3_out0" + id: hub3_out0 + output: hub3_out0_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out1" + id: hub3_out1 + output: hub3_out1_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out2" # Fan: Biuro/Serwer + id: hub3_out2 + output: hub3_out2_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out3" + id: hub3_out3 + output: hub3_out3_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out4" + id: hub3_out4 + output: hub3_out4_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out5" + id: hub3_out5 + output: hub3_out5_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out6" + id: hub3_out6 + output: hub3_out6_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out7" + id: hub3_out7 + output: hub3_out7_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out8" + id: hub3_out8 + output: hub3_out8_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out9" + id: hub3_out9 + output: hub3_out9_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out10" + id: hub3_out10 + output: hub3_out10_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out11" + id: hub3_out11 + output: hub3_out11_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out12" + id: hub3_out12 + output: hub3_out12_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out13" + id: hub3_out13 + output: hub3_out13_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out14" + id: hub3_out14 + output: hub3_out14_gpio + restore_mode: ALWAYS_OFF + - platform: binary + name: "hub3_out15" + id: hub3_out15 + output: hub3_out15_gpio + restore_mode: ALWAYS_OFF diff --git a/Kuba/packages/pca9685.yaml b/Kuba/packages/pca9685.yaml new file mode 100644 index 0000000..8c0161a --- /dev/null +++ b/Kuba/packages/pca9685.yaml @@ -0,0 +1,221 @@ +pca9685: + - frequency: 1500 + address: 0x40 + id: "pca9685_hub1" + - frequency: 1500 + address: 0x41 + id: "pca9685_hub2" + + +output: + # Status RGB LED (ledc) + - platform: ledc + id: output_blue + pin: 5 + - platform: ledc + id: output_green + pin: 14 + - platform: ledc + id: output_red + pin: 15 + + # PCA9685 Hub1 — kanały PWM + - platform: pca9685 + id: 'PWM1_1_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 0 + max_power: 75% + - platform: pca9685 + id: 'PWM1_2_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 1 + max_power: 75% + - platform: pca9685 + id: 'PWM2_1_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 2 + max_power: 75% + - platform: pca9685 + id: 'PWM2_2_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 3 + max_power: 75% + - platform: pca9685 + id: 'PWM3_1_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 4 + max_power: 75% + - platform: pca9685 + id: 'PWM3_2_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 8 + max_power: 75% + - platform: pca9685 + id: 'PWM4_1_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 6 + min_power: 0% + max_power: 75% + - platform: pca9685 + id: 'PWM4_2_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 7 + min_power: 0% + max_power: 75% + - platform: pca9685 + id: 'PWM5_1_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 12 + max_power: 75% + - platform: pca9685 + id: 'PWM5_2_Hub1' + pca9685_id: 'pca9685_hub1' + channel: 13 + max_power: 75% + + # PCA9685 Hub2 — kanały PWM + - platform: pca9685 + id: 'PWM1_1_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 0 + max_power: 75% + - platform: pca9685 + id: 'PWM1_2_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 1 + max_power: 75% + - platform: pca9685 + id: 'PWM2_1_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 2 + max_power: 75% + - platform: pca9685 + id: 'PWM2_2_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 3 + max_power: 75% + - platform: pca9685 + id: 'PWM3_1_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 4 + max_power: 75% + - platform: pca9685 + id: 'PWM3_2_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 5 + max_power: 95% + - platform: pca9685 + id: 'PWM4_1_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 10 + max_power: 95% + - platform: pca9685 + id: 'PWM4_2_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 13 + max_power: 75% + - platform: pca9685 + id: 'PWM5_1_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 11 + max_power: 75% + - platform: pca9685 + id: 'PWM5_2_Hub2' + pca9685_id: 'pca9685_hub2' + channel: 15 + max_power: 75% + + +light: + - platform: rgb + name: "Status LED" + red: output_red + green: output_green + blue: output_blue + effects: + - pulse: + name: "Fast Pulse" + transition_length: 0.5s + update_interval: 0.5s + - pulse: + name: "Slow Pulse" + transition_length: 1s + update_interval: 1s + - random: + name: "Random Effect" + transition_length: 1s + update_interval: 2s + + - platform: cwww + name: "Serwer LED" + id: serwer_led + cold_white: PWM2_1_Hub1 + warm_white: PWM2_2_Hub1 + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + default_transition_length: 2.0s + + - platform: cwww + name: "Jadalnia LED" + id: jadalnia_led + cold_white: PWM4_2_Hub1 + warm_white: PWM4_1_Hub1 + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + default_transition_length: 2.0s + + - platform: cwww + name: "Biała Łazienka wanna LED" + id: biala_lazienka_wanna_led + cold_white: PWM5_2_Hub1 + warm_white: PWM5_1_Hub1 + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + default_transition_length: 2.0s + + - platform: monochromatic + name: "Kuchnia Łezka LED" + id: kuchnia_lezka_led + output: PWM2_1_Hub2 + default_transition_length: 2.0s + + - platform: cwww + name: "SPA Ledy" + id: spa_ledy + cold_white: PWM5_2_Hub2 + warm_white: PWM5_1_Hub2 + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + default_transition_length: 2.0s + + - platform: cwww + name: "Pokój dla gości LED" + id: pokoj_dla_gosci_led + cold_white: PWM3_2_Hub2 + warm_white: PWM4_1_Hub2 + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + default_transition_length: 2.0s + + - platform: monochromatic + name: "TEST LED 1" + id: test_led_1 + output: PWM1_2_Hub2 + + - platform: monochromatic + name: "TEST LED 2" + id: test_led_2 + output: PWM3_1_Hub2 + + - platform: rgbww + name: "Sypialnia LED" + id: sypialnia_led + red: PWM1_1_Hub1 + green: PWM1_2_Hub1 + blue: PWM3_1_Hub1 + cold_white: PWM3_2_Hub1 + warm_white: PWM1_1_Hub2 + cold_white_color_temperature: 6536 K + warm_white_color_temperature: 2000 K + color_interlock: false + default_transition_length: 2.0s diff --git a/Kuba/packages/scripts.yaml b/Kuba/packages/scripts.yaml new file mode 100644 index 0000000..9e62e23 --- /dev/null +++ b/Kuba/packages/scripts.yaml @@ -0,0 +1,114 @@ +script: + # ── Wyłącz wszystkie lampy ─────────────────────────────────────────────── + - id: off_all_lights + then: + - light.turn_off: serwer_led + - light.turn_off: jadalnia_led + - light.turn_off: biala_lazienka_wanna_led + - light.turn_off: kuchnia_lezka_led + - light.turn_off: spa_ledy + - light.turn_off: pokoj_dla_gosci_led + - light.turn_off: test_led_1 + - light.turn_off: test_led_2 + - light.turn_off: sypialnia_led + - light.turn_off: hub1_out0 + - light.turn_off: hub1_out1 + - light.turn_off: hub1_out2 + - light.turn_off: hub1_out3 + - light.turn_off: hub1_out5 + - light.turn_off: hub1_out6 + - light.turn_off: hub1_out7 + - light.turn_off: hub1_out8 + - light.turn_off: hub1_out9 + - light.turn_off: hub1_out10 + - light.turn_off: hub1_out11 + - light.turn_off: hub1_out12 + - light.turn_off: hub1_out13 + - light.turn_off: hub1_out14 + - light.turn_off: hub1_out15 + - light.turn_off: hub2_out0 + - light.turn_off: hub2_out1 + - light.turn_off: hub2_out2 + - light.turn_off: hub2_out3 + - light.turn_off: hub2_out4 + - light.turn_off: hub2_out6 + - light.turn_off: hub2_out7 + - light.turn_off: hub2_out9 + - light.turn_off: hub2_out10 + - light.turn_off: hub2_out11 + - light.turn_off: hub2_out12 + - light.turn_off: hub2_out13 + - light.turn_off: hub2_out14 + - light.turn_off: hub2_out15 + - light.turn_off: hub3_out0 + - light.turn_off: hub3_out1 + - light.turn_off: hub3_out3 + - light.turn_off: hub3_out4 + - light.turn_off: hub3_out5 + - light.turn_off: hub3_out6 + - light.turn_off: hub3_out7 + - light.turn_off: hub3_out8 + - light.turn_off: hub3_out9 + - light.turn_off: hub3_out10 + - light.turn_off: hub3_out11 + - light.turn_off: hub3_out12 + - light.turn_off: hub3_out13 + - light.turn_off: hub3_out14 + - light.turn_off: hub3_out15 + + # ── Wyłącz wszystkie wentylatory ───────────────────────────────────────── + - id: off_all_fans + then: + - light.turn_off: hub3_out2 # Fan: Biuro/Serwer + - light.turn_off: hub1_out4 # Fan: SPA/Łazienka + - light.turn_off: hub2_out5 # Fan: Małe WC + - light.turn_off: hub2_out8 # Fan: Biała Łazienka + + # ── WLED placeholders (TODO: zastąpić sterowaniem WLED przez HA/MQTT) ─── + - id: wled_korytarz_kinkiety_toggle + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: korytarz_kinkiety toggle" + + - id: wled_komin_toggle + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: komin_led toggle" + + - id: wled_komin_on + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: komin_led turn_on" + + - id: wled_salon_kinkiety_toggle + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: salon_kinkiety_led toggle" + + - id: wled_salon_kinkiety_off + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: salon_kinkiety_led turn_off" + + - id: wled_schody_all_toggle + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: oczka_taras + skrzynia + tunel + zwis_schody toggle" + + - id: wled_wc_led_toggle + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: wc_led toggle" + + - id: wled_salon_wentylator_toggle + then: + - logger.log: + level: INFO + format: "WLED PLACEHOLDER: salon_wentylator toggle" diff --git a/example/boneio-32x10_switches_v0_7.yaml b/example/boneio-32x10_switches_v0_7.yaml new file mode 100644 index 0000000..6b73e3b --- /dev/null +++ b/example/boneio-32x10_switches_v0_7.yaml @@ -0,0 +1,686 @@ +substitutions: + name: boneio-32-sw-07 + friendly_name: 'BoneIO ESP 32x10 Switches' + serial_prefix: 'esp' #Don't change it. + +esphome: + name: '${name}' + friendly_name: '${friendly_name}' + name_add_mac_suffix: true + project: + name: boneio.32x10-lights + version: '0.7' + on_boot: + - priority: 1001 + then: + - lambda: |- + gpio_reset_pin((gpio_num_t)14); + gpio_reset_pin((gpio_num_t)15); + +esp32: + board: nodemcu-32s + framework: + type: esp-idf + +ethernet: + id: eth + type: LAN8720 + mdc_pin: GPIO23 + mdio_pin: GPIO18 + clk: + pin: GPIO0 + mode: CLK_EXT_IN + phy_addr: 1 + power_pin: GPIO16 + +dashboard_import: + package_import_url: github://boneIO-eu/esphome/boneio-32x10_switches_v0_7.yaml@latest + import_full_config: true + +packages: + internals_packages: + url: https://gitea.domowyasystent.com/jkocon/BoneIO-ESP + ref: main + files: [ + 'packages/devices/buzzer.yaml', + 'packages/devices/serial_no.yaml', + 'packages/devices_v0_7/display.yaml', + 'packages/devices_v0_7/i2c.yaml', + 'packages/devices_v0_7/wiegand.yaml', + 'packages/devices_v0_7-v0_9/ina219.yaml', + 'packages/devices_v0_7-v0_9/lm75b.yaml', + 'packages/devices_v0_7-v0_9/pcf.yaml', + 'packages/boards/output/out01_02.yaml', + 'packages/boards/output/out03_04.yaml', + 'packages/boards/output/out05_06.yaml', + 'packages/boards/output/out07_08.yaml', + 'packages/boards/output/out09_10.yaml', + 'packages/boards/output/out11_12.yaml', + 'packages/boards/output/out13_14.yaml', + 'packages/boards/output/out15_16.yaml', + 'packages/boards/output/out17_18.yaml', + 'packages/boards/output/out19_20.yaml', + 'packages/boards/output/out21_22.yaml', + 'packages/boards/output/out23_24.yaml', + 'packages/boards/output/out25_26.yaml', + 'packages/boards/output/out27_28.yaml', + 'packages/boards/output/out29_30.yaml', + 'packages/boards/output/out31_32.yaml', + 'packages/devices_v0_7-v0_9/one_wire.yaml', + ] + +logger: +api: + reboot_timeout: 0s +ota: + - platform: esphome + - platform: web_server + +web_server: + port: 80 + local: true + +time: + - platform: homeassistant + timezone: Europe/Warsaw + id: homeassistant_time + +switch: + - platform: output + name: 'Switch 01' + output: out_01 + id: switch_01 + - platform: output + name: 'Switch 02' + output: out_02 + id: switch_02 + - platform: output + name: 'Switch 03' + output: out_03 + id: switch_03 + - platform: output + name: 'Switch 04' + output: out_04 + id: switch_04 + - platform: output + name: 'Switch 05' + output: out_05 + id: switch_05 + - platform: output + name: 'Switch 06' + output: out_06 + id: switch_06 + - platform: output + name: 'Switch 07' + output: out_07 + id: switch_07 + - platform: output + name: 'Switch 08' + output: out_08 + id: switch_08 + - platform: output + name: 'Switch 09' + output: out_09 + id: switch_09 + - platform: output + name: 'Switch 10' + output: out_10 + id: switch_10 + - platform: output + name: 'Switch 11' + output: out_11 + id: switch_11 + - platform: output + name: 'Switch 12' + output: out_12 + id: switch_12 + - platform: output + name: 'Switch 13' + output: out_13 + id: switch_13 + - platform: output + name: 'Switch 14' + output: out_14 + id: switch_14 + - platform: output + name: 'Switch 15' + output: out_15 + id: switch_15 + - platform: output + name: 'Switch 16' + output: out_16 + id: switch_16 + - platform: output + name: 'Switch 17' + output: out_17 + id: switch_17 + - platform: output + name: 'Switch 18' + output: out_18 + id: switch_18 + - platform: output + name: 'Switch 19' + output: out_19 + id: switch_19 + - platform: output + name: 'Switch 20' + output: out_20 + id: switch_20 + - platform: output + name: 'Switch 21' + output: out_21 + id: switch_21 + - platform: output + name: 'Switch 22' + output: out_22 + id: switch_22 + - platform: output + name: 'Switch 23' + output: out_23 + id: switch_23 + - platform: output + name: 'Switch 24' + output: out_24 + id: switch_24 + - platform: output + name: 'Switch 25' + output: out_25 + id: switch_25 + - platform: output + name: 'Switch 26' + output: out_26 + id: switch_26 + - platform: output + name: 'Switch 27' + output: out_27 + id: switch_27 + - platform: output + name: 'Switch 28' + output: out_28 + id: switch_28 + - platform: output + name: 'Switch 29' + output: out_29 + id: switch_29 + - platform: output + name: 'Switch 30' + output: out_30 + id: switch_30 + - platform: output + name: 'Switch 31' + output: out_31 + id: switch_31 + - platform: output + name: 'Switch 32' + output: out_32 + id: switch_32 + +binary_sensor: + - platform: gpio + name: 'IN_01' + id: in_01 + pin: + pcf8574: pcf_inputs_1to14 + number: 0 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_01 + + - platform: gpio + name: 'IN_02' + id: in_02 + pin: + pcf8574: pcf_inputs_1to14 + number: 1 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_02 + + - platform: gpio + name: 'IN_03' + id: in_03 + pin: + pcf8574: pcf_inputs_1to14 + number: 2 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_03 + + - platform: gpio + name: 'IN_04' + id: in_04 + pin: + pcf8574: pcf_inputs_1to14 + number: 3 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_04 + + - platform: gpio + name: 'IN_05' + id: in_05 + pin: + pcf8574: pcf_inputs_1to14 + number: 4 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_05 + + - platform: gpio + name: 'IN_06' + id: in_06 + pin: + pcf8574: pcf_inputs_1to14 + number: 5 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_06 + + - platform: gpio + name: 'IN_07' + id: in_07 + pin: + pcf8574: pcf_inputs_1to14 + number: 6 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_07 + + - platform: gpio + name: 'IN_08' + id: in_08 + pin: + pcf8574: pcf_inputs_1to14 + number: 8 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_08 + + - platform: gpio + name: 'IN_09' + id: in_09 + pin: + pcf8574: pcf_inputs_1to14 + number: 9 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_09 + + - platform: gpio + name: 'IN_10' + id: in_10 + pin: + pcf8574: pcf_inputs_1to14 + number: 10 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_10 + + - platform: gpio + name: 'IN_11' + id: in_11 + pin: + pcf8574: pcf_inputs_1to14 + number: 11 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_11 + + - platform: gpio + name: 'IN_12' + id: in_12 + pin: + pcf8574: pcf_inputs_1to14 + number: 12 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_12 + + - platform: gpio + name: 'IN_13' + id: in_13 + pin: + pcf8574: pcf_inputs_1to14 + number: 13 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_13 + + - platform: gpio + name: 'IN_14' + id: in_14 + pin: + pcf8574: pcf_inputs_1to14 + number: 14 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_14 + + - platform: gpio + name: 'IN_15' + id: in_15 + pin: + pcf8574: pcf_inputs_15to28 + number: 6 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_15 + + - platform: gpio + name: 'IN_16' + id: in_16 + pin: + pcf8574: pcf_inputs_15to28 + number: 5 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_16 + + - platform: gpio + name: 'IN_17' + id: in_17 + pin: + pcf8574: pcf_inputs_15to28 + number: 4 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_17 + + - platform: gpio + name: 'IN_18' + id: in_18 + pin: + pcf8574: pcf_inputs_15to28 + number: 3 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_18 + + - platform: gpio + name: 'IN_19' + id: in_19 + pin: + pcf8574: pcf_inputs_15to28 + number: 2 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_19 + + - platform: gpio + name: 'IN_20' + id: in_20 + pin: + pcf8574: pcf_inputs_15to28 + number: 1 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_20 + + - platform: gpio + name: 'IN_21' + id: in_21 + pin: + pcf8574: pcf_inputs_15to28 + number: 0 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_21 + + - platform: gpio + name: 'IN_22' + id: in_22 + pin: + pcf8574: pcf_inputs_15to28 + number: 8 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_22 + + - platform: gpio + name: 'IN_23' + id: in_23 + pin: + pcf8574: pcf_inputs_15to28 + number: 9 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_23 + + - platform: gpio + name: 'IN_24' + id: in_24 + pin: + pcf8574: pcf_inputs_15to28 + number: 10 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_24 + + - platform: gpio + name: 'IN_25' + id: in_25 + pin: + pcf8574: pcf_inputs_15to28 + number: 11 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_25 + + - platform: gpio + name: 'IN_26' + id: in_26 + pin: + pcf8574: pcf_inputs_15to28 + number: 12 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_26 + + - platform: gpio + name: 'IN_27' + id: in_27 + pin: + pcf8574: pcf_inputs_15to28 + number: 13 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_27 + + - platform: gpio + name: 'IN_28' + id: in_28 + pin: + pcf8574: pcf_inputs_15to28 + number: 14 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_28 + + - platform: gpio + name: 'IN_29' + id: in_29 + pin: + pcf8574: pcf_inputs_28to35_menu + number: 0 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_29 + + - platform: gpio + name: 'IN_30' + id: in_30 + pin: + pcf8574: pcf_inputs_28to35_menu + number: 1 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_30 + + - platform: gpio + name: 'IN_31' + id: in_31 + pin: + pcf8574: pcf_inputs_28to35_menu + number: 2 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_31 + + - platform: gpio + name: 'IN_32' + id: in_32 + pin: + pcf8574: pcf_inputs_28to35_menu + number: 3 + mode: + input: true + inverted: true + on_press: + then: + - switch.toggle: switch_32 + + - platform: gpio + name: 'IN_33' + pin: + pcf8574: pcf_inputs_28to35_menu + number: 4 + mode: + input: true + inverted: true + + - platform: gpio + name: 'IN_34' + pin: + pcf8574: pcf_inputs_28to35_menu + number: 5 + mode: + input: true + inverted: true + + - platform: gpio + name: 'IN_35' + pin: + pcf8574: pcf_inputs_28to35_menu + number: 6 + mode: + input: true + inverted: true +###################### +### MODBUS SECTION ### +###################### +# UNCOMMENT BELOW TO USE MODBUS +# uart: +# id: uart_pin14_15 +# rx_pin: +# number: GPIO14 +# mode: +# input: true +# pullup: true +# tx_pin: GPIO15 +# baud_rate: 9600 +# stop_bits: 1 + +# modbus: +# send_wait_time: 200ms +# uart_id: uart_pin14_15 +# id: boneio_modbus + +# modbus_controller: +# - id: YOURDEVICE ID +# address: 0x09 +# modbus_id: mod_bus +# setup_priority: -10 +# update_interval: 60s diff --git a/example/packages/boards/24x16_output.yaml b/example/packages/boards/24x16_output.yaml new file mode 100644 index 0000000..5372af2 --- /dev/null +++ b/example/packages/boards/24x16_output.yaml @@ -0,0 +1,216 @@ +output: + - platform: gpio + id: out_01 + pin: + mcp23xxx: mcp_left + number: 8 + mode: + output: true + inverted: false + + - platform: gpio + id: out_02 + pin: + mcp23xxx: mcp_left + number: 9 + mode: + output: true + inverted: false + + - platform: gpio + id: out_03 + pin: + mcp23xxx: mcp_left + number: 10 + mode: + output: true + inverted: false + + - platform: gpio + id: out_04 + pin: + mcp23xxx: mcp_left + number: 11 + mode: + output: true + inverted: false + + - platform: gpio + id: out_05 + pin: + mcp23xxx: mcp_left + number: 12 + mode: + output: true + inverted: false + + - platform: gpio + id: out_06 + pin: + mcp23xxx: mcp_left + number: 13 + mode: + output: true + inverted: false + + - platform: gpio + id: out_07 + pin: + mcp23xxx: mcp_left + number: 14 + mode: + output: true + inverted: false + + - platform: gpio + id: out_08 + pin: + mcp23xxx: mcp_left + number: 15 + mode: + output: true + inverted: false + + - platform: gpio + id: out_09 + pin: + mcp23xxx: mcp_right + number: 8 + mode: + output: true + inverted: false + + - platform: gpio + id: out_10 + pin: + mcp23xxx: mcp_right + number: 9 + mode: + output: true + inverted: false + + - platform: gpio + id: out_11 + pin: + mcp23xxx: mcp_right + number: 10 + mode: + output: true + inverted: false + + - platform: gpio + id: out_12 + pin: + mcp23xxx: mcp_right + number: 11 + mode: + output: true + inverted: false + + - platform: gpio + id: out_13 + pin: + mcp23xxx: mcp_left + number: 7 + mode: + output: true + inverted: false + + - platform: gpio + id: out_14 + pin: + mcp23xxx: mcp_left + number: 6 + mode: + output: true + inverted: false + + - platform: gpio + id: out_15 + pin: + mcp23xxx: mcp_left + number: 5 + mode: + output: true + inverted: false + + - platform: gpio + id: out_16 + pin: + mcp23xxx: mcp_left + number: 4 + mode: + output: true + inverted: false + + - platform: gpio + id: out_17 + pin: + mcp23xxx: mcp_left + number: 3 + mode: + output: true + inverted: false + + - platform: gpio + id: out_18 + pin: + mcp23xxx: mcp_left + number: 2 + mode: + output: true + inverted: false + + - platform: gpio + id: out_19 + pin: + mcp23xxx: mcp_left + number: 1 + mode: + output: true + inverted: false + + - platform: gpio + id: out_20 + pin: + mcp23xxx: mcp_left + number: 0 + mode: + output: true + inverted: false + + - platform: gpio + id: out_21 + pin: + mcp23xxx: mcp_right + number: 12 + mode: + output: true + inverted: false + + - platform: gpio + id: out_22 + pin: + mcp23xxx: mcp_right + number: 13 + mode: + output: true + inverted: false + + - platform: gpio + id: out_23 + pin: + mcp23xxx: mcp_right + number: 14 + mode: + output: true + inverted: false + + - platform: gpio + id: out_24 + pin: + mcp23xxx: mcp_right + number: 15 + mode: + output: true + inverted: false diff --git a/example/packages/boards/cover/out01_02.yaml b/example/packages/boards/cover/out01_02.yaml new file mode 100644 index 0000000..344dd02 --- /dev/null +++ b/example/packages/boards/cover/out01_02.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_01_out01 + pin: + pcf8574: pcf_left + number: 15 + mode: + output: true + inverted: true + interlock: &cover_interlock_01 [cover_open_01_out01, cover_close_01_out02] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_01_out02 + pin: + pcf8574: pcf_left + number: 14 + mode: + output: true + inverted: true + interlock: *cover_interlock_01 + restore_mode: always off diff --git a/example/packages/boards/cover/out03_04.yaml b/example/packages/boards/cover/out03_04.yaml new file mode 100644 index 0000000..a9ad6f8 --- /dev/null +++ b/example/packages/boards/cover/out03_04.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_02_out03 + pin: + pcf8574: pcf_left + number: 13 + mode: + output: true + inverted: true + interlock: &cover_interlock_02 [cover_open_02_out03, cover_close_02_out04] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_02_out04 + pin: + pcf8574: pcf_left + number: 12 + mode: + output: true + inverted: true + interlock: *cover_interlock_02 + restore_mode: always off diff --git a/example/packages/boards/cover/out05_06.yaml b/example/packages/boards/cover/out05_06.yaml new file mode 100644 index 0000000..ed06a5d --- /dev/null +++ b/example/packages/boards/cover/out05_06.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_03_out05 + pin: + pcf8574: pcf_left + number: 11 + mode: + output: true + inverted: true + interlock: &cover_interlock_03 [cover_open_03_out05, cover_close_03_out06] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_03_out06 + pin: + pcf8574: pcf_left + number: 10 + mode: + output: true + inverted: true + interlock: *cover_interlock_03 + restore_mode: always off diff --git a/example/packages/boards/cover/out07_08.yaml b/example/packages/boards/cover/out07_08.yaml new file mode 100644 index 0000000..c1b4ccb --- /dev/null +++ b/example/packages/boards/cover/out07_08.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_04_out07 + pin: + pcf8574: pcf_left + number: 9 + mode: + output: true + inverted: true + interlock: &cover_interlock_04 [cover_open_04_out07, cover_close_04_out08] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_04_out08 + pin: + pcf8574: pcf_left + number: 8 + mode: + output: true + inverted: true + interlock: *cover_interlock_04 + restore_mode: always off diff --git a/example/packages/boards/cover/out09_10.yaml b/example/packages/boards/cover/out09_10.yaml new file mode 100644 index 0000000..3e192fa --- /dev/null +++ b/example/packages/boards/cover/out09_10.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_05_out09 + pin: + pcf8574: pcf_right + number: 15 + mode: + output: true + inverted: true + interlock: &cover_interlock_05 [cover_open_05_out09, cover_close_05_out10] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_05_out10 + pin: + pcf8574: pcf_right + number: 14 + mode: + output: true + inverted: true + interlock: *cover_interlock_05 + restore_mode: always off diff --git a/example/packages/boards/cover/out11_12.yaml b/example/packages/boards/cover/out11_12.yaml new file mode 100644 index 0000000..2d0173a --- /dev/null +++ b/example/packages/boards/cover/out11_12.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_06_out11 + pin: + pcf8574: pcf_right + number: 13 + mode: + output: true + inverted: true + interlock: &cover_interlock_06 [cover_open_06_out11, cover_close_06_out12] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_06_out12 + pin: + pcf8574: pcf_right + number: 12 + mode: + output: true + inverted: true + interlock: *cover_interlock_06 + restore_mode: always off diff --git a/example/packages/boards/cover/out13_14.yaml b/example/packages/boards/cover/out13_14.yaml new file mode 100644 index 0000000..e41d746 --- /dev/null +++ b/example/packages/boards/cover/out13_14.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_07_out13 + pin: + pcf8574: pcf_right + number: 11 + mode: + output: true + inverted: true + interlock: &cover_interlock_07 [cover_open_07_out13, cover_close_07_out14] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_07_out14 + pin: + pcf8574: pcf_right + number: 10 + mode: + output: true + inverted: true + interlock: *cover_interlock_07 + restore_mode: always off diff --git a/example/packages/boards/cover/out15_16.yaml b/example/packages/boards/cover/out15_16.yaml new file mode 100644 index 0000000..8eb1639 --- /dev/null +++ b/example/packages/boards/cover/out15_16.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_08_out15 + pin: + pcf8574: pcf_right + number: 9 + mode: + output: true + inverted: true + interlock: &cover_interlock_08 [cover_open_08_out15, cover_close_08_out16] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_08_out16 + pin: + pcf8574: pcf_right + number: 8 + mode: + output: true + inverted: true + interlock: *cover_interlock_08 + restore_mode: always off diff --git a/example/packages/boards/cover/out17_18.yaml b/example/packages/boards/cover/out17_18.yaml new file mode 100644 index 0000000..ff0cfff --- /dev/null +++ b/example/packages/boards/cover/out17_18.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_09_out17 + pin: + pcf8574: pcf_left + number: 0 + mode: + output: true + inverted: true + interlock: &cover_interlock_09 [cover_open_09_out17, cover_close_09_out18] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_09_out18 + pin: + pcf8574: pcf_left + number: 1 + mode: + output: true + inverted: true + interlock: *cover_interlock_09 + restore_mode: always off diff --git a/example/packages/boards/cover/out19_20.yaml b/example/packages/boards/cover/out19_20.yaml new file mode 100644 index 0000000..d354b68 --- /dev/null +++ b/example/packages/boards/cover/out19_20.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_10_out19 + pin: + pcf8574: pcf_left + number: 2 + mode: + output: true + inverted: true + interlock: &cover_interlock_10 [cover_open_10_out19, cover_close_10_out20] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_10_out20 + pin: + pcf8574: pcf_left + number: 3 + mode: + output: true + inverted: true + interlock: *cover_interlock_10 + restore_mode: always off diff --git a/example/packages/boards/cover/out21_22.yaml b/example/packages/boards/cover/out21_22.yaml new file mode 100644 index 0000000..99881c3 --- /dev/null +++ b/example/packages/boards/cover/out21_22.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_11_out21 + pin: + pcf8574: pcf_left + number: 4 + mode: + output: true + inverted: true + interlock: &cover_interlock_11 [cover_open_11_out21, cover_close_11_out22] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_11_out22 + pin: + pcf8574: pcf_left + number: 5 + mode: + output: true + inverted: true + interlock: *cover_interlock_11 + restore_mode: always off diff --git a/example/packages/boards/cover/out23_24.yaml b/example/packages/boards/cover/out23_24.yaml new file mode 100644 index 0000000..60cd533 --- /dev/null +++ b/example/packages/boards/cover/out23_24.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_12_out23 + pin: + pcf8574: pcf_left + number: 6 + mode: + output: true + inverted: true + interlock: &cover_interlock_12 [cover_open_12_out23, cover_close_12_out24] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_12_out24 + pin: + pcf8574: pcf_left + number: 7 + mode: + output: true + inverted: true + interlock: *cover_interlock_12 + restore_mode: always off diff --git a/example/packages/boards/cover/out25_26.yaml b/example/packages/boards/cover/out25_26.yaml new file mode 100644 index 0000000..161d527 --- /dev/null +++ b/example/packages/boards/cover/out25_26.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_13_out25 + pin: + pcf8574: pcf_right + number: 0 + mode: + output: true + inverted: true + interlock: &cover_interlock_13 [cover_open_13_out25, cover_close_13_out26] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_13_out26 + pin: + pcf8574: pcf_right + number: 1 + mode: + output: true + inverted: true + interlock: *cover_interlock_13 + restore_mode: always off diff --git a/example/packages/boards/cover/out27_28.yaml b/example/packages/boards/cover/out27_28.yaml new file mode 100644 index 0000000..5b7f52e --- /dev/null +++ b/example/packages/boards/cover/out27_28.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_14_out27 + pin: + pcf8574: pcf_right + number: 2 + mode: + output: true + inverted: true + interlock: &cover_interlock_14 [cover_open_14_out27, cover_close_14_out28] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_14_out28 + pin: + pcf8574: pcf_right + number: 3 + mode: + output: true + inverted: true + interlock: *cover_interlock_14 + restore_mode: always off diff --git a/example/packages/boards/cover/out29_30.yaml b/example/packages/boards/cover/out29_30.yaml new file mode 100644 index 0000000..e15f9f8 --- /dev/null +++ b/example/packages/boards/cover/out29_30.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_15_out29 + pin: + pcf8574: pcf_right + number: 4 + mode: + output: true + inverted: true + interlock: &cover_interlock_15 [cover_open_15_out29, cover_close_15_out30] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_15_out30 + pin: + pcf8574: pcf_right + number: 5 + mode: + output: true + inverted: true + interlock: *cover_interlock_15 + restore_mode: always off diff --git a/example/packages/boards/cover/out31_32.yaml b/example/packages/boards/cover/out31_32.yaml new file mode 100644 index 0000000..e9bd37a --- /dev/null +++ b/example/packages/boards/cover/out31_32.yaml @@ -0,0 +1,23 @@ +switch: + - platform: gpio + id: cover_open_16_out31 + pin: + pcf8574: pcf_right + number: 6 + mode: + output: true + inverted: true + interlock: &cover_interlock_16 [cover_open_16_out31, cover_close_16_out32] + interlock_wait_time: 5ms + restore_mode: always off + + - platform: gpio + id: cover_close_16_out32 + pin: + pcf8574: pcf_right + number: 7 + mode: + output: true + inverted: true + interlock: *cover_interlock_16 + restore_mode: always off diff --git a/example/packages/boards/dimmer_output.yaml b/example/packages/boards/dimmer_output.yaml new file mode 100644 index 0000000..4669212 --- /dev/null +++ b/example/packages/boards/dimmer_output.yaml @@ -0,0 +1,42 @@ +output: + - platform: ledc + pin: 33 + frequency: 1000Hz + inverted: false + id: chl01 + - platform: ledc + pin: 32 + frequency: 1000Hz + inverted: false + id: chl02 + - platform: ledc + pin: 12 + frequency: 1000Hz + inverted: false + id: chl03 + - platform: ledc + pin: 14 + frequency: 1000Hz + inverted: false + id: chl04 + + - platform: ledc + pin: 13 + frequency: 1000Hz + inverted: false + id: chr01 + - platform: ledc + pin: 15 + frequency: 1000Hz + inverted: false + id: chr02 + - platform: ledc + pin: 2 + frequency: 1000Hz + inverted: false + id: chr03 + - platform: ledc + pin: 17 + frequency: 1000Hz + inverted: false + id: chr04 diff --git a/example/packages/boards/mosfet48_output.yaml b/example/packages/boards/mosfet48_output.yaml new file mode 100644 index 0000000..6c10bf1 --- /dev/null +++ b/example/packages/boards/mosfet48_output.yaml @@ -0,0 +1,431 @@ +output: + - platform: gpio + id: out_01 + pin: + pcf8574: pcf_left + number: 7 + mode: + output: true + inverted: true + - platform: gpio + id: out_02 + pin: + pcf8574: pcf_left + number: 6 + mode: + output: true + inverted: true + + - platform: gpio + id: out_03 + pin: + pcf8574: pcf_left + number: 5 + mode: + output: true + inverted: true + + - platform: gpio + id: out_04 + pin: + pcf8574: pcf_left + number: 4 + mode: + output: true + inverted: true + + - platform: gpio + id: out_05 + pin: + pcf8574: pcf_left + number: 3 + mode: + output: true + inverted: true + + - platform: gpio + id: out_06 + pin: + pcf8574: pcf_left + number: 2 + mode: + output: true + inverted: true + + - platform: gpio + id: out_07 + pin: + pcf8574: pcf_left + number: 1 + mode: + output: true + inverted: true + + - platform: gpio + id: out_08 + pin: + pcf8574: pcf_left + number: 0 + mode: + output: true + inverted: true + + - platform: gpio + id: out_09 + pin: + pcf8574: pcf_middle + number: 7 + mode: + output: true + inverted: true + + - platform: gpio + id: out_10 + pin: + pcf8574: pcf_middle + number: 6 + mode: + output: true + inverted: true + + - platform: gpio + id: out_11 + pin: + pcf8574: pcf_middle + number: 5 + mode: + output: true + inverted: true + + - platform: gpio + id: out_12 + pin: + pcf8574: pcf_middle + number: 4 + mode: + output: true + inverted: true + + - platform: gpio + id: out_13 + pin: + pcf8574: pcf_middle + number: 3 + mode: + output: true + inverted: true + + - platform: gpio + id: out_14 + pin: + pcf8574: pcf_middle + number: 2 + mode: + output: true + inverted: true + + - platform: gpio + id: out_15 + pin: + pcf8574: pcf_middle + number: 1 + mode: + output: true + inverted: true + + - platform: gpio + id: out_16 + pin: + pcf8574: pcf_middle + number: 0 + mode: + output: true + inverted: true + + - platform: gpio + id: out_17 + pin: + pcf8574: pcf_right + number: 7 + mode: + output: true + inverted: true + + - platform: gpio + id: out_18 + pin: + pcf8574: pcf_right + number: 6 + mode: + output: true + inverted: true + + - platform: gpio + id: out_19 + pin: + pcf8574: pcf_right + number: 5 + mode: + output: true + inverted: true + + - platform: gpio + id: out_20 + pin: + pcf8574: pcf_right + number: 4 + mode: + output: true + inverted: true + + - platform: gpio + id: out_21 + pin: + pcf8574: pcf_right + number: 3 + mode: + output: true + inverted: true + + - platform: gpio + id: out_22 + pin: + pcf8574: pcf_right + number: 2 + mode: + output: true + inverted: true + + - platform: gpio + id: out_23 + pin: + pcf8574: pcf_right + number: 1 + mode: + output: true + inverted: true + + - platform: gpio + id: out_24 + pin: + pcf8574: pcf_right + number: 0 + mode: + output: true + inverted: true + + - platform: gpio + id: out_25 + pin: + pcf8574: pcf_left + number: 8 + mode: + output: true + inverted: true + + - platform: gpio + id: out_26 + pin: + pcf8574: pcf_left + number: 9 + mode: + output: true + inverted: true + + - platform: gpio + id: out_27 + pin: + pcf8574: pcf_left + number: 10 + mode: + output: true + inverted: true + + - platform: gpio + id: out_28 + pin: + pcf8574: pcf_left + number: 11 + mode: + output: true + inverted: true + + - platform: gpio + id: out_29 + pin: + pcf8574: pcf_left + number: 12 + mode: + output: true + inverted: true + + - platform: gpio + id: out_30 + pin: + pcf8574: pcf_left + number: 13 + mode: + output: true + inverted: true + + - platform: gpio + id: out_31 + pin: + pcf8574: pcf_left + number: 14 + mode: + output: true + inverted: true + + - platform: gpio + id: out_32 + pin: + pcf8574: pcf_left + number: 15 + mode: + output: true + inverted: true + + - platform: gpio + id: out_33 + pin: + pcf8574: pcf_middle + number: 8 + mode: + output: true + inverted: true + + - platform: gpio + id: out_34 + pin: + pcf8574: pcf_middle + number: 9 + mode: + output: true + inverted: true + + - platform: gpio + id: out_35 + pin: + pcf8574: pcf_middle + number: 10 + mode: + output: true + inverted: true + + - platform: gpio + id: out_36 + pin: + pcf8574: pcf_middle + number: 11 + mode: + output: true + inverted: true + + - platform: gpio + id: out_37 + pin: + pcf8574: pcf_middle + number: 12 + mode: + output: true + inverted: true + + - platform: gpio + id: out_38 + pin: + pcf8574: pcf_middle + number: 13 + mode: + output: true + inverted: true + + - platform: gpio + id: out_39 + pin: + pcf8574: pcf_middle + number: 14 + mode: + output: true + inverted: true + + - platform: gpio + id: out_40 + pin: + pcf8574: pcf_middle + number: 15 + mode: + output: true + inverted: true + + - platform: gpio + id: out_41 + pin: + pcf8574: pcf_right + number: 8 + mode: + output: true + inverted: true + + - platform: gpio + id: out_42 + pin: + pcf8574: pcf_right + number: 9 + mode: + output: true + inverted: true + + - platform: gpio + id: out_43 + pin: + pcf8574: pcf_right + number: 10 + mode: + output: true + inverted: true + + - platform: gpio + id: out_44 + pin: + pcf8574: pcf_right + number: 11 + mode: + output: true + inverted: true + + - platform: gpio + id: out_45 + pin: + pcf8574: pcf_right + number: 12 + mode: + output: true + inverted: true + + - platform: gpio + id: out_46 + pin: + pcf8574: pcf_right + number: 13 + mode: + output: true + inverted: true + + - platform: gpio + id: out_47 + pin: + pcf8574: pcf_right + number: 14 + mode: + output: true + inverted: true + + - platform: gpio + id: out_48 + pin: + pcf8574: pcf_right + number: 15 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out01_02.yaml b/example/packages/boards/output/out01_02.yaml new file mode 100644 index 0000000..3856f4e --- /dev/null +++ b/example/packages/boards/output/out01_02.yaml @@ -0,0 +1,17 @@ +output: + - platform: gpio + id: out_01 + pin: + pcf8574: pcf_left + number: 15 + mode: + output: true + inverted: true + - platform: gpio + id: out_02 + pin: + pcf8574: pcf_left + number: 14 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out03_04.yaml b/example/packages/boards/output/out03_04.yaml new file mode 100644 index 0000000..b741b55 --- /dev/null +++ b/example/packages/boards/output/out03_04.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_03 + pin: + pcf8574: pcf_left + number: 13 + mode: + output: true + inverted: true + + - platform: gpio + id: out_04 + pin: + pcf8574: pcf_left + number: 12 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out05_06.yaml b/example/packages/boards/output/out05_06.yaml new file mode 100644 index 0000000..f93db81 --- /dev/null +++ b/example/packages/boards/output/out05_06.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_05 + pin: + pcf8574: pcf_left + number: 11 + mode: + output: true + inverted: true + + - platform: gpio + id: out_06 + pin: + pcf8574: pcf_left + number: 10 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out07_08.yaml b/example/packages/boards/output/out07_08.yaml new file mode 100644 index 0000000..1a996f0 --- /dev/null +++ b/example/packages/boards/output/out07_08.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_07 + pin: + pcf8574: pcf_left + number: 9 + mode: + output: true + inverted: true + + - platform: gpio + id: out_08 + pin: + pcf8574: pcf_left + number: 8 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out09_10.yaml b/example/packages/boards/output/out09_10.yaml new file mode 100644 index 0000000..96bd906 --- /dev/null +++ b/example/packages/boards/output/out09_10.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_09 + pin: + pcf8574: pcf_right + number: 15 + mode: + output: true + inverted: true + + - platform: gpio + id: out_10 + pin: + pcf8574: pcf_right + number: 14 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out11_12.yaml b/example/packages/boards/output/out11_12.yaml new file mode 100644 index 0000000..6ce1e36 --- /dev/null +++ b/example/packages/boards/output/out11_12.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_11 + pin: + pcf8574: pcf_right + number: 13 + mode: + output: true + inverted: true + + - platform: gpio + id: out_12 + pin: + pcf8574: pcf_right + number: 12 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out13_14.yaml b/example/packages/boards/output/out13_14.yaml new file mode 100644 index 0000000..f343c6f --- /dev/null +++ b/example/packages/boards/output/out13_14.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_13 + pin: + pcf8574: pcf_right + number: 11 + mode: + output: true + inverted: true + + - platform: gpio + id: out_14 + pin: + pcf8574: pcf_right + number: 10 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out15_16.yaml b/example/packages/boards/output/out15_16.yaml new file mode 100644 index 0000000..c503a6e --- /dev/null +++ b/example/packages/boards/output/out15_16.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_15 + pin: + pcf8574: pcf_right + number: 9 + mode: + output: true + inverted: true + + - platform: gpio + id: out_16 + pin: + pcf8574: pcf_right + number: 8 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out17_18.yaml b/example/packages/boards/output/out17_18.yaml new file mode 100644 index 0000000..720608e --- /dev/null +++ b/example/packages/boards/output/out17_18.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_17 + pin: + pcf8574: pcf_left + number: 0 + mode: + output: true + inverted: true + + - platform: gpio + id: out_18 + pin: + pcf8574: pcf_left + number: 1 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out19_20.yaml b/example/packages/boards/output/out19_20.yaml new file mode 100644 index 0000000..9ab71de --- /dev/null +++ b/example/packages/boards/output/out19_20.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_19 + pin: + pcf8574: pcf_left + number: 2 + mode: + output: true + inverted: true + + - platform: gpio + id: out_20 + pin: + pcf8574: pcf_left + number: 3 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out21_22.yaml b/example/packages/boards/output/out21_22.yaml new file mode 100644 index 0000000..c4b833e --- /dev/null +++ b/example/packages/boards/output/out21_22.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_21 + pin: + pcf8574: pcf_left + number: 4 + mode: + output: true + inverted: true + + - platform: gpio + id: out_22 + pin: + pcf8574: pcf_left + number: 5 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out23_24.yaml b/example/packages/boards/output/out23_24.yaml new file mode 100644 index 0000000..3afae88 --- /dev/null +++ b/example/packages/boards/output/out23_24.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_23 + pin: + pcf8574: pcf_left + number: 6 + mode: + output: true + inverted: true + + - platform: gpio + id: out_24 + pin: + pcf8574: pcf_left + number: 7 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out25_26.yaml b/example/packages/boards/output/out25_26.yaml new file mode 100644 index 0000000..3c1004d --- /dev/null +++ b/example/packages/boards/output/out25_26.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_25 + pin: + pcf8574: pcf_right + number: 0 + mode: + output: true + inverted: true + + - platform: gpio + id: out_26 + pin: + pcf8574: pcf_right + number: 1 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out27_28.yaml b/example/packages/boards/output/out27_28.yaml new file mode 100644 index 0000000..93fb8d8 --- /dev/null +++ b/example/packages/boards/output/out27_28.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_27 + pin: + pcf8574: pcf_right + number: 2 + mode: + output: true + inverted: true + + - platform: gpio + id: out_28 + pin: + pcf8574: pcf_right + number: 3 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out29_30.yaml b/example/packages/boards/output/out29_30.yaml new file mode 100644 index 0000000..7b2c571 --- /dev/null +++ b/example/packages/boards/output/out29_30.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_29 + pin: + pcf8574: pcf_right + number: 4 + mode: + output: true + inverted: true + + - platform: gpio + id: out_30 + pin: + pcf8574: pcf_right + number: 5 + mode: + output: true + inverted: true diff --git a/example/packages/boards/output/out31_32.yaml b/example/packages/boards/output/out31_32.yaml new file mode 100644 index 0000000..af43e9d --- /dev/null +++ b/example/packages/boards/output/out31_32.yaml @@ -0,0 +1,18 @@ +output: + - platform: gpio + id: out_31 + pin: + pcf8574: pcf_right + number: 6 + mode: + output: true + inverted: true + + - platform: gpio + id: out_32 + pin: + pcf8574: pcf_right + number: 7 + mode: + output: true + inverted: true diff --git a/example/packages/devices/buzzer.yaml b/example/packages/devices/buzzer.yaml new file mode 100644 index 0000000..f91b773 --- /dev/null +++ b/example/packages/devices/buzzer.yaml @@ -0,0 +1,9 @@ +switch: + - platform: gpio + id: buzzer + name: 'Buzzer' + pin: + number: GPIO2 + mode: + output: true + inverted: false diff --git a/example/packages/devices/dimmer_i2c.yaml b/example/packages/devices/dimmer_i2c.yaml new file mode 100644 index 0000000..a98feb2 --- /dev/null +++ b/example/packages/devices/dimmer_i2c.yaml @@ -0,0 +1,5 @@ +i2c: + sda: GPIO4 + scl: GPIO5 + scan: True + frequency: 400kHz diff --git a/example/packages/devices/dimmer_ina219.yaml b/example/packages/devices/dimmer_ina219.yaml new file mode 100644 index 0000000..80fe045 --- /dev/null +++ b/example/packages/devices/dimmer_ina219.yaml @@ -0,0 +1,37 @@ +sensor: + - platform: ina219 + address: 0x40 + shunt_resistance: 0.005 ohm + bus_voltage: + name: 'VDDL Supply' + entity_category: diagnostic + power: + name: 'VDDL Power' + entity_category: diagnostic + current: + name: 'VDDL Current' + entity_category: diagnostic + shunt_voltage: + name: 'VDDL Shunt Voltage' + entity_category: diagnostic + max_voltage: 32V + max_current: 10A + update_interval: 5s + - platform: ina219 + address: 0x41 + shunt_resistance: 0.005 ohm + bus_voltage: + name: 'VDDR Supply' + entity_category: diagnostic + power: + name: 'VDDR Power' + entity_category: diagnostic + current: + name: 'VDDR Current' + entity_category: diagnostic + shunt_voltage: + name: 'VDDR Shunt Voltage' + entity_category: diagnostic + max_voltage: 32V + max_current: 10A + update_interval: 5s diff --git a/example/packages/devices/dimmer_outputs.yaml b/example/packages/devices/dimmer_outputs.yaml new file mode 100644 index 0000000..4669212 --- /dev/null +++ b/example/packages/devices/dimmer_outputs.yaml @@ -0,0 +1,42 @@ +output: + - platform: ledc + pin: 33 + frequency: 1000Hz + inverted: false + id: chl01 + - platform: ledc + pin: 32 + frequency: 1000Hz + inverted: false + id: chl02 + - platform: ledc + pin: 12 + frequency: 1000Hz + inverted: false + id: chl03 + - platform: ledc + pin: 14 + frequency: 1000Hz + inverted: false + id: chl04 + + - platform: ledc + pin: 13 + frequency: 1000Hz + inverted: false + id: chr01 + - platform: ledc + pin: 15 + frequency: 1000Hz + inverted: false + id: chr02 + - platform: ledc + pin: 2 + frequency: 1000Hz + inverted: false + id: chr03 + - platform: ledc + pin: 17 + frequency: 1000Hz + inverted: false + id: chr04 diff --git a/example/packages/devices/serial_no.yaml b/example/packages/devices/serial_no.yaml new file mode 100644 index 0000000..8c1dff8 --- /dev/null +++ b/example/packages/devices/serial_no.yaml @@ -0,0 +1,10 @@ +text_sensor: + - platform: template + name: 'Serial No.' + id: serial_no + lambda: |- + std::string mac = get_mac_address(); + return std::string("${serial_prefix}") + mac.substr(mac.length()/2); + icon: mdi:expansion-card-variant + entity_category: diagnostic + update_interval: 60min diff --git a/example/packages/devices_v0_7-v0_9/ina219.yaml b/example/packages/devices_v0_7-v0_9/ina219.yaml new file mode 100644 index 0000000..20b7c8a --- /dev/null +++ b/example/packages/devices_v0_7-v0_9/ina219.yaml @@ -0,0 +1,20 @@ +sensor: + # Module power consmption + - platform: ina219 + address: 0x40 + shunt_resistance: 0.1 ohm + current: + id: ina_current + name: 'INA219 Current' + power: + id: ina_power + name: 'INA219 Power' + bus_voltage: + id: ina_bus_voltage + name: 'INA219 Bus Voltage' + shunt_voltage: + id: ina_shunt_voltage + name: 'INA219 Shunt Voltage' + max_voltage: 32.0V + max_current: 3.2A + update_interval: 30s diff --git a/example/packages/devices_v0_7-v0_9/lm75b.yaml b/example/packages/devices_v0_7-v0_9/lm75b.yaml new file mode 100644 index 0000000..a7151d3 --- /dev/null +++ b/example/packages/devices_v0_7-v0_9/lm75b.yaml @@ -0,0 +1,12 @@ +#i2c address: 0x48 output lm75b temp +#LM75B +external_components: + - source: github://boneIO-eu/esphome-LM75@main #Original source and thank you note for BTomala https://github.com/boneIO-eu/esphome-lm75 + components: [lm75] + +sensor: + # Lower board temperature + - platform: lm75 + id: boneIO_temp + name: 'LM75B Temperature' + update_interval: 30s diff --git a/example/packages/devices_v0_7-v0_9/one_wire.yaml b/example/packages/devices_v0_7-v0_9/one_wire.yaml new file mode 100644 index 0000000..890ec69 --- /dev/null +++ b/example/packages/devices_v0_7-v0_9/one_wire.yaml @@ -0,0 +1,15 @@ +one_wire: + - platform: gpio + pin: GPIO32 +# sensor: +# - platform: dallas_temp +# address: 0x283c01d607d4df28 +# name: "Dallas Sensor 1" +# +# - platform: dallas_temp +# address: 0xdfe67a061e64ff28 +# name: "Dallas Sensor 2" +# +# - platform: dallas_temp +# address: 0xa7a89f071e64ff28 +# name: "Dallas Sensor 3" diff --git a/example/packages/devices_v0_7-v0_9/pcf.yaml b/example/packages/devices_v0_7-v0_9/pcf.yaml new file mode 100644 index 0000000..36a6da8 --- /dev/null +++ b/example/packages/devices_v0_7-v0_9/pcf.yaml @@ -0,0 +1,21 @@ +pcf8574: + - id: 'pcf_inputs_1to14' + i2c_id: i2c_bus + address: 0x20 + pcf8575: true + - id: 'pcf_inputs_15to28' + i2c_id: i2c_bus + address: 0x21 + pcf8575: true + - id: 'pcf_inputs_28to35_menu' + i2c_id: i2c_bus + address: 0x22 + pcf8575: false + - id: 'pcf_left' + address: 0x23 + pcf8575: true + i2c_id: i2c_bus + - id: 'pcf_right' + address: 0x24 + pcf8575: true + i2c_id: i2c_bus diff --git a/example/packages/devices_v0_7-v0_9/pcf_mosfet.yaml b/example/packages/devices_v0_7-v0_9/pcf_mosfet.yaml new file mode 100644 index 0000000..8c2c084 --- /dev/null +++ b/example/packages/devices_v0_7-v0_9/pcf_mosfet.yaml @@ -0,0 +1,25 @@ +pcf8574: + - id: 'pcf_inputs_1to14' + i2c_id: i2c_bus + address: 0x20 + pcf8575: true + - id: 'pcf_inputs_15to28' + i2c_id: i2c_bus + address: 0x21 + pcf8575: true + - id: 'pcf_inputs_28to35_menu' + i2c_id: i2c_bus + address: 0x22 + pcf8575: false + - id: 'pcf_left' + address: 0x23 + pcf8575: true + i2c_id: i2c_bus + - id: 'pcf_middle' + address: 0x24 + pcf8575: true + i2c_id: i2c_bus + - id: 'pcf_right' + address: 0x25 + pcf8575: true + i2c_id: i2c_bus diff --git a/example/packages/devices_v0_7-v0_9/pcf_with_mcp.yaml b/example/packages/devices_v0_7-v0_9/pcf_with_mcp.yaml new file mode 100644 index 0000000..9e63166 --- /dev/null +++ b/example/packages/devices_v0_7-v0_9/pcf_with_mcp.yaml @@ -0,0 +1,18 @@ +pcf8574: + - id: 'pcf_inputs_1to14' + i2c_id: i2c_bus + address: 0x20 + pcf8575: true + - id: 'pcf_inputs_15to28' + i2c_id: i2c_bus + address: 0x21 + pcf8575: true + - id: 'pcf_inputs_28to35_menu' + i2c_id: i2c_bus + address: 0x22 + pcf8575: false +mcp23017: + - id: 'mcp_left' + address: 0x23 + - id: 'mcp_right' + address: 0x24 diff --git a/example/packages/devices_v0_7/display.yaml b/example/packages/devices_v0_7/display.yaml new file mode 100644 index 0000000..96cb95d --- /dev/null +++ b/example/packages/devices_v0_7/display.yaml @@ -0,0 +1,151 @@ +#i2c address: 0x3C input oled +sensor: + - platform: uptime + id: wt32_uptime_seconds + update_interval: 60s + entity_category: diagnostic + on_raw_value: + then: + - text_sensor.template.publish: + id: wt32_uptime + state: !lambda |- + int seconds = round(id(wt32_uptime_seconds).raw_state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + return ( + (days ? to_string(days) + "d " : "") + + (hours ? to_string(hours) + "h " : "") + + (to_string(minutes) + "m") + ).c_str(); + +text_sensor: + - platform: template + name: Uptime + id: wt32_uptime + entity_category: diagnostic + icon: mdi:clock-start + - platform: template + name: 'IP Address' + id: ip_address + entity_category: diagnostic + icon: 'mdi:ip-network' + lambda: |- + return id(eth).get_ip_addresses().empty() ? "Unset" : id(eth).get_ip_addresses()[0].str(); + update_interval: 60s + +script: + - id: screensaver_script + # screensaver script, turn on screensaver after 30 seconds, restart counter each time when invoked + mode: restart + then: + # set the time after which the screensaver will be activated + - delay: 30s + - display.page.show: screensaver + - component.update: oled_display + +esphome: + on_boot: + priority: 0 + then: + - display.page.show: first_page + - component.update: ip_address + - component.update: oled_display + - script.execute: screensaver_script + +binary_sensor: + - platform: gpio + entity_category: config + id: boneIO_button + pin: + pcf8574: pcf_inputs_28to35_menu + number: 7 + mode: + input: true + inverted: true + on_press: + then: + # cycle through pages: first_page -> second_page -> third_page -> last_page -> first_page + # screensaver is excluded from the cycle — button press wakes it to first_page + - if: + condition: + # on the last page wrap around to the first page (skip screensaver) + display.is_displaying_page: last_page + then: + - display.page.show: first_page + - component.update: oled_display + else: + - if: + condition: + # button wakes screensaver — jump to first page + display.is_displaying_page: screensaver + then: + - display.page.show: first_page + - component.update: oled_display + else: + # advance to the next page (first -> second -> third -> last) + - display.page.show_next: oled_display + - component.update: oled_display + # restart screensaver script + - script.execute: screensaver_script + +display: + - platform: ssd1306_i2c + id: oled_display + model: 'SH1106 128x64' + address: 0x3C + contrast: 0.5 + pages: + - id: first_page + lambda: |- + it.rectangle(0, 0, 126, 15); + it.printf(64,11, id(size_10), TextAlign::BASELINE_CENTER, "Peak Control"); + it.printf(4, 37, id(size_10), TextAlign::BASELINE_LEFT ,"IP addr:"); + it.printf(124, 37, id(size_10), TextAlign::BASELINE_RIGHT ,"%s", id(ip_address).state.c_str()); + it.printf(4, 49, id(size_10), TextAlign::BASELINE_LEFT ,"Uptime:"); + it.printf(124, 49, id(size_10), TextAlign::BASELINE_RIGHT ,"%s", id(wt32_uptime).state.c_str()); + it.printf(4, 61, id(size_10), TextAlign::BASELINE_LEFT ,"Temperature:"); + it.printf(124, 61, id(size_10), TextAlign::BASELINE_RIGHT ,"%.2f°C", id(boneIO_temp).state); + # additional pages should be defined between the first and last page + - id: second_page + lambda: |- + it.rectangle(0, 0, 126, 15); + it.printf(64, 11, id(size_10), TextAlign::BASELINE_CENTER, "Network"); + it.printf(4, 25, id(size_10), TextAlign::BASELINE_LEFT, "Host:"); + it.printf(124, 25, id(size_10), TextAlign::BASELINE_RIGHT, "%s", App.get_name().c_str()); + it.printf(4, 37, id(size_10), TextAlign::BASELINE_LEFT, "MAC:"); + it.printf(124, 37, id(size_10), TextAlign::BASELINE_RIGHT, "%s", get_mac_address().c_str()); + it.printf(4, 49, id(size_10), TextAlign::BASELINE_LEFT, "ETH:"); + it.printf(124, 49, id(size_10), TextAlign::BASELINE_RIGHT, "%s", id(eth).is_connected() ? "Connected" : "No link"); + - id: third_page + lambda: |- + it.rectangle(0, 0, 126, 15); + it.printf(64, 11, id(size_10), TextAlign::BASELINE_CENTER, "System"); + it.printf(4, 25, id(size_10), TextAlign::BASELINE_LEFT, "Version:"); + it.printf(124, 25, id(size_10), TextAlign::BASELINE_RIGHT, "%s", ESPHOME_VERSION); + it.printf(4, 37, id(size_10), TextAlign::BASELINE_LEFT, "Free heap:"); + it.printf(124, 37, id(size_10), TextAlign::BASELINE_RIGHT, "%u B", esp_get_free_heap_size()); + it.printf(4, 49, id(size_10), TextAlign::BASELINE_LEFT, "CPU freq:"); + it.printf(124, 49, id(size_10), TextAlign::BASELINE_RIGHT, "%u MHz", esp_clk_cpu_freq() / 1000000); + - id: last_page + lambda: |- + it.rectangle(0, 0, 126, 15); + it.printf(64,11, id(size_10), TextAlign::BASELINE_CENTER, "Peak Control"); + it.printf(4, 25, id(size_10), TextAlign::BASELINE_LEFT ,"Current:"); + it.printf(124, 25, id(size_10), TextAlign::BASELINE_RIGHT ,"%.3fA", id(ina_current).state); + it.printf(4, 37, id(size_10), TextAlign::BASELINE_LEFT ,"Power:"); + it.printf(124, 37, id(size_10), TextAlign::BASELINE_RIGHT ,"%.2fW", id(ina_power).state); + it.printf(4, 49, id(size_10), TextAlign::BASELINE_LEFT ,"Bus Volt:"); + it.printf(124, 49, id(size_10), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_bus_voltage).state); + it.printf(4, 61, id(size_10), TextAlign::BASELINE_LEFT ,"Shunt Volt:"); + it.printf(124, 61, id(size_10), TextAlign::BASELINE_RIGHT ,"%.2fV", id(ina_shunt_voltage).state); + - id: screensaver + lambda: |- + it.fill(COLOR_OFF); + +font: + - file: 'gfonts://Ubuntu' + id: size_10 + size: 10 diff --git a/example/packages/devices_v0_7/i2c.yaml b/example/packages/devices_v0_7/i2c.yaml new file mode 100644 index 0000000..085fb17 --- /dev/null +++ b/example/packages/devices_v0_7/i2c.yaml @@ -0,0 +1,6 @@ +i2c: + - id: i2c_bus + sda: GPIO17 + scl: GPIO33 + scan: True + frequency: 400kHz diff --git a/example/packages/devices_v0_7/wiegand.yaml b/example/packages/devices_v0_7/wiegand.yaml new file mode 100644 index 0000000..01723ad --- /dev/null +++ b/example/packages/devices_v0_7/wiegand.yaml @@ -0,0 +1,35 @@ +text_sensor: + - platform: template + name: 'Wiegand 1 Tag' + id: wiegand_1_tag + icon: mdi:card-account-details + entity_category: "" + + - platform: template + name: 'Wiegand 2 Tag' + id: wiegand_2_tag + icon: mdi:card-account-details + entity_category: "" + +wiegand: + - id: wiegand_reader_1 + d0: GPIO34 + d1: GPIO35 + on_tag: + - text_sensor.template.publish: + id: wiegand_1_tag + state: !lambda 'return x;' + on_key: + - lambda: |- + ESP_LOGI("wiegand1", "Klawisz: %c", x); + + - id: wiegand_reader_2 + d0: GPIO36 + d1: GPIO39 + on_tag: + - text_sensor.template.publish: + id: wiegand_2_tag + state: !lambda 'return x;' + on_key: + - lambda: |- + ESP_LOGI("wiegand2", "Klawisz: %c", x); diff --git a/kuba-hub.yaml b/kuba-hub.yaml new file mode 100644 index 0000000..5344373 --- /dev/null +++ b/kuba-hub.yaml @@ -0,0 +1,1014 @@ +substitutions: + name: kuba-hub + friendly_name: 'Kuba Hub' + project_version: '1.0' + +esphome: + name: '${name}' + friendly_name: '${friendly_name}' + name_add_mac_suffix: true + project: + name: peakcontrol.kuba-hub + version: '${project_version}' + on_boot: + - priority: 1001 + then: + - lambda: |- + gpio_reset_pin((gpio_num_t)5); + gpio_reset_pin((gpio_num_t)14); + gpio_reset_pin((gpio_num_t)15); + +esp32: + board: esp32-poe + framework: + type: esp-idf + +ethernet: + type: LAN8720 + mdc_pin: GPIO23 + mdio_pin: GPIO18 + clk_mode: GPIO17_OUT + phy_addr: 0 + power_pin: GPIO12 + +dashboard_import: + package_import_url: github://gitea.domowyasystent.com/jkocon/ESP32-Hub/kuba-hub.yaml@main + import_full_config: true + +logger: + +api: + reboot_timeout: 0s + encryption: + key: "" # TODO: wygeneruj nowy klucz: esphome generate-api-key + +ota: + - platform: esphome + password: "" # TODO: ustaw hasło OTA + - platform: web_server + +web_server: + port: 80 + local: true + +#wifi: +# ssid: !secret wifi_ssid +# password: !secret wifi_password +# +# ap: +# ssid: '${friendly_name} Fallback' +# password: "" + +#captive_portal: + +time: + - platform: homeassistant + timezone: Europe/Warsaw + id: homeassistant_time + +button: + - platform: restart + name: '${friendly_name} Restart' + +packages: + main_hub_packages: + url: https://gitea.domowyasystent.com/jkocon/ESP32-Hub + ref: main + files: [ + + # ── Zawsze aktywne ──────────────────────────────────────────────────── + 'packages/main_hub/i2c.yaml', + 'packages/main_hub/status_led.yaml', + 'packages/main_hub/scripts.yaml', + + # ── PCA9685 PWM ─────────────────────────────────────────────────────── + 'packages/main_hub/pca9685/0x40.yaml', # A0=0 A1=0 A2=0 A3=0 A4=0 A5=0 + 'packages/main_hub/pca9685/0x41.yaml', # A0=1 A1=0 A2=0 A3=0 A4=0 A5=0 + + # ── MCP23017 OUTPUTS ────────────────────────────────────────────────── + 'packages/main_hub/mcp23017/outputs/0x21.yaml', # A2=0 A1=0 A0=1 + 'packages/main_hub/mcp23017/outputs/0x23.yaml', # A2=0 A1=1 A0=1 + 'packages/main_hub/mcp23017/outputs/0x25.yaml', # A2=1 A1=0 A0=1 + + # ── MCP23017 INPUTS ─────────────────────────────────────────────────── + 'packages/main_hub/mcp23017/inputs/0x20.yaml', # A2=0 A1=0 A0=0 + 'packages/main_hub/mcp23017/inputs/0x22.yaml', # A2=0 A1=1 A0=0 + 'packages/main_hub/mcp23017/inputs/0x24.yaml', # A2=1 A1=0 A0=0 + + ] + +light: + # ── Nazwane oświetlenie LED PWM (PCA9685) ──────────────────────────────── + # Przypisz właściwe kanały wg okablowania (pca_0xADDR_chN) + - platform: monochromatic + name: "Serwer LED" + id: serwer_led + output: pca_0x40_ch0 # TODO: zmień na właściwy kanał + + - platform: monochromatic + name: "Jadalnia LED" + id: jadalnia_led + output: pca_0x40_ch1 # TODO: zmień na właściwy kanał + + - platform: monochromatic + name: "Sypialnia LED" + id: sypialnia_led + output: pca_0x40_ch2 # TODO: zmień na właściwy kanał + + - platform: monochromatic + name: "Pokój dla Gości LED" + id: pokoj_dla_gosci_led + output: pca_0x40_ch3 # TODO: zmień na właściwy kanał + + - platform: monochromatic + name: "SPA Ledy" + id: spa_ledy + output: pca_0x40_ch4 # TODO: zmień na właściwy kanał + + - platform: monochromatic + name: "Biała Łazienka Wanna LED" + id: biala_lazienka_wanna_led + output: pca_0x40_ch5 # TODO: zmień na właściwy kanał + + - platform: monochromatic + name: "Kuchnia Łezka LED" + id: kuchnia_lezka_led + output: pca_0x40_ch6 # TODO: zmień na właściwy kanał + +binary_sensor: + ################## + # mcp23xxx_0x20 # + ################## + + # Wejście 1 — single: halogeny wejście, triple: wyłącz lampy, long: wyłącz wentylatory + - platform: gpio + name: "Wejście 1" + id: hub1_in0 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 0 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out15 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: off_all_lights + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_fans + + # Wejście 3 — brak automatyzacji + - platform: gpio + name: "Wejście 3" + id: hub1_in1 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 1 + mode: INPUT + inverted: True + + # Wejście 2 — single: hub1_out14, triple: WLED korytarz kinkiety + - platform: gpio + name: "Wejście 2" + id: hub1_in2 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 2 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out14 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_korytarz_kinkiety_toggle + + # Sypialnia 3 — single: turn_on out12+out1, double: toggle out12+out1 + - platform: gpio + name: "Sypialnia 3" + id: hub1_in3 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 3 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.turn_on: mcp_0x23_out12 + - light.turn_on: mcp_0x23_out1 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out12 + - light.toggle: mcp_0x23_out1 + + # Sypialnia 1 — single: sypialnia LED + - platform: gpio + name: "Sypialnia 1" + id: hub1_in4 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 4 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: sypialnia_led + + # Sypialnia 2 — single: out7 + - platform: gpio + name: "Sypialnia 2" + id: hub1_in5 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 5 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x23_out7 + + # Sypialnia Łóżko Prawa Strona — single: out1, double: out12+out1, long: wyłącz wszystkie + - platform: gpio + name: "Sypialnia Łóżko Prawa" + id: hub1_in6 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 6 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out1 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out12 + - light.toggle: mcp_0x23_out1 + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Sypialnia Łóżko Lewa Strona — single: out12, double: out12+out1, long: wyłącz wszystkie + - platform: gpio + name: "Sypialnia Łóżko Lewa" + id: hub1_in7 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 7 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out12 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out12 + - light.toggle: mcp_0x23_out1 + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Niebieski Pokój Lewy — single: out10, double: out7 + - platform: gpio + name: "Niebieski Pokój Lewy" + id: hub1_in8 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 8 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out10 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out7 + + # Niebieski Pokój Prawy — single: pokój dla gości LED + - platform: gpio + name: "Niebieski Pokój Prawy" + id: hub1_in9 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 9 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: pokoj_dla_gosci_led + + # Nie podpięte + - platform: gpio + name: "hub1_in10" + id: hub1_in10 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 10 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in11" + id: hub1_in11 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 11 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in12" + id: hub1_in12 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 12 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in13" + id: hub1_in13 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 13 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in14" + id: hub1_in14 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 14 + mode: INPUT + inverted: True + - platform: gpio + name: "hub1_in15" + id: hub1_in15 + pin: + mcp23xxx: mcp23xxx_0x20 + number: 15 + mode: INPUT + inverted: True + + ################## + # mcp23xxx_0x22 # + ################## + + # Korytarz 2 — single: out15 + - platform: gpio + name: "Korytarz 2" + id: hub2_in0 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 0 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x21_out15 + + # Korytarz 3 — single: WLED korytarz kinkiety, long: wyłącz wszystkie + - platform: gpio + name: "Korytarz 3" + id: hub2_in1 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 1 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_korytarz_kinkiety_toggle + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Korytarz 1 — single: out14, long: wyłącz wszystkie + - platform: gpio + name: "Korytarz 1" + id: hub2_in2 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 2 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out14 + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_lights + - script.execute: off_all_fans + + # Mały Korytarz — brak automatyzacji + - platform: gpio + name: "Mały Korytarz" + id: hub2_in3 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 3 + mode: INPUT + inverted: True + + # Garderoba Mała — single: out14, double: wentylator + - platform: gpio + name: "Garderoba Mała" + id: hub2_in4 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 4 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out14 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x25_out2 + + # Kuchnia 3_1 — single: out8 + - platform: gpio + name: "Kuchnia 3_1" + id: hub2_in5 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 5 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x21_out8 + + # Kuchnia 3_2 — single: jadalnia LED + - platform: gpio + name: "Kuchnia 3_2" + id: hub2_in6 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 6 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: jadalnia_led + + # Kuchnia 2_1 — single: out3, triple: wyłącz lampy, long: wyłącz wentylatory + - platform: gpio + name: "Kuchnia 2_1" + id: hub2_in7 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 7 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out3 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: off_all_lights + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_fans + + # Kuchnia 2_2 — single: kuchnia łezka LED + - platform: gpio + name: "Kuchnia 2_2" + id: hub2_in8 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 8 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: kuchnia_lezka_led + + # Kuchnia 1_1 — single: out11, double: WLED salon wentylator + - platform: gpio + name: "Kuchnia 1_1" + id: hub2_in9 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 9 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out11 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_salon_wentylator_toggle + + # Kuchnia 1_2 — single: WLED komin+salon kinkiety, double/long: WLED komin on + - platform: gpio + name: "Kuchnia 1_2" + id: hub2_in10 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 10 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_komin_toggle + - script.execute: wled_salon_kinkiety_toggle + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_komin_on + - timing: + - ON for at least 350ms + then: + - script.execute: wled_komin_on + + # Schody 3 — single: WLED schody all + - platform: gpio + name: "Schody 3" + id: hub2_in11 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 11 + mode: INPUT + inverted: True + on_click: + then: + - script.execute: wled_schody_all_toggle + + # Schody 1 — single: out11 + - platform: gpio + name: "Schody 1" + id: hub2_in12 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 12 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x23_out11 + + # Schody 2 — single: WLED salon kinkiety, double: off, long: WLED komin + - platform: gpio + name: "Schody 2" + id: hub2_in13 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 13 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_salon_kinkiety_toggle + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: wled_salon_kinkiety_off + - timing: + - ON for at least 350ms + then: + - script.execute: wled_komin_toggle + + # Nie podpięte + - platform: gpio + name: "hub2_in14" + id: hub2_in14 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 14 + mode: INPUT + inverted: True + - platform: gpio + name: "hub2_in15" + id: hub2_in15 + pin: + mcp23xxx: mcp23xxx_0x22 + number: 15 + mode: INPUT + inverted: True + + ################## + # mcp23xxx_0x24 # + ################## + + # Garderoba Duża Lewy — single: out7 + - platform: gpio + name: "Garderoba Duża Lewy" + id: hub3_in0 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 0 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x21_out7 + + # Garderoba Duża Prawy — single: out7 + - platform: gpio + name: "Garderoba Duża Prawy" + id: hub3_in1 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 1 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x21_out7 + + # SPA Lewy — single: out13, triple: wentylator + - platform: gpio + name: "SPA Lewy" + id: hub3_in2 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 2 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out13 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out4 + + # SPA Prawy — single: out4+out10, triple: SPA Ledy + - platform: gpio + name: "SPA Prawy" + id: hub3_in3 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 3 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out4 + - light.toggle: mcp_0x21_out10 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: spa_ledy + + # Biała Łazienka Ściana — single: out0, double: wanna LED, long: wentylator + - platform: gpio + name: "Biała Łazienka Ściana" + id: hub3_in4 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 4 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x23_out0 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: biala_lazienka_wanna_led + - timing: + - ON for at least 350ms + then: + - light.toggle: mcp_0x23_out8 + + # Małe WC Lustro Prawy — single: out2 + WLED wc + wentylator + - platform: gpio + name: "Małe WC Lustro Prawy" + id: hub3_in5 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 5 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x23_out2 + - light.toggle: mcp_0x23_out5 + - script.execute: wled_wc_led_toggle + + # Małe WC Lustro Lewy — single: out9 + - platform: gpio + name: "Małe WC Lustro Lewy" + id: hub3_in6 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 6 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x21_out9 + + # Biała Łazienka Skos — single: out4 + - platform: gpio + name: "Biała Łazienka Skos" + id: hub3_in7 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 7 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x23_out4 + + # SPA Lustro Lewy — single: out5 + - platform: gpio + name: "SPA Lustro Lewy" + id: hub3_in8 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 8 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x21_out5 + + # SPA Lustro Prawy — single: out1 + - platform: gpio + name: "SPA Lustro Prawy" + id: hub3_in9 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 9 + mode: INPUT + inverted: True + on_click: + then: + - light.toggle: mcp_0x21_out1 + + # Biuro Skos — single: out2, double: serwer LED wyłącz + - platform: gpio + name: "Biuro Skos" + id: hub3_in10 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 10 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out2 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.turn_off: serwer_led + + # Serwer Prawy — single: serwer LED, double: out2, triple: wentylator + - platform: gpio + name: "Serwer Prawy" + id: hub3_in11 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 11 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: serwer_led + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out2 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x25_out2 + + # Serwer Lewy — single: out14, triple: wyłącz lampy, long: wyłącz wentylatory + - platform: gpio + name: "Serwer Lewy" + id: hub3_in12 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 12 + mode: INPUT + inverted: True + on_multi_click: + - timing: + - ON for at most 350ms + - OFF for at least 350ms + then: + - light.toggle: mcp_0x21_out14 + - timing: + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at most 350ms + - ON for at most 350ms + - OFF for at least 350ms + then: + - script.execute: off_all_lights + - timing: + - ON for at least 350ms + then: + - script.execute: off_all_fans + + # Nie podpięte + - platform: gpio + name: "hub3_in13" + id: hub3_in13 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 13 + mode: INPUT + inverted: True + - platform: gpio + name: "hub3_in14" + id: hub3_in14 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 14 + mode: INPUT + inverted: True + - platform: gpio + name: "hub3_in15" + id: hub3_in15 + pin: + mcp23xxx: mcp23xxx_0x24 + number: 15 + mode: INPUT + inverted: True + +esp32_ble_tracker: + +sensor: + - platform: uptime + type: seconds + name: Uptime Sensor + - platform: atc_mithermometer + mac_address: "A4:C1:38:C5:11:58" + temperature: + name: "Biuro Temperatura" + humidity: + name: "Biuro Nawilzenie" + battery_level: + name: "Biuro Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:5C:4F:38" + temperature: + name: "Serwer Temperatura" + humidity: + name: "Serwer Nawilzenie" + battery_level: + name: "Serwer Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:67:6B:94" + temperature: + name: "Kuchnia Temperatura" + humidity: + name: "Kuchnia Nawilzenie" + battery_level: + name: "Kuchnia Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:C9:FE:CA" + temperature: + name: "WC Temperatura" + humidity: + name: "WC Nawilzenie" + battery_level: + name: "WC Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:63:6D:DB" + temperature: + name: "Lazienka Temperatura" + humidity: + name: "Lazienka Nawilzenie" + battery_level: + name: "Lazienka Bateria" diff --git a/main-hub.yaml b/main-hub.yaml new file mode 100644 index 0000000..dfd5af4 --- /dev/null +++ b/main-hub.yaml @@ -0,0 +1,222 @@ +substitutions: + name: main-hub + friendly_name: 'Main Hub' + project_version: '1.0' + +esphome: + name: '${name}' + friendly_name: '${friendly_name}' + name_add_mac_suffix: true + project: + name: peakcontrol.main-hub + version: '${project_version}' + on_boot: + - priority: 1001 + then: + - lambda: |- + gpio_reset_pin((gpio_num_t)5); + gpio_reset_pin((gpio_num_t)14); + gpio_reset_pin((gpio_num_t)15); + +esp32: + board: esp32-poe + framework: + type: esp-idf + +ethernet: + type: LAN8720 + mdc_pin: GPIO23 + mdio_pin: GPIO18 + clk_mode: GPIO17_OUT + phy_addr: 0 + power_pin: GPIO12 + +dashboard_import: + package_import_url: github://gitea.domowyasystent.com/jkocon/ESP32-Hub/main-hub.yaml@main + import_full_config: true + +logger: + +api: + reboot_timeout: 0s + encryption: + key: "" # TODO: wygeneruj nowy klucz: esphome generate-api-key + +ota: + - platform: esphome + password: "" # TODO: ustaw hasło OTA + - platform: web_server + +web_server: + port: 80 + local: true + +#wifi: +# ssid: !secret wifi_ssid +# password: !secret wifi_password +# +# ap: +# ssid: '${friendly_name} Fallback' +# password: "" + +#captive_portal: + +time: + - platform: homeassistant + timezone: Europe/Warsaw + id: homeassistant_time + +button: + - platform: restart + name: '${friendly_name} Restart' + +packages: + main_hub_packages: + url: https://gitea.domowyasystent.com/jkocon/ESP32-Hub + ref: main + files: [ + + # ── Zawsze aktywne ──────────────────────────────────────────────────── + 'packages/main_hub/i2c.yaml', + 'packages/main_hub/status_led.yaml', + 'packages/main_hub/scripts.yaml', + + # ── PCA9685 PWM ─────────────────────────────────────────────────────── + # Zworki A0–A5 ustawiają adres: A0=+1, A1=+2, A2=+4, A3=+8, A4=+16, A5=+32 + # Baza adresów: 0x40. Uwaga: 0x70–0x73 zarezerwowane przez protokół. + # Odkomentuj linię zgodną z fizycznym adresem modułu. + # + # 'packages/main_hub/pca9685/0x40.yaml', # A0=0 A1=0 A2=0 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x41.yaml', # A0=1 A1=0 A2=0 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x42.yaml', # A0=0 A1=1 A2=0 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x43.yaml', # A0=1 A1=1 A2=0 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x44.yaml', # A0=0 A1=0 A2=1 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x45.yaml', # A0=1 A1=0 A2=1 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x46.yaml', # A0=0 A1=1 A2=1 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x47.yaml', # A0=1 A1=1 A2=1 A3=0 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x48.yaml', # A0=0 A1=0 A2=0 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x49.yaml', # A0=1 A1=0 A2=0 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x4a.yaml', # A0=0 A1=1 A2=0 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x4b.yaml', # A0=1 A1=1 A2=0 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x4c.yaml', # A0=0 A1=0 A2=1 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x4d.yaml', # A0=1 A1=0 A2=1 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x4e.yaml', # A0=0 A1=1 A2=1 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x4f.yaml', # A0=1 A1=1 A2=1 A3=1 A4=0 A5=0 + # 'packages/main_hub/pca9685/0x50.yaml', # A0=0 A1=0 A2=0 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x51.yaml', # A0=1 A1=0 A2=0 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x52.yaml', # A0=0 A1=1 A2=0 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x53.yaml', # A0=1 A1=1 A2=0 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x54.yaml', # A0=0 A1=0 A2=1 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x55.yaml', # A0=1 A1=0 A2=1 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x56.yaml', # A0=0 A1=1 A2=1 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x57.yaml', # A0=1 A1=1 A2=1 A3=0 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x58.yaml', # A0=0 A1=0 A2=0 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x59.yaml', # A0=1 A1=0 A2=0 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x5a.yaml', # A0=0 A1=1 A2=0 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x5b.yaml', # A0=1 A1=1 A2=0 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x5c.yaml', # A0=0 A1=0 A2=1 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x5d.yaml', # A0=1 A1=0 A2=1 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x5e.yaml', # A0=0 A1=1 A2=1 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x5f.yaml', # A0=1 A1=1 A2=1 A3=1 A4=1 A5=0 + # 'packages/main_hub/pca9685/0x60.yaml', # A0=0 A1=0 A2=0 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x61.yaml', # A0=1 A1=0 A2=0 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x62.yaml', # A0=0 A1=1 A2=0 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x63.yaml', # A0=1 A1=1 A2=0 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x64.yaml', # A0=0 A1=0 A2=1 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x65.yaml', # A0=1 A1=0 A2=1 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x66.yaml', # A0=0 A1=1 A2=1 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x67.yaml', # A0=1 A1=1 A2=1 A3=0 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x68.yaml', # A0=0 A1=0 A2=0 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x69.yaml', # A0=1 A1=0 A2=0 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x6a.yaml', # A0=0 A1=1 A2=0 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x6b.yaml', # A0=1 A1=1 A2=0 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x6c.yaml', # A0=0 A1=0 A2=1 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x6d.yaml', # A0=1 A1=0 A2=1 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x6e.yaml', # A0=0 A1=1 A2=1 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x6f.yaml', # A0=1 A1=1 A2=1 A3=1 A4=0 A5=1 + # 'packages/main_hub/pca9685/0x74.yaml', # A0=0 A1=0 A2=1 A3=0 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x75.yaml', # A0=1 A1=0 A2=1 A3=0 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x76.yaml', # A0=0 A1=1 A2=1 A3=0 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x77.yaml', # A0=1 A1=1 A2=1 A3=0 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x78.yaml', # A0=0 A1=0 A2=0 A3=1 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x79.yaml', # A0=1 A1=0 A2=0 A3=1 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x7a.yaml', # A0=0 A1=1 A2=0 A3=1 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x7b.yaml', # A0=1 A1=1 A2=0 A3=1 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x7c.yaml', # A0=0 A1=0 A2=1 A3=1 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x7d.yaml', # A0=1 A1=0 A2=1 A3=1 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x7e.yaml', # A0=0 A1=1 A2=1 A3=1 A4=1 A5=1 + # 'packages/main_hub/pca9685/0x7f.yaml', # A0=1 A1=1 A2=1 A3=1 A4=1 A5=1 + + # ── MCP23017 OUTPUTS ────────────────────────────────────────────────── + # Zworki A0–A2 ustawiają adres: A0=+1, A1=+2, A2=+4. Baza: 0x20. + # Odkomentuj linię zgodną z fizycznym adresem modułu skonfigurowanego jako OUTPUT. + # + # 'packages/main_hub/mcp23017/outputs/0x20.yaml', # A2=0 A1=0 A0=0 + # 'packages/main_hub/mcp23017/outputs/0x21.yaml', # A2=0 A1=0 A0=1 + # 'packages/main_hub/mcp23017/outputs/0x22.yaml', # A2=0 A1=1 A0=0 + # 'packages/main_hub/mcp23017/outputs/0x23.yaml', # A2=0 A1=1 A0=1 + # 'packages/main_hub/mcp23017/outputs/0x24.yaml', # A2=1 A1=0 A0=0 + # 'packages/main_hub/mcp23017/outputs/0x25.yaml', # A2=1 A1=0 A0=1 + # 'packages/main_hub/mcp23017/outputs/0x26.yaml', # A2=1 A1=1 A0=0 + # 'packages/main_hub/mcp23017/outputs/0x27.yaml', # A2=1 A1=1 A0=1 + + # ── MCP23017 INPUTS ─────────────────────────────────────────────────── + # Odkomentuj linię zgodną z fizycznym adresem modułu skonfigurowanego jako INPUT. + # + # 'packages/main_hub/mcp23017/inputs/0x20.yaml', # A2=0 A1=0 A0=0 + # 'packages/main_hub/mcp23017/inputs/0x21.yaml', # A2=0 A1=0 A0=1 + # 'packages/main_hub/mcp23017/inputs/0x22.yaml', # A2=0 A1=1 A0=0 + # 'packages/main_hub/mcp23017/inputs/0x23.yaml', # A2=0 A1=1 A0=1 + # 'packages/main_hub/mcp23017/inputs/0x24.yaml', # A2=1 A1=0 A0=0 + # 'packages/main_hub/mcp23017/inputs/0x25.yaml', # A2=1 A1=0 A0=1 + # 'packages/main_hub/mcp23017/inputs/0x26.yaml', # A2=1 A1=1 A0=0 + # 'packages/main_hub/mcp23017/inputs/0x27.yaml', # A2=1 A1=1 A0=1 + + ] + +esp32_ble_tracker: + +sensor: + - platform: uptime + type: seconds + name: Uptime Sensor + - platform: atc_mithermometer + mac_address: "A4:C1:38:C5:11:58" + temperature: + name: "Biuro Temperatura" + humidity: + name: "Biuro Nawilzenie" + battery_level: + name: "Biuro Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:5C:4F:38" + temperature: + name: "Serwer Temperatura" + humidity: + name: "Serwer Nawilzenie" + battery_level: + name: "Serwer Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:67:6B:94" + temperature: + name: "Kuchnia Temperatura" + humidity: + name: "Kuchnia Nawilzenie" + battery_level: + name: "Kuchnia Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:C9:FE:CA" + temperature: + name: "WC Temperatura" + humidity: + name: "WC Nawilzenie" + battery_level: + name: "WC Bateria" + - platform: atc_mithermometer + mac_address: "A4:C1:38:63:6D:DB" + temperature: + name: "Lazienka Temperatura" + humidity: + name: "Lazienka Nawilzenie" + battery_level: + name: "Lazienka Bateria" \ No newline at end of file diff --git a/packages/main_hub/i2c.yaml b/packages/main_hub/i2c.yaml new file mode 100644 index 0000000..5cd2925 --- /dev/null +++ b/packages/main_hub/i2c.yaml @@ -0,0 +1,5 @@ +i2c: + sda: 13 + scl: 16 + scan: True + frequency: 200kHz diff --git a/packages/main_hub/mcp23017/inputs/0x20.yaml b/packages/main_hub/mcp23017/inputs/0x20.yaml new file mode 100644 index 0000000..befeaba --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x20.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x20" + address: 0x20 diff --git a/packages/main_hub/mcp23017/inputs/0x21.yaml b/packages/main_hub/mcp23017/inputs/0x21.yaml new file mode 100644 index 0000000..17ef297 --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x21.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x21" + address: 0x21 diff --git a/packages/main_hub/mcp23017/inputs/0x22.yaml b/packages/main_hub/mcp23017/inputs/0x22.yaml new file mode 100644 index 0000000..573c680 --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x22.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x22" + address: 0x22 diff --git a/packages/main_hub/mcp23017/inputs/0x23.yaml b/packages/main_hub/mcp23017/inputs/0x23.yaml new file mode 100644 index 0000000..f579e0d --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x23.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x23" + address: 0x23 diff --git a/packages/main_hub/mcp23017/inputs/0x24.yaml b/packages/main_hub/mcp23017/inputs/0x24.yaml new file mode 100644 index 0000000..8d47fef --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x24.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x24" + address: 0x24 diff --git a/packages/main_hub/mcp23017/inputs/0x25.yaml b/packages/main_hub/mcp23017/inputs/0x25.yaml new file mode 100644 index 0000000..188d1ac --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x25.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x25" + address: 0x25 diff --git a/packages/main_hub/mcp23017/inputs/0x26.yaml b/packages/main_hub/mcp23017/inputs/0x26.yaml new file mode 100644 index 0000000..5a04ba9 --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x26.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x26" + address: 0x26 diff --git a/packages/main_hub/mcp23017/inputs/0x27.yaml b/packages/main_hub/mcp23017/inputs/0x27.yaml new file mode 100644 index 0000000..21afd8d --- /dev/null +++ b/packages/main_hub/mcp23017/inputs/0x27.yaml @@ -0,0 +1,3 @@ +mcp23017: + - id: "mcp23xxx_0x27" + address: 0x27 diff --git a/packages/main_hub/mcp23017/outputs/0x20.yaml b/packages/main_hub/mcp23017/outputs/0x20.yaml new file mode 100644 index 0000000..ac95424 --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x20.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x20_out" + address: 0x20 + +output: + - platform: gpio + id: mcp_0x20_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x20_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x20_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x20_out0" + id: mcp_0x20_out0 + output: mcp_0x20_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out1" + id: mcp_0x20_out1 + output: mcp_0x20_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out2" + id: mcp_0x20_out2 + output: mcp_0x20_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out3" + id: mcp_0x20_out3 + output: mcp_0x20_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out4" + id: mcp_0x20_out4 + output: mcp_0x20_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out5" + id: mcp_0x20_out5 + output: mcp_0x20_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out6" + id: mcp_0x20_out6 + output: mcp_0x20_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out7" + id: mcp_0x20_out7 + output: mcp_0x20_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out8" + id: mcp_0x20_out8 + output: mcp_0x20_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out9" + id: mcp_0x20_out9 + output: mcp_0x20_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out10" + id: mcp_0x20_out10 + output: mcp_0x20_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out11" + id: mcp_0x20_out11 + output: mcp_0x20_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out12" + id: mcp_0x20_out12 + output: mcp_0x20_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out13" + id: mcp_0x20_out13 + output: mcp_0x20_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out14" + id: mcp_0x20_out14 + output: mcp_0x20_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x20_out15" + id: mcp_0x20_out15 + output: mcp_0x20_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/mcp23017/outputs/0x21.yaml b/packages/main_hub/mcp23017/outputs/0x21.yaml new file mode 100644 index 0000000..78a9b16 --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x21.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x21_out" + address: 0x21 + +output: + - platform: gpio + id: mcp_0x21_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x21_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x21_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x21_out0" + id: mcp_0x21_out0 + output: mcp_0x21_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out1" + id: mcp_0x21_out1 + output: mcp_0x21_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out2" + id: mcp_0x21_out2 + output: mcp_0x21_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out3" + id: mcp_0x21_out3 + output: mcp_0x21_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out4" + id: mcp_0x21_out4 + output: mcp_0x21_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out5" + id: mcp_0x21_out5 + output: mcp_0x21_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out6" + id: mcp_0x21_out6 + output: mcp_0x21_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out7" + id: mcp_0x21_out7 + output: mcp_0x21_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out8" + id: mcp_0x21_out8 + output: mcp_0x21_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out9" + id: mcp_0x21_out9 + output: mcp_0x21_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out10" + id: mcp_0x21_out10 + output: mcp_0x21_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out11" + id: mcp_0x21_out11 + output: mcp_0x21_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out12" + id: mcp_0x21_out12 + output: mcp_0x21_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out13" + id: mcp_0x21_out13 + output: mcp_0x21_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out14" + id: mcp_0x21_out14 + output: mcp_0x21_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x21_out15" + id: mcp_0x21_out15 + output: mcp_0x21_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/mcp23017/outputs/0x22.yaml b/packages/main_hub/mcp23017/outputs/0x22.yaml new file mode 100644 index 0000000..707351b --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x22.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x22_out" + address: 0x22 + +output: + - platform: gpio + id: mcp_0x22_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x22_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x22_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x22_out0" + id: mcp_0x22_out0 + output: mcp_0x22_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out1" + id: mcp_0x22_out1 + output: mcp_0x22_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out2" + id: mcp_0x22_out2 + output: mcp_0x22_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out3" + id: mcp_0x22_out3 + output: mcp_0x22_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out4" + id: mcp_0x22_out4 + output: mcp_0x22_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out5" + id: mcp_0x22_out5 + output: mcp_0x22_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out6" + id: mcp_0x22_out6 + output: mcp_0x22_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out7" + id: mcp_0x22_out7 + output: mcp_0x22_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out8" + id: mcp_0x22_out8 + output: mcp_0x22_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out9" + id: mcp_0x22_out9 + output: mcp_0x22_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out10" + id: mcp_0x22_out10 + output: mcp_0x22_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out11" + id: mcp_0x22_out11 + output: mcp_0x22_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out12" + id: mcp_0x22_out12 + output: mcp_0x22_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out13" + id: mcp_0x22_out13 + output: mcp_0x22_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out14" + id: mcp_0x22_out14 + output: mcp_0x22_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x22_out15" + id: mcp_0x22_out15 + output: mcp_0x22_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/mcp23017/outputs/0x23.yaml b/packages/main_hub/mcp23017/outputs/0x23.yaml new file mode 100644 index 0000000..2771aea --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x23.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x23_out" + address: 0x23 + +output: + - platform: gpio + id: mcp_0x23_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x23_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x23_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x23_out0" + id: mcp_0x23_out0 + output: mcp_0x23_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out1" + id: mcp_0x23_out1 + output: mcp_0x23_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out2" + id: mcp_0x23_out2 + output: mcp_0x23_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out3" + id: mcp_0x23_out3 + output: mcp_0x23_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out4" + id: mcp_0x23_out4 + output: mcp_0x23_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out5" + id: mcp_0x23_out5 + output: mcp_0x23_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out6" + id: mcp_0x23_out6 + output: mcp_0x23_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out7" + id: mcp_0x23_out7 + output: mcp_0x23_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out8" + id: mcp_0x23_out8 + output: mcp_0x23_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out9" + id: mcp_0x23_out9 + output: mcp_0x23_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out10" + id: mcp_0x23_out10 + output: mcp_0x23_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out11" + id: mcp_0x23_out11 + output: mcp_0x23_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out12" + id: mcp_0x23_out12 + output: mcp_0x23_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out13" + id: mcp_0x23_out13 + output: mcp_0x23_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out14" + id: mcp_0x23_out14 + output: mcp_0x23_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x23_out15" + id: mcp_0x23_out15 + output: mcp_0x23_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/mcp23017/outputs/0x24.yaml b/packages/main_hub/mcp23017/outputs/0x24.yaml new file mode 100644 index 0000000..fa893d9 --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x24.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x24_out" + address: 0x24 + +output: + - platform: gpio + id: mcp_0x24_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x24_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x24_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x24_out0" + id: mcp_0x24_out0 + output: mcp_0x24_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out1" + id: mcp_0x24_out1 + output: mcp_0x24_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out2" + id: mcp_0x24_out2 + output: mcp_0x24_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out3" + id: mcp_0x24_out3 + output: mcp_0x24_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out4" + id: mcp_0x24_out4 + output: mcp_0x24_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out5" + id: mcp_0x24_out5 + output: mcp_0x24_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out6" + id: mcp_0x24_out6 + output: mcp_0x24_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out7" + id: mcp_0x24_out7 + output: mcp_0x24_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out8" + id: mcp_0x24_out8 + output: mcp_0x24_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out9" + id: mcp_0x24_out9 + output: mcp_0x24_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out10" + id: mcp_0x24_out10 + output: mcp_0x24_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out11" + id: mcp_0x24_out11 + output: mcp_0x24_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out12" + id: mcp_0x24_out12 + output: mcp_0x24_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out13" + id: mcp_0x24_out13 + output: mcp_0x24_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out14" + id: mcp_0x24_out14 + output: mcp_0x24_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x24_out15" + id: mcp_0x24_out15 + output: mcp_0x24_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/mcp23017/outputs/0x25.yaml b/packages/main_hub/mcp23017/outputs/0x25.yaml new file mode 100644 index 0000000..df42735 --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x25.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x25_out" + address: 0x25 + +output: + - platform: gpio + id: mcp_0x25_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x25_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x25_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x25_out0" + id: mcp_0x25_out0 + output: mcp_0x25_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out1" + id: mcp_0x25_out1 + output: mcp_0x25_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out2" + id: mcp_0x25_out2 + output: mcp_0x25_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out3" + id: mcp_0x25_out3 + output: mcp_0x25_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out4" + id: mcp_0x25_out4 + output: mcp_0x25_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out5" + id: mcp_0x25_out5 + output: mcp_0x25_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out6" + id: mcp_0x25_out6 + output: mcp_0x25_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out7" + id: mcp_0x25_out7 + output: mcp_0x25_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out8" + id: mcp_0x25_out8 + output: mcp_0x25_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out9" + id: mcp_0x25_out9 + output: mcp_0x25_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out10" + id: mcp_0x25_out10 + output: mcp_0x25_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out11" + id: mcp_0x25_out11 + output: mcp_0x25_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out12" + id: mcp_0x25_out12 + output: mcp_0x25_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out13" + id: mcp_0x25_out13 + output: mcp_0x25_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out14" + id: mcp_0x25_out14 + output: mcp_0x25_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x25_out15" + id: mcp_0x25_out15 + output: mcp_0x25_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/mcp23017/outputs/0x26.yaml b/packages/main_hub/mcp23017/outputs/0x26.yaml new file mode 100644 index 0000000..aca8683 --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x26.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x26_out" + address: 0x26 + +output: + - platform: gpio + id: mcp_0x26_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x26_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x26_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x26_out0" + id: mcp_0x26_out0 + output: mcp_0x26_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out1" + id: mcp_0x26_out1 + output: mcp_0x26_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out2" + id: mcp_0x26_out2 + output: mcp_0x26_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out3" + id: mcp_0x26_out3 + output: mcp_0x26_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out4" + id: mcp_0x26_out4 + output: mcp_0x26_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out5" + id: mcp_0x26_out5 + output: mcp_0x26_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out6" + id: mcp_0x26_out6 + output: mcp_0x26_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out7" + id: mcp_0x26_out7 + output: mcp_0x26_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out8" + id: mcp_0x26_out8 + output: mcp_0x26_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out9" + id: mcp_0x26_out9 + output: mcp_0x26_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out10" + id: mcp_0x26_out10 + output: mcp_0x26_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out11" + id: mcp_0x26_out11 + output: mcp_0x26_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out12" + id: mcp_0x26_out12 + output: mcp_0x26_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out13" + id: mcp_0x26_out13 + output: mcp_0x26_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out14" + id: mcp_0x26_out14 + output: mcp_0x26_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x26_out15" + id: mcp_0x26_out15 + output: mcp_0x26_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/mcp23017/outputs/0x27.yaml b/packages/main_hub/mcp23017/outputs/0x27.yaml new file mode 100644 index 0000000..7e3fe61 --- /dev/null +++ b/packages/main_hub/mcp23017/outputs/0x27.yaml @@ -0,0 +1,151 @@ +mcp23017: + - id: "mcp23xxx_0x27_out" + address: 0x27 + +output: + - platform: gpio + id: mcp_0x27_out0_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 0, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out1_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 1, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out2_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 2, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out3_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 3, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out4_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 4, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out5_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 5, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out6_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 6, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out7_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 7, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out8_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 8, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out9_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 9, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out10_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 10, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out11_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 11, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out12_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 12, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out13_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 13, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out14_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 14, mode: OUTPUT, inverted: False} + - platform: gpio + id: mcp_0x27_out15_gpio + pin: {mcp23xxx: mcp23xxx_0x27_out, number: 15, mode: OUTPUT, inverted: False} + +light: + - platform: binary + name: "mcp_0x27_out0" + id: mcp_0x27_out0 + output: mcp_0x27_out0_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out1" + id: mcp_0x27_out1 + output: mcp_0x27_out1_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out2" + id: mcp_0x27_out2 + output: mcp_0x27_out2_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out3" + id: mcp_0x27_out3 + output: mcp_0x27_out3_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out4" + id: mcp_0x27_out4 + output: mcp_0x27_out4_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out5" + id: mcp_0x27_out5 + output: mcp_0x27_out5_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out6" + id: mcp_0x27_out6 + output: mcp_0x27_out6_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out7" + id: mcp_0x27_out7 + output: mcp_0x27_out7_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out8" + id: mcp_0x27_out8 + output: mcp_0x27_out8_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out9" + id: mcp_0x27_out9 + output: mcp_0x27_out9_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out10" + id: mcp_0x27_out10 + output: mcp_0x27_out10_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out11" + id: mcp_0x27_out11 + output: mcp_0x27_out11_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out12" + id: mcp_0x27_out12 + output: mcp_0x27_out12_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out13" + id: mcp_0x27_out13 + output: mcp_0x27_out13_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out14" + id: mcp_0x27_out14 + output: mcp_0x27_out14_gpio + restore_mode: ALWAYS_OFF + + - platform: binary + name: "mcp_0x27_out15" + id: mcp_0x27_out15 + output: mcp_0x27_out15_gpio + restore_mode: ALWAYS_OFF + diff --git a/packages/main_hub/pca9685/0x40.yaml b/packages/main_hub/pca9685/0x40.yaml new file mode 100644 index 0000000..6583017 --- /dev/null +++ b/packages/main_hub/pca9685/0x40.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x40 + id: "pca9685_0x40" + +output: + - platform: pca9685 + id: pca_0x40_ch0 + pca9685_id: 'pca9685_0x40' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch1 + pca9685_id: 'pca9685_0x40' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch2 + pca9685_id: 'pca9685_0x40' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch3 + pca9685_id: 'pca9685_0x40' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch4 + pca9685_id: 'pca9685_0x40' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch5 + pca9685_id: 'pca9685_0x40' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch6 + pca9685_id: 'pca9685_0x40' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch7 + pca9685_id: 'pca9685_0x40' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch8 + pca9685_id: 'pca9685_0x40' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch9 + pca9685_id: 'pca9685_0x40' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch10 + pca9685_id: 'pca9685_0x40' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch11 + pca9685_id: 'pca9685_0x40' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch12 + pca9685_id: 'pca9685_0x40' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch13 + pca9685_id: 'pca9685_0x40' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch14 + pca9685_id: 'pca9685_0x40' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x40_ch15 + pca9685_id: 'pca9685_0x40' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x41.yaml b/packages/main_hub/pca9685/0x41.yaml new file mode 100644 index 0000000..55d7084 --- /dev/null +++ b/packages/main_hub/pca9685/0x41.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x41 + id: "pca9685_0x41" + +output: + - platform: pca9685 + id: pca_0x41_ch0 + pca9685_id: 'pca9685_0x41' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch1 + pca9685_id: 'pca9685_0x41' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch2 + pca9685_id: 'pca9685_0x41' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch3 + pca9685_id: 'pca9685_0x41' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch4 + pca9685_id: 'pca9685_0x41' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch5 + pca9685_id: 'pca9685_0x41' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch6 + pca9685_id: 'pca9685_0x41' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch7 + pca9685_id: 'pca9685_0x41' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch8 + pca9685_id: 'pca9685_0x41' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch9 + pca9685_id: 'pca9685_0x41' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch10 + pca9685_id: 'pca9685_0x41' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch11 + pca9685_id: 'pca9685_0x41' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch12 + pca9685_id: 'pca9685_0x41' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch13 + pca9685_id: 'pca9685_0x41' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch14 + pca9685_id: 'pca9685_0x41' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x41_ch15 + pca9685_id: 'pca9685_0x41' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x42.yaml b/packages/main_hub/pca9685/0x42.yaml new file mode 100644 index 0000000..c41d05b --- /dev/null +++ b/packages/main_hub/pca9685/0x42.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x42 + id: "pca9685_0x42" + +output: + - platform: pca9685 + id: pca_0x42_ch0 + pca9685_id: 'pca9685_0x42' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch1 + pca9685_id: 'pca9685_0x42' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch2 + pca9685_id: 'pca9685_0x42' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch3 + pca9685_id: 'pca9685_0x42' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch4 + pca9685_id: 'pca9685_0x42' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch5 + pca9685_id: 'pca9685_0x42' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch6 + pca9685_id: 'pca9685_0x42' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch7 + pca9685_id: 'pca9685_0x42' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch8 + pca9685_id: 'pca9685_0x42' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch9 + pca9685_id: 'pca9685_0x42' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch10 + pca9685_id: 'pca9685_0x42' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch11 + pca9685_id: 'pca9685_0x42' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch12 + pca9685_id: 'pca9685_0x42' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch13 + pca9685_id: 'pca9685_0x42' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch14 + pca9685_id: 'pca9685_0x42' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x42_ch15 + pca9685_id: 'pca9685_0x42' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x43.yaml b/packages/main_hub/pca9685/0x43.yaml new file mode 100644 index 0000000..b1ec5e8 --- /dev/null +++ b/packages/main_hub/pca9685/0x43.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x43 + id: "pca9685_0x43" + +output: + - platform: pca9685 + id: pca_0x43_ch0 + pca9685_id: 'pca9685_0x43' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch1 + pca9685_id: 'pca9685_0x43' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch2 + pca9685_id: 'pca9685_0x43' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch3 + pca9685_id: 'pca9685_0x43' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch4 + pca9685_id: 'pca9685_0x43' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch5 + pca9685_id: 'pca9685_0x43' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch6 + pca9685_id: 'pca9685_0x43' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch7 + pca9685_id: 'pca9685_0x43' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch8 + pca9685_id: 'pca9685_0x43' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch9 + pca9685_id: 'pca9685_0x43' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch10 + pca9685_id: 'pca9685_0x43' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch11 + pca9685_id: 'pca9685_0x43' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch12 + pca9685_id: 'pca9685_0x43' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch13 + pca9685_id: 'pca9685_0x43' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch14 + pca9685_id: 'pca9685_0x43' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x43_ch15 + pca9685_id: 'pca9685_0x43' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x44.yaml b/packages/main_hub/pca9685/0x44.yaml new file mode 100644 index 0000000..6193105 --- /dev/null +++ b/packages/main_hub/pca9685/0x44.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x44 + id: "pca9685_0x44" + +output: + - platform: pca9685 + id: pca_0x44_ch0 + pca9685_id: 'pca9685_0x44' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch1 + pca9685_id: 'pca9685_0x44' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch2 + pca9685_id: 'pca9685_0x44' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch3 + pca9685_id: 'pca9685_0x44' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch4 + pca9685_id: 'pca9685_0x44' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch5 + pca9685_id: 'pca9685_0x44' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch6 + pca9685_id: 'pca9685_0x44' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch7 + pca9685_id: 'pca9685_0x44' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch8 + pca9685_id: 'pca9685_0x44' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch9 + pca9685_id: 'pca9685_0x44' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch10 + pca9685_id: 'pca9685_0x44' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch11 + pca9685_id: 'pca9685_0x44' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch12 + pca9685_id: 'pca9685_0x44' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch13 + pca9685_id: 'pca9685_0x44' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch14 + pca9685_id: 'pca9685_0x44' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x44_ch15 + pca9685_id: 'pca9685_0x44' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x45.yaml b/packages/main_hub/pca9685/0x45.yaml new file mode 100644 index 0000000..ccc69ab --- /dev/null +++ b/packages/main_hub/pca9685/0x45.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x45 + id: "pca9685_0x45" + +output: + - platform: pca9685 + id: pca_0x45_ch0 + pca9685_id: 'pca9685_0x45' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch1 + pca9685_id: 'pca9685_0x45' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch2 + pca9685_id: 'pca9685_0x45' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch3 + pca9685_id: 'pca9685_0x45' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch4 + pca9685_id: 'pca9685_0x45' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch5 + pca9685_id: 'pca9685_0x45' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch6 + pca9685_id: 'pca9685_0x45' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch7 + pca9685_id: 'pca9685_0x45' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch8 + pca9685_id: 'pca9685_0x45' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch9 + pca9685_id: 'pca9685_0x45' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch10 + pca9685_id: 'pca9685_0x45' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch11 + pca9685_id: 'pca9685_0x45' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch12 + pca9685_id: 'pca9685_0x45' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch13 + pca9685_id: 'pca9685_0x45' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch14 + pca9685_id: 'pca9685_0x45' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x45_ch15 + pca9685_id: 'pca9685_0x45' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x46.yaml b/packages/main_hub/pca9685/0x46.yaml new file mode 100644 index 0000000..dda1ff9 --- /dev/null +++ b/packages/main_hub/pca9685/0x46.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x46 + id: "pca9685_0x46" + +output: + - platform: pca9685 + id: pca_0x46_ch0 + pca9685_id: 'pca9685_0x46' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch1 + pca9685_id: 'pca9685_0x46' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch2 + pca9685_id: 'pca9685_0x46' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch3 + pca9685_id: 'pca9685_0x46' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch4 + pca9685_id: 'pca9685_0x46' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch5 + pca9685_id: 'pca9685_0x46' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch6 + pca9685_id: 'pca9685_0x46' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch7 + pca9685_id: 'pca9685_0x46' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch8 + pca9685_id: 'pca9685_0x46' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch9 + pca9685_id: 'pca9685_0x46' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch10 + pca9685_id: 'pca9685_0x46' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch11 + pca9685_id: 'pca9685_0x46' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch12 + pca9685_id: 'pca9685_0x46' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch13 + pca9685_id: 'pca9685_0x46' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch14 + pca9685_id: 'pca9685_0x46' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x46_ch15 + pca9685_id: 'pca9685_0x46' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x47.yaml b/packages/main_hub/pca9685/0x47.yaml new file mode 100644 index 0000000..e8fef98 --- /dev/null +++ b/packages/main_hub/pca9685/0x47.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x47 + id: "pca9685_0x47" + +output: + - platform: pca9685 + id: pca_0x47_ch0 + pca9685_id: 'pca9685_0x47' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch1 + pca9685_id: 'pca9685_0x47' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch2 + pca9685_id: 'pca9685_0x47' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch3 + pca9685_id: 'pca9685_0x47' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch4 + pca9685_id: 'pca9685_0x47' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch5 + pca9685_id: 'pca9685_0x47' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch6 + pca9685_id: 'pca9685_0x47' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch7 + pca9685_id: 'pca9685_0x47' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch8 + pca9685_id: 'pca9685_0x47' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch9 + pca9685_id: 'pca9685_0x47' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch10 + pca9685_id: 'pca9685_0x47' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch11 + pca9685_id: 'pca9685_0x47' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch12 + pca9685_id: 'pca9685_0x47' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch13 + pca9685_id: 'pca9685_0x47' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch14 + pca9685_id: 'pca9685_0x47' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x47_ch15 + pca9685_id: 'pca9685_0x47' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x48.yaml b/packages/main_hub/pca9685/0x48.yaml new file mode 100644 index 0000000..819e6c9 --- /dev/null +++ b/packages/main_hub/pca9685/0x48.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x48 + id: "pca9685_0x48" + +output: + - platform: pca9685 + id: pca_0x48_ch0 + pca9685_id: 'pca9685_0x48' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch1 + pca9685_id: 'pca9685_0x48' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch2 + pca9685_id: 'pca9685_0x48' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch3 + pca9685_id: 'pca9685_0x48' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch4 + pca9685_id: 'pca9685_0x48' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch5 + pca9685_id: 'pca9685_0x48' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch6 + pca9685_id: 'pca9685_0x48' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch7 + pca9685_id: 'pca9685_0x48' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch8 + pca9685_id: 'pca9685_0x48' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch9 + pca9685_id: 'pca9685_0x48' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch10 + pca9685_id: 'pca9685_0x48' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch11 + pca9685_id: 'pca9685_0x48' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch12 + pca9685_id: 'pca9685_0x48' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch13 + pca9685_id: 'pca9685_0x48' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch14 + pca9685_id: 'pca9685_0x48' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x48_ch15 + pca9685_id: 'pca9685_0x48' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x49.yaml b/packages/main_hub/pca9685/0x49.yaml new file mode 100644 index 0000000..d28add4 --- /dev/null +++ b/packages/main_hub/pca9685/0x49.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x49 + id: "pca9685_0x49" + +output: + - platform: pca9685 + id: pca_0x49_ch0 + pca9685_id: 'pca9685_0x49' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch1 + pca9685_id: 'pca9685_0x49' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch2 + pca9685_id: 'pca9685_0x49' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch3 + pca9685_id: 'pca9685_0x49' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch4 + pca9685_id: 'pca9685_0x49' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch5 + pca9685_id: 'pca9685_0x49' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch6 + pca9685_id: 'pca9685_0x49' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch7 + pca9685_id: 'pca9685_0x49' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch8 + pca9685_id: 'pca9685_0x49' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch9 + pca9685_id: 'pca9685_0x49' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch10 + pca9685_id: 'pca9685_0x49' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch11 + pca9685_id: 'pca9685_0x49' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch12 + pca9685_id: 'pca9685_0x49' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch13 + pca9685_id: 'pca9685_0x49' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch14 + pca9685_id: 'pca9685_0x49' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x49_ch15 + pca9685_id: 'pca9685_0x49' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x4a.yaml b/packages/main_hub/pca9685/0x4a.yaml new file mode 100644 index 0000000..bba9ea0 --- /dev/null +++ b/packages/main_hub/pca9685/0x4a.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x4A + id: "pca9685_0x4a" + +output: + - platform: pca9685 + id: pca_0x4a_ch0 + pca9685_id: 'pca9685_0x4a' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch1 + pca9685_id: 'pca9685_0x4a' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch2 + pca9685_id: 'pca9685_0x4a' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch3 + pca9685_id: 'pca9685_0x4a' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch4 + pca9685_id: 'pca9685_0x4a' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch5 + pca9685_id: 'pca9685_0x4a' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch6 + pca9685_id: 'pca9685_0x4a' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch7 + pca9685_id: 'pca9685_0x4a' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch8 + pca9685_id: 'pca9685_0x4a' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch9 + pca9685_id: 'pca9685_0x4a' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch10 + pca9685_id: 'pca9685_0x4a' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch11 + pca9685_id: 'pca9685_0x4a' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch12 + pca9685_id: 'pca9685_0x4a' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch13 + pca9685_id: 'pca9685_0x4a' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch14 + pca9685_id: 'pca9685_0x4a' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x4a_ch15 + pca9685_id: 'pca9685_0x4a' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x4b.yaml b/packages/main_hub/pca9685/0x4b.yaml new file mode 100644 index 0000000..aea13f0 --- /dev/null +++ b/packages/main_hub/pca9685/0x4b.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x4B + id: "pca9685_0x4b" + +output: + - platform: pca9685 + id: pca_0x4b_ch0 + pca9685_id: 'pca9685_0x4b' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch1 + pca9685_id: 'pca9685_0x4b' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch2 + pca9685_id: 'pca9685_0x4b' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch3 + pca9685_id: 'pca9685_0x4b' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch4 + pca9685_id: 'pca9685_0x4b' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch5 + pca9685_id: 'pca9685_0x4b' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch6 + pca9685_id: 'pca9685_0x4b' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch7 + pca9685_id: 'pca9685_0x4b' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch8 + pca9685_id: 'pca9685_0x4b' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch9 + pca9685_id: 'pca9685_0x4b' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch10 + pca9685_id: 'pca9685_0x4b' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch11 + pca9685_id: 'pca9685_0x4b' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch12 + pca9685_id: 'pca9685_0x4b' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch13 + pca9685_id: 'pca9685_0x4b' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch14 + pca9685_id: 'pca9685_0x4b' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x4b_ch15 + pca9685_id: 'pca9685_0x4b' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x4c.yaml b/packages/main_hub/pca9685/0x4c.yaml new file mode 100644 index 0000000..775e449 --- /dev/null +++ b/packages/main_hub/pca9685/0x4c.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x4C + id: "pca9685_0x4c" + +output: + - platform: pca9685 + id: pca_0x4c_ch0 + pca9685_id: 'pca9685_0x4c' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch1 + pca9685_id: 'pca9685_0x4c' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch2 + pca9685_id: 'pca9685_0x4c' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch3 + pca9685_id: 'pca9685_0x4c' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch4 + pca9685_id: 'pca9685_0x4c' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch5 + pca9685_id: 'pca9685_0x4c' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch6 + pca9685_id: 'pca9685_0x4c' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch7 + pca9685_id: 'pca9685_0x4c' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch8 + pca9685_id: 'pca9685_0x4c' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch9 + pca9685_id: 'pca9685_0x4c' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch10 + pca9685_id: 'pca9685_0x4c' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch11 + pca9685_id: 'pca9685_0x4c' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch12 + pca9685_id: 'pca9685_0x4c' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch13 + pca9685_id: 'pca9685_0x4c' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch14 + pca9685_id: 'pca9685_0x4c' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x4c_ch15 + pca9685_id: 'pca9685_0x4c' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x4d.yaml b/packages/main_hub/pca9685/0x4d.yaml new file mode 100644 index 0000000..440e80d --- /dev/null +++ b/packages/main_hub/pca9685/0x4d.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x4D + id: "pca9685_0x4d" + +output: + - platform: pca9685 + id: pca_0x4d_ch0 + pca9685_id: 'pca9685_0x4d' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch1 + pca9685_id: 'pca9685_0x4d' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch2 + pca9685_id: 'pca9685_0x4d' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch3 + pca9685_id: 'pca9685_0x4d' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch4 + pca9685_id: 'pca9685_0x4d' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch5 + pca9685_id: 'pca9685_0x4d' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch6 + pca9685_id: 'pca9685_0x4d' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch7 + pca9685_id: 'pca9685_0x4d' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch8 + pca9685_id: 'pca9685_0x4d' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch9 + pca9685_id: 'pca9685_0x4d' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch10 + pca9685_id: 'pca9685_0x4d' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch11 + pca9685_id: 'pca9685_0x4d' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch12 + pca9685_id: 'pca9685_0x4d' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch13 + pca9685_id: 'pca9685_0x4d' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch14 + pca9685_id: 'pca9685_0x4d' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x4d_ch15 + pca9685_id: 'pca9685_0x4d' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x4e.yaml b/packages/main_hub/pca9685/0x4e.yaml new file mode 100644 index 0000000..228ad89 --- /dev/null +++ b/packages/main_hub/pca9685/0x4e.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x4E + id: "pca9685_0x4e" + +output: + - platform: pca9685 + id: pca_0x4e_ch0 + pca9685_id: 'pca9685_0x4e' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch1 + pca9685_id: 'pca9685_0x4e' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch2 + pca9685_id: 'pca9685_0x4e' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch3 + pca9685_id: 'pca9685_0x4e' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch4 + pca9685_id: 'pca9685_0x4e' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch5 + pca9685_id: 'pca9685_0x4e' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch6 + pca9685_id: 'pca9685_0x4e' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch7 + pca9685_id: 'pca9685_0x4e' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch8 + pca9685_id: 'pca9685_0x4e' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch9 + pca9685_id: 'pca9685_0x4e' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch10 + pca9685_id: 'pca9685_0x4e' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch11 + pca9685_id: 'pca9685_0x4e' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch12 + pca9685_id: 'pca9685_0x4e' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch13 + pca9685_id: 'pca9685_0x4e' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch14 + pca9685_id: 'pca9685_0x4e' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x4e_ch15 + pca9685_id: 'pca9685_0x4e' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x4f.yaml b/packages/main_hub/pca9685/0x4f.yaml new file mode 100644 index 0000000..a101d97 --- /dev/null +++ b/packages/main_hub/pca9685/0x4f.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x4F + id: "pca9685_0x4f" + +output: + - platform: pca9685 + id: pca_0x4f_ch0 + pca9685_id: 'pca9685_0x4f' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch1 + pca9685_id: 'pca9685_0x4f' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch2 + pca9685_id: 'pca9685_0x4f' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch3 + pca9685_id: 'pca9685_0x4f' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch4 + pca9685_id: 'pca9685_0x4f' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch5 + pca9685_id: 'pca9685_0x4f' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch6 + pca9685_id: 'pca9685_0x4f' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch7 + pca9685_id: 'pca9685_0x4f' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch8 + pca9685_id: 'pca9685_0x4f' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch9 + pca9685_id: 'pca9685_0x4f' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch10 + pca9685_id: 'pca9685_0x4f' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch11 + pca9685_id: 'pca9685_0x4f' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch12 + pca9685_id: 'pca9685_0x4f' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch13 + pca9685_id: 'pca9685_0x4f' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch14 + pca9685_id: 'pca9685_0x4f' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x4f_ch15 + pca9685_id: 'pca9685_0x4f' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x50.yaml b/packages/main_hub/pca9685/0x50.yaml new file mode 100644 index 0000000..8e8ee6a --- /dev/null +++ b/packages/main_hub/pca9685/0x50.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x50 + id: "pca9685_0x50" + +output: + - platform: pca9685 + id: pca_0x50_ch0 + pca9685_id: 'pca9685_0x50' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch1 + pca9685_id: 'pca9685_0x50' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch2 + pca9685_id: 'pca9685_0x50' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch3 + pca9685_id: 'pca9685_0x50' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch4 + pca9685_id: 'pca9685_0x50' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch5 + pca9685_id: 'pca9685_0x50' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch6 + pca9685_id: 'pca9685_0x50' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch7 + pca9685_id: 'pca9685_0x50' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch8 + pca9685_id: 'pca9685_0x50' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch9 + pca9685_id: 'pca9685_0x50' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch10 + pca9685_id: 'pca9685_0x50' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch11 + pca9685_id: 'pca9685_0x50' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch12 + pca9685_id: 'pca9685_0x50' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch13 + pca9685_id: 'pca9685_0x50' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch14 + pca9685_id: 'pca9685_0x50' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x50_ch15 + pca9685_id: 'pca9685_0x50' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x51.yaml b/packages/main_hub/pca9685/0x51.yaml new file mode 100644 index 0000000..8390d46 --- /dev/null +++ b/packages/main_hub/pca9685/0x51.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x51 + id: "pca9685_0x51" + +output: + - platform: pca9685 + id: pca_0x51_ch0 + pca9685_id: 'pca9685_0x51' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch1 + pca9685_id: 'pca9685_0x51' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch2 + pca9685_id: 'pca9685_0x51' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch3 + pca9685_id: 'pca9685_0x51' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch4 + pca9685_id: 'pca9685_0x51' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch5 + pca9685_id: 'pca9685_0x51' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch6 + pca9685_id: 'pca9685_0x51' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch7 + pca9685_id: 'pca9685_0x51' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch8 + pca9685_id: 'pca9685_0x51' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch9 + pca9685_id: 'pca9685_0x51' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch10 + pca9685_id: 'pca9685_0x51' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch11 + pca9685_id: 'pca9685_0x51' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch12 + pca9685_id: 'pca9685_0x51' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch13 + pca9685_id: 'pca9685_0x51' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch14 + pca9685_id: 'pca9685_0x51' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x51_ch15 + pca9685_id: 'pca9685_0x51' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x52.yaml b/packages/main_hub/pca9685/0x52.yaml new file mode 100644 index 0000000..8f30527 --- /dev/null +++ b/packages/main_hub/pca9685/0x52.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x52 + id: "pca9685_0x52" + +output: + - platform: pca9685 + id: pca_0x52_ch0 + pca9685_id: 'pca9685_0x52' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch1 + pca9685_id: 'pca9685_0x52' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch2 + pca9685_id: 'pca9685_0x52' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch3 + pca9685_id: 'pca9685_0x52' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch4 + pca9685_id: 'pca9685_0x52' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch5 + pca9685_id: 'pca9685_0x52' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch6 + pca9685_id: 'pca9685_0x52' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch7 + pca9685_id: 'pca9685_0x52' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch8 + pca9685_id: 'pca9685_0x52' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch9 + pca9685_id: 'pca9685_0x52' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch10 + pca9685_id: 'pca9685_0x52' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch11 + pca9685_id: 'pca9685_0x52' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch12 + pca9685_id: 'pca9685_0x52' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch13 + pca9685_id: 'pca9685_0x52' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch14 + pca9685_id: 'pca9685_0x52' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x52_ch15 + pca9685_id: 'pca9685_0x52' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x53.yaml b/packages/main_hub/pca9685/0x53.yaml new file mode 100644 index 0000000..2970a3a --- /dev/null +++ b/packages/main_hub/pca9685/0x53.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x53 + id: "pca9685_0x53" + +output: + - platform: pca9685 + id: pca_0x53_ch0 + pca9685_id: 'pca9685_0x53' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch1 + pca9685_id: 'pca9685_0x53' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch2 + pca9685_id: 'pca9685_0x53' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch3 + pca9685_id: 'pca9685_0x53' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch4 + pca9685_id: 'pca9685_0x53' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch5 + pca9685_id: 'pca9685_0x53' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch6 + pca9685_id: 'pca9685_0x53' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch7 + pca9685_id: 'pca9685_0x53' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch8 + pca9685_id: 'pca9685_0x53' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch9 + pca9685_id: 'pca9685_0x53' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch10 + pca9685_id: 'pca9685_0x53' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch11 + pca9685_id: 'pca9685_0x53' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch12 + pca9685_id: 'pca9685_0x53' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch13 + pca9685_id: 'pca9685_0x53' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch14 + pca9685_id: 'pca9685_0x53' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x53_ch15 + pca9685_id: 'pca9685_0x53' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x54.yaml b/packages/main_hub/pca9685/0x54.yaml new file mode 100644 index 0000000..e9c4814 --- /dev/null +++ b/packages/main_hub/pca9685/0x54.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x54 + id: "pca9685_0x54" + +output: + - platform: pca9685 + id: pca_0x54_ch0 + pca9685_id: 'pca9685_0x54' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch1 + pca9685_id: 'pca9685_0x54' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch2 + pca9685_id: 'pca9685_0x54' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch3 + pca9685_id: 'pca9685_0x54' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch4 + pca9685_id: 'pca9685_0x54' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch5 + pca9685_id: 'pca9685_0x54' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch6 + pca9685_id: 'pca9685_0x54' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch7 + pca9685_id: 'pca9685_0x54' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch8 + pca9685_id: 'pca9685_0x54' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch9 + pca9685_id: 'pca9685_0x54' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch10 + pca9685_id: 'pca9685_0x54' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch11 + pca9685_id: 'pca9685_0x54' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch12 + pca9685_id: 'pca9685_0x54' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch13 + pca9685_id: 'pca9685_0x54' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch14 + pca9685_id: 'pca9685_0x54' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x54_ch15 + pca9685_id: 'pca9685_0x54' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x55.yaml b/packages/main_hub/pca9685/0x55.yaml new file mode 100644 index 0000000..6dd5919 --- /dev/null +++ b/packages/main_hub/pca9685/0x55.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x55 + id: "pca9685_0x55" + +output: + - platform: pca9685 + id: pca_0x55_ch0 + pca9685_id: 'pca9685_0x55' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch1 + pca9685_id: 'pca9685_0x55' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch2 + pca9685_id: 'pca9685_0x55' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch3 + pca9685_id: 'pca9685_0x55' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch4 + pca9685_id: 'pca9685_0x55' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch5 + pca9685_id: 'pca9685_0x55' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch6 + pca9685_id: 'pca9685_0x55' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch7 + pca9685_id: 'pca9685_0x55' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch8 + pca9685_id: 'pca9685_0x55' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch9 + pca9685_id: 'pca9685_0x55' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch10 + pca9685_id: 'pca9685_0x55' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch11 + pca9685_id: 'pca9685_0x55' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch12 + pca9685_id: 'pca9685_0x55' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch13 + pca9685_id: 'pca9685_0x55' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch14 + pca9685_id: 'pca9685_0x55' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x55_ch15 + pca9685_id: 'pca9685_0x55' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x56.yaml b/packages/main_hub/pca9685/0x56.yaml new file mode 100644 index 0000000..7ef998a --- /dev/null +++ b/packages/main_hub/pca9685/0x56.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x56 + id: "pca9685_0x56" + +output: + - platform: pca9685 + id: pca_0x56_ch0 + pca9685_id: 'pca9685_0x56' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch1 + pca9685_id: 'pca9685_0x56' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch2 + pca9685_id: 'pca9685_0x56' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch3 + pca9685_id: 'pca9685_0x56' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch4 + pca9685_id: 'pca9685_0x56' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch5 + pca9685_id: 'pca9685_0x56' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch6 + pca9685_id: 'pca9685_0x56' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch7 + pca9685_id: 'pca9685_0x56' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch8 + pca9685_id: 'pca9685_0x56' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch9 + pca9685_id: 'pca9685_0x56' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch10 + pca9685_id: 'pca9685_0x56' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch11 + pca9685_id: 'pca9685_0x56' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch12 + pca9685_id: 'pca9685_0x56' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch13 + pca9685_id: 'pca9685_0x56' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch14 + pca9685_id: 'pca9685_0x56' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x56_ch15 + pca9685_id: 'pca9685_0x56' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x57.yaml b/packages/main_hub/pca9685/0x57.yaml new file mode 100644 index 0000000..6352dbe --- /dev/null +++ b/packages/main_hub/pca9685/0x57.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x57 + id: "pca9685_0x57" + +output: + - platform: pca9685 + id: pca_0x57_ch0 + pca9685_id: 'pca9685_0x57' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch1 + pca9685_id: 'pca9685_0x57' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch2 + pca9685_id: 'pca9685_0x57' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch3 + pca9685_id: 'pca9685_0x57' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch4 + pca9685_id: 'pca9685_0x57' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch5 + pca9685_id: 'pca9685_0x57' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch6 + pca9685_id: 'pca9685_0x57' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch7 + pca9685_id: 'pca9685_0x57' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch8 + pca9685_id: 'pca9685_0x57' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch9 + pca9685_id: 'pca9685_0x57' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch10 + pca9685_id: 'pca9685_0x57' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch11 + pca9685_id: 'pca9685_0x57' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch12 + pca9685_id: 'pca9685_0x57' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch13 + pca9685_id: 'pca9685_0x57' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch14 + pca9685_id: 'pca9685_0x57' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x57_ch15 + pca9685_id: 'pca9685_0x57' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x58.yaml b/packages/main_hub/pca9685/0x58.yaml new file mode 100644 index 0000000..042a84e --- /dev/null +++ b/packages/main_hub/pca9685/0x58.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x58 + id: "pca9685_0x58" + +output: + - platform: pca9685 + id: pca_0x58_ch0 + pca9685_id: 'pca9685_0x58' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch1 + pca9685_id: 'pca9685_0x58' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch2 + pca9685_id: 'pca9685_0x58' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch3 + pca9685_id: 'pca9685_0x58' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch4 + pca9685_id: 'pca9685_0x58' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch5 + pca9685_id: 'pca9685_0x58' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch6 + pca9685_id: 'pca9685_0x58' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch7 + pca9685_id: 'pca9685_0x58' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch8 + pca9685_id: 'pca9685_0x58' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch9 + pca9685_id: 'pca9685_0x58' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch10 + pca9685_id: 'pca9685_0x58' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch11 + pca9685_id: 'pca9685_0x58' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch12 + pca9685_id: 'pca9685_0x58' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch13 + pca9685_id: 'pca9685_0x58' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch14 + pca9685_id: 'pca9685_0x58' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x58_ch15 + pca9685_id: 'pca9685_0x58' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x59.yaml b/packages/main_hub/pca9685/0x59.yaml new file mode 100644 index 0000000..d567ca6 --- /dev/null +++ b/packages/main_hub/pca9685/0x59.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x59 + id: "pca9685_0x59" + +output: + - platform: pca9685 + id: pca_0x59_ch0 + pca9685_id: 'pca9685_0x59' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch1 + pca9685_id: 'pca9685_0x59' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch2 + pca9685_id: 'pca9685_0x59' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch3 + pca9685_id: 'pca9685_0x59' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch4 + pca9685_id: 'pca9685_0x59' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch5 + pca9685_id: 'pca9685_0x59' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch6 + pca9685_id: 'pca9685_0x59' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch7 + pca9685_id: 'pca9685_0x59' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch8 + pca9685_id: 'pca9685_0x59' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch9 + pca9685_id: 'pca9685_0x59' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch10 + pca9685_id: 'pca9685_0x59' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch11 + pca9685_id: 'pca9685_0x59' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch12 + pca9685_id: 'pca9685_0x59' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch13 + pca9685_id: 'pca9685_0x59' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch14 + pca9685_id: 'pca9685_0x59' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x59_ch15 + pca9685_id: 'pca9685_0x59' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x5a.yaml b/packages/main_hub/pca9685/0x5a.yaml new file mode 100644 index 0000000..0d02631 --- /dev/null +++ b/packages/main_hub/pca9685/0x5a.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x5A + id: "pca9685_0x5a" + +output: + - platform: pca9685 + id: pca_0x5a_ch0 + pca9685_id: 'pca9685_0x5a' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch1 + pca9685_id: 'pca9685_0x5a' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch2 + pca9685_id: 'pca9685_0x5a' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch3 + pca9685_id: 'pca9685_0x5a' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch4 + pca9685_id: 'pca9685_0x5a' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch5 + pca9685_id: 'pca9685_0x5a' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch6 + pca9685_id: 'pca9685_0x5a' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch7 + pca9685_id: 'pca9685_0x5a' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch8 + pca9685_id: 'pca9685_0x5a' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch9 + pca9685_id: 'pca9685_0x5a' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch10 + pca9685_id: 'pca9685_0x5a' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch11 + pca9685_id: 'pca9685_0x5a' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch12 + pca9685_id: 'pca9685_0x5a' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch13 + pca9685_id: 'pca9685_0x5a' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch14 + pca9685_id: 'pca9685_0x5a' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x5a_ch15 + pca9685_id: 'pca9685_0x5a' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x5b.yaml b/packages/main_hub/pca9685/0x5b.yaml new file mode 100644 index 0000000..c0eefc8 --- /dev/null +++ b/packages/main_hub/pca9685/0x5b.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x5B + id: "pca9685_0x5b" + +output: + - platform: pca9685 + id: pca_0x5b_ch0 + pca9685_id: 'pca9685_0x5b' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch1 + pca9685_id: 'pca9685_0x5b' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch2 + pca9685_id: 'pca9685_0x5b' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch3 + pca9685_id: 'pca9685_0x5b' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch4 + pca9685_id: 'pca9685_0x5b' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch5 + pca9685_id: 'pca9685_0x5b' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch6 + pca9685_id: 'pca9685_0x5b' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch7 + pca9685_id: 'pca9685_0x5b' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch8 + pca9685_id: 'pca9685_0x5b' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch9 + pca9685_id: 'pca9685_0x5b' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch10 + pca9685_id: 'pca9685_0x5b' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch11 + pca9685_id: 'pca9685_0x5b' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch12 + pca9685_id: 'pca9685_0x5b' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch13 + pca9685_id: 'pca9685_0x5b' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch14 + pca9685_id: 'pca9685_0x5b' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x5b_ch15 + pca9685_id: 'pca9685_0x5b' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x5c.yaml b/packages/main_hub/pca9685/0x5c.yaml new file mode 100644 index 0000000..2764f76 --- /dev/null +++ b/packages/main_hub/pca9685/0x5c.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x5C + id: "pca9685_0x5c" + +output: + - platform: pca9685 + id: pca_0x5c_ch0 + pca9685_id: 'pca9685_0x5c' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch1 + pca9685_id: 'pca9685_0x5c' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch2 + pca9685_id: 'pca9685_0x5c' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch3 + pca9685_id: 'pca9685_0x5c' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch4 + pca9685_id: 'pca9685_0x5c' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch5 + pca9685_id: 'pca9685_0x5c' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch6 + pca9685_id: 'pca9685_0x5c' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch7 + pca9685_id: 'pca9685_0x5c' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch8 + pca9685_id: 'pca9685_0x5c' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch9 + pca9685_id: 'pca9685_0x5c' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch10 + pca9685_id: 'pca9685_0x5c' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch11 + pca9685_id: 'pca9685_0x5c' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch12 + pca9685_id: 'pca9685_0x5c' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch13 + pca9685_id: 'pca9685_0x5c' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch14 + pca9685_id: 'pca9685_0x5c' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x5c_ch15 + pca9685_id: 'pca9685_0x5c' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x5d.yaml b/packages/main_hub/pca9685/0x5d.yaml new file mode 100644 index 0000000..6b718de --- /dev/null +++ b/packages/main_hub/pca9685/0x5d.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x5D + id: "pca9685_0x5d" + +output: + - platform: pca9685 + id: pca_0x5d_ch0 + pca9685_id: 'pca9685_0x5d' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch1 + pca9685_id: 'pca9685_0x5d' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch2 + pca9685_id: 'pca9685_0x5d' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch3 + pca9685_id: 'pca9685_0x5d' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch4 + pca9685_id: 'pca9685_0x5d' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch5 + pca9685_id: 'pca9685_0x5d' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch6 + pca9685_id: 'pca9685_0x5d' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch7 + pca9685_id: 'pca9685_0x5d' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch8 + pca9685_id: 'pca9685_0x5d' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch9 + pca9685_id: 'pca9685_0x5d' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch10 + pca9685_id: 'pca9685_0x5d' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch11 + pca9685_id: 'pca9685_0x5d' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch12 + pca9685_id: 'pca9685_0x5d' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch13 + pca9685_id: 'pca9685_0x5d' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch14 + pca9685_id: 'pca9685_0x5d' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x5d_ch15 + pca9685_id: 'pca9685_0x5d' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x5e.yaml b/packages/main_hub/pca9685/0x5e.yaml new file mode 100644 index 0000000..9b64d4f --- /dev/null +++ b/packages/main_hub/pca9685/0x5e.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x5E + id: "pca9685_0x5e" + +output: + - platform: pca9685 + id: pca_0x5e_ch0 + pca9685_id: 'pca9685_0x5e' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch1 + pca9685_id: 'pca9685_0x5e' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch2 + pca9685_id: 'pca9685_0x5e' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch3 + pca9685_id: 'pca9685_0x5e' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch4 + pca9685_id: 'pca9685_0x5e' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch5 + pca9685_id: 'pca9685_0x5e' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch6 + pca9685_id: 'pca9685_0x5e' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch7 + pca9685_id: 'pca9685_0x5e' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch8 + pca9685_id: 'pca9685_0x5e' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch9 + pca9685_id: 'pca9685_0x5e' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch10 + pca9685_id: 'pca9685_0x5e' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch11 + pca9685_id: 'pca9685_0x5e' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch12 + pca9685_id: 'pca9685_0x5e' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch13 + pca9685_id: 'pca9685_0x5e' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch14 + pca9685_id: 'pca9685_0x5e' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x5e_ch15 + pca9685_id: 'pca9685_0x5e' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x5f.yaml b/packages/main_hub/pca9685/0x5f.yaml new file mode 100644 index 0000000..0c8d910 --- /dev/null +++ b/packages/main_hub/pca9685/0x5f.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x5F + id: "pca9685_0x5f" + +output: + - platform: pca9685 + id: pca_0x5f_ch0 + pca9685_id: 'pca9685_0x5f' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch1 + pca9685_id: 'pca9685_0x5f' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch2 + pca9685_id: 'pca9685_0x5f' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch3 + pca9685_id: 'pca9685_0x5f' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch4 + pca9685_id: 'pca9685_0x5f' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch5 + pca9685_id: 'pca9685_0x5f' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch6 + pca9685_id: 'pca9685_0x5f' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch7 + pca9685_id: 'pca9685_0x5f' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch8 + pca9685_id: 'pca9685_0x5f' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch9 + pca9685_id: 'pca9685_0x5f' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch10 + pca9685_id: 'pca9685_0x5f' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch11 + pca9685_id: 'pca9685_0x5f' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch12 + pca9685_id: 'pca9685_0x5f' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch13 + pca9685_id: 'pca9685_0x5f' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch14 + pca9685_id: 'pca9685_0x5f' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x5f_ch15 + pca9685_id: 'pca9685_0x5f' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x60.yaml b/packages/main_hub/pca9685/0x60.yaml new file mode 100644 index 0000000..4d59643 --- /dev/null +++ b/packages/main_hub/pca9685/0x60.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x60 + id: "pca9685_0x60" + +output: + - platform: pca9685 + id: pca_0x60_ch0 + pca9685_id: 'pca9685_0x60' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch1 + pca9685_id: 'pca9685_0x60' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch2 + pca9685_id: 'pca9685_0x60' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch3 + pca9685_id: 'pca9685_0x60' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch4 + pca9685_id: 'pca9685_0x60' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch5 + pca9685_id: 'pca9685_0x60' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch6 + pca9685_id: 'pca9685_0x60' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch7 + pca9685_id: 'pca9685_0x60' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch8 + pca9685_id: 'pca9685_0x60' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch9 + pca9685_id: 'pca9685_0x60' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch10 + pca9685_id: 'pca9685_0x60' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch11 + pca9685_id: 'pca9685_0x60' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch12 + pca9685_id: 'pca9685_0x60' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch13 + pca9685_id: 'pca9685_0x60' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch14 + pca9685_id: 'pca9685_0x60' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x60_ch15 + pca9685_id: 'pca9685_0x60' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x61.yaml b/packages/main_hub/pca9685/0x61.yaml new file mode 100644 index 0000000..7fd188e --- /dev/null +++ b/packages/main_hub/pca9685/0x61.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x61 + id: "pca9685_0x61" + +output: + - platform: pca9685 + id: pca_0x61_ch0 + pca9685_id: 'pca9685_0x61' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch1 + pca9685_id: 'pca9685_0x61' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch2 + pca9685_id: 'pca9685_0x61' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch3 + pca9685_id: 'pca9685_0x61' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch4 + pca9685_id: 'pca9685_0x61' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch5 + pca9685_id: 'pca9685_0x61' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch6 + pca9685_id: 'pca9685_0x61' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch7 + pca9685_id: 'pca9685_0x61' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch8 + pca9685_id: 'pca9685_0x61' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch9 + pca9685_id: 'pca9685_0x61' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch10 + pca9685_id: 'pca9685_0x61' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch11 + pca9685_id: 'pca9685_0x61' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch12 + pca9685_id: 'pca9685_0x61' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch13 + pca9685_id: 'pca9685_0x61' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch14 + pca9685_id: 'pca9685_0x61' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x61_ch15 + pca9685_id: 'pca9685_0x61' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x62.yaml b/packages/main_hub/pca9685/0x62.yaml new file mode 100644 index 0000000..ae82e1f --- /dev/null +++ b/packages/main_hub/pca9685/0x62.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x62 + id: "pca9685_0x62" + +output: + - platform: pca9685 + id: pca_0x62_ch0 + pca9685_id: 'pca9685_0x62' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch1 + pca9685_id: 'pca9685_0x62' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch2 + pca9685_id: 'pca9685_0x62' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch3 + pca9685_id: 'pca9685_0x62' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch4 + pca9685_id: 'pca9685_0x62' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch5 + pca9685_id: 'pca9685_0x62' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch6 + pca9685_id: 'pca9685_0x62' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch7 + pca9685_id: 'pca9685_0x62' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch8 + pca9685_id: 'pca9685_0x62' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch9 + pca9685_id: 'pca9685_0x62' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch10 + pca9685_id: 'pca9685_0x62' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch11 + pca9685_id: 'pca9685_0x62' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch12 + pca9685_id: 'pca9685_0x62' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch13 + pca9685_id: 'pca9685_0x62' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch14 + pca9685_id: 'pca9685_0x62' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x62_ch15 + pca9685_id: 'pca9685_0x62' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x63.yaml b/packages/main_hub/pca9685/0x63.yaml new file mode 100644 index 0000000..499b97c --- /dev/null +++ b/packages/main_hub/pca9685/0x63.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x63 + id: "pca9685_0x63" + +output: + - platform: pca9685 + id: pca_0x63_ch0 + pca9685_id: 'pca9685_0x63' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch1 + pca9685_id: 'pca9685_0x63' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch2 + pca9685_id: 'pca9685_0x63' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch3 + pca9685_id: 'pca9685_0x63' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch4 + pca9685_id: 'pca9685_0x63' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch5 + pca9685_id: 'pca9685_0x63' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch6 + pca9685_id: 'pca9685_0x63' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch7 + pca9685_id: 'pca9685_0x63' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch8 + pca9685_id: 'pca9685_0x63' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch9 + pca9685_id: 'pca9685_0x63' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch10 + pca9685_id: 'pca9685_0x63' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch11 + pca9685_id: 'pca9685_0x63' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch12 + pca9685_id: 'pca9685_0x63' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch13 + pca9685_id: 'pca9685_0x63' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch14 + pca9685_id: 'pca9685_0x63' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x63_ch15 + pca9685_id: 'pca9685_0x63' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x64.yaml b/packages/main_hub/pca9685/0x64.yaml new file mode 100644 index 0000000..d881122 --- /dev/null +++ b/packages/main_hub/pca9685/0x64.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x64 + id: "pca9685_0x64" + +output: + - platform: pca9685 + id: pca_0x64_ch0 + pca9685_id: 'pca9685_0x64' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch1 + pca9685_id: 'pca9685_0x64' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch2 + pca9685_id: 'pca9685_0x64' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch3 + pca9685_id: 'pca9685_0x64' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch4 + pca9685_id: 'pca9685_0x64' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch5 + pca9685_id: 'pca9685_0x64' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch6 + pca9685_id: 'pca9685_0x64' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch7 + pca9685_id: 'pca9685_0x64' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch8 + pca9685_id: 'pca9685_0x64' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch9 + pca9685_id: 'pca9685_0x64' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch10 + pca9685_id: 'pca9685_0x64' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch11 + pca9685_id: 'pca9685_0x64' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch12 + pca9685_id: 'pca9685_0x64' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch13 + pca9685_id: 'pca9685_0x64' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch14 + pca9685_id: 'pca9685_0x64' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x64_ch15 + pca9685_id: 'pca9685_0x64' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x65.yaml b/packages/main_hub/pca9685/0x65.yaml new file mode 100644 index 0000000..a92a284 --- /dev/null +++ b/packages/main_hub/pca9685/0x65.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x65 + id: "pca9685_0x65" + +output: + - platform: pca9685 + id: pca_0x65_ch0 + pca9685_id: 'pca9685_0x65' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch1 + pca9685_id: 'pca9685_0x65' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch2 + pca9685_id: 'pca9685_0x65' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch3 + pca9685_id: 'pca9685_0x65' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch4 + pca9685_id: 'pca9685_0x65' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch5 + pca9685_id: 'pca9685_0x65' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch6 + pca9685_id: 'pca9685_0x65' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch7 + pca9685_id: 'pca9685_0x65' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch8 + pca9685_id: 'pca9685_0x65' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch9 + pca9685_id: 'pca9685_0x65' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch10 + pca9685_id: 'pca9685_0x65' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch11 + pca9685_id: 'pca9685_0x65' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch12 + pca9685_id: 'pca9685_0x65' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch13 + pca9685_id: 'pca9685_0x65' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch14 + pca9685_id: 'pca9685_0x65' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x65_ch15 + pca9685_id: 'pca9685_0x65' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x66.yaml b/packages/main_hub/pca9685/0x66.yaml new file mode 100644 index 0000000..e13bcd5 --- /dev/null +++ b/packages/main_hub/pca9685/0x66.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x66 + id: "pca9685_0x66" + +output: + - platform: pca9685 + id: pca_0x66_ch0 + pca9685_id: 'pca9685_0x66' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch1 + pca9685_id: 'pca9685_0x66' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch2 + pca9685_id: 'pca9685_0x66' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch3 + pca9685_id: 'pca9685_0x66' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch4 + pca9685_id: 'pca9685_0x66' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch5 + pca9685_id: 'pca9685_0x66' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch6 + pca9685_id: 'pca9685_0x66' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch7 + pca9685_id: 'pca9685_0x66' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch8 + pca9685_id: 'pca9685_0x66' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch9 + pca9685_id: 'pca9685_0x66' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch10 + pca9685_id: 'pca9685_0x66' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch11 + pca9685_id: 'pca9685_0x66' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch12 + pca9685_id: 'pca9685_0x66' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch13 + pca9685_id: 'pca9685_0x66' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch14 + pca9685_id: 'pca9685_0x66' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x66_ch15 + pca9685_id: 'pca9685_0x66' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x67.yaml b/packages/main_hub/pca9685/0x67.yaml new file mode 100644 index 0000000..f234b7a --- /dev/null +++ b/packages/main_hub/pca9685/0x67.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x67 + id: "pca9685_0x67" + +output: + - platform: pca9685 + id: pca_0x67_ch0 + pca9685_id: 'pca9685_0x67' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch1 + pca9685_id: 'pca9685_0x67' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch2 + pca9685_id: 'pca9685_0x67' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch3 + pca9685_id: 'pca9685_0x67' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch4 + pca9685_id: 'pca9685_0x67' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch5 + pca9685_id: 'pca9685_0x67' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch6 + pca9685_id: 'pca9685_0x67' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch7 + pca9685_id: 'pca9685_0x67' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch8 + pca9685_id: 'pca9685_0x67' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch9 + pca9685_id: 'pca9685_0x67' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch10 + pca9685_id: 'pca9685_0x67' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch11 + pca9685_id: 'pca9685_0x67' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch12 + pca9685_id: 'pca9685_0x67' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch13 + pca9685_id: 'pca9685_0x67' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch14 + pca9685_id: 'pca9685_0x67' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x67_ch15 + pca9685_id: 'pca9685_0x67' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x68.yaml b/packages/main_hub/pca9685/0x68.yaml new file mode 100644 index 0000000..b61737e --- /dev/null +++ b/packages/main_hub/pca9685/0x68.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x68 + id: "pca9685_0x68" + +output: + - platform: pca9685 + id: pca_0x68_ch0 + pca9685_id: 'pca9685_0x68' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch1 + pca9685_id: 'pca9685_0x68' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch2 + pca9685_id: 'pca9685_0x68' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch3 + pca9685_id: 'pca9685_0x68' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch4 + pca9685_id: 'pca9685_0x68' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch5 + pca9685_id: 'pca9685_0x68' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch6 + pca9685_id: 'pca9685_0x68' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch7 + pca9685_id: 'pca9685_0x68' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch8 + pca9685_id: 'pca9685_0x68' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch9 + pca9685_id: 'pca9685_0x68' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch10 + pca9685_id: 'pca9685_0x68' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch11 + pca9685_id: 'pca9685_0x68' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch12 + pca9685_id: 'pca9685_0x68' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch13 + pca9685_id: 'pca9685_0x68' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch14 + pca9685_id: 'pca9685_0x68' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x68_ch15 + pca9685_id: 'pca9685_0x68' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x69.yaml b/packages/main_hub/pca9685/0x69.yaml new file mode 100644 index 0000000..5012207 --- /dev/null +++ b/packages/main_hub/pca9685/0x69.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x69 + id: "pca9685_0x69" + +output: + - platform: pca9685 + id: pca_0x69_ch0 + pca9685_id: 'pca9685_0x69' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch1 + pca9685_id: 'pca9685_0x69' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch2 + pca9685_id: 'pca9685_0x69' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch3 + pca9685_id: 'pca9685_0x69' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch4 + pca9685_id: 'pca9685_0x69' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch5 + pca9685_id: 'pca9685_0x69' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch6 + pca9685_id: 'pca9685_0x69' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch7 + pca9685_id: 'pca9685_0x69' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch8 + pca9685_id: 'pca9685_0x69' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch9 + pca9685_id: 'pca9685_0x69' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch10 + pca9685_id: 'pca9685_0x69' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch11 + pca9685_id: 'pca9685_0x69' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch12 + pca9685_id: 'pca9685_0x69' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch13 + pca9685_id: 'pca9685_0x69' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch14 + pca9685_id: 'pca9685_0x69' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x69_ch15 + pca9685_id: 'pca9685_0x69' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x6a.yaml b/packages/main_hub/pca9685/0x6a.yaml new file mode 100644 index 0000000..bf524cb --- /dev/null +++ b/packages/main_hub/pca9685/0x6a.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x6A + id: "pca9685_0x6a" + +output: + - platform: pca9685 + id: pca_0x6a_ch0 + pca9685_id: 'pca9685_0x6a' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch1 + pca9685_id: 'pca9685_0x6a' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch2 + pca9685_id: 'pca9685_0x6a' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch3 + pca9685_id: 'pca9685_0x6a' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch4 + pca9685_id: 'pca9685_0x6a' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch5 + pca9685_id: 'pca9685_0x6a' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch6 + pca9685_id: 'pca9685_0x6a' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch7 + pca9685_id: 'pca9685_0x6a' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch8 + pca9685_id: 'pca9685_0x6a' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch9 + pca9685_id: 'pca9685_0x6a' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch10 + pca9685_id: 'pca9685_0x6a' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch11 + pca9685_id: 'pca9685_0x6a' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch12 + pca9685_id: 'pca9685_0x6a' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch13 + pca9685_id: 'pca9685_0x6a' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch14 + pca9685_id: 'pca9685_0x6a' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x6a_ch15 + pca9685_id: 'pca9685_0x6a' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x6b.yaml b/packages/main_hub/pca9685/0x6b.yaml new file mode 100644 index 0000000..a2c5a0c --- /dev/null +++ b/packages/main_hub/pca9685/0x6b.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x6B + id: "pca9685_0x6b" + +output: + - platform: pca9685 + id: pca_0x6b_ch0 + pca9685_id: 'pca9685_0x6b' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch1 + pca9685_id: 'pca9685_0x6b' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch2 + pca9685_id: 'pca9685_0x6b' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch3 + pca9685_id: 'pca9685_0x6b' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch4 + pca9685_id: 'pca9685_0x6b' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch5 + pca9685_id: 'pca9685_0x6b' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch6 + pca9685_id: 'pca9685_0x6b' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch7 + pca9685_id: 'pca9685_0x6b' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch8 + pca9685_id: 'pca9685_0x6b' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch9 + pca9685_id: 'pca9685_0x6b' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch10 + pca9685_id: 'pca9685_0x6b' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch11 + pca9685_id: 'pca9685_0x6b' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch12 + pca9685_id: 'pca9685_0x6b' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch13 + pca9685_id: 'pca9685_0x6b' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch14 + pca9685_id: 'pca9685_0x6b' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x6b_ch15 + pca9685_id: 'pca9685_0x6b' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x6c.yaml b/packages/main_hub/pca9685/0x6c.yaml new file mode 100644 index 0000000..21f5ad7 --- /dev/null +++ b/packages/main_hub/pca9685/0x6c.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x6C + id: "pca9685_0x6c" + +output: + - platform: pca9685 + id: pca_0x6c_ch0 + pca9685_id: 'pca9685_0x6c' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch1 + pca9685_id: 'pca9685_0x6c' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch2 + pca9685_id: 'pca9685_0x6c' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch3 + pca9685_id: 'pca9685_0x6c' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch4 + pca9685_id: 'pca9685_0x6c' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch5 + pca9685_id: 'pca9685_0x6c' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch6 + pca9685_id: 'pca9685_0x6c' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch7 + pca9685_id: 'pca9685_0x6c' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch8 + pca9685_id: 'pca9685_0x6c' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch9 + pca9685_id: 'pca9685_0x6c' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch10 + pca9685_id: 'pca9685_0x6c' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch11 + pca9685_id: 'pca9685_0x6c' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch12 + pca9685_id: 'pca9685_0x6c' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch13 + pca9685_id: 'pca9685_0x6c' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch14 + pca9685_id: 'pca9685_0x6c' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x6c_ch15 + pca9685_id: 'pca9685_0x6c' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x6d.yaml b/packages/main_hub/pca9685/0x6d.yaml new file mode 100644 index 0000000..4cef2a8 --- /dev/null +++ b/packages/main_hub/pca9685/0x6d.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x6D + id: "pca9685_0x6d" + +output: + - platform: pca9685 + id: pca_0x6d_ch0 + pca9685_id: 'pca9685_0x6d' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch1 + pca9685_id: 'pca9685_0x6d' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch2 + pca9685_id: 'pca9685_0x6d' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch3 + pca9685_id: 'pca9685_0x6d' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch4 + pca9685_id: 'pca9685_0x6d' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch5 + pca9685_id: 'pca9685_0x6d' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch6 + pca9685_id: 'pca9685_0x6d' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch7 + pca9685_id: 'pca9685_0x6d' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch8 + pca9685_id: 'pca9685_0x6d' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch9 + pca9685_id: 'pca9685_0x6d' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch10 + pca9685_id: 'pca9685_0x6d' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch11 + pca9685_id: 'pca9685_0x6d' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch12 + pca9685_id: 'pca9685_0x6d' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch13 + pca9685_id: 'pca9685_0x6d' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch14 + pca9685_id: 'pca9685_0x6d' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x6d_ch15 + pca9685_id: 'pca9685_0x6d' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x6e.yaml b/packages/main_hub/pca9685/0x6e.yaml new file mode 100644 index 0000000..7330967 --- /dev/null +++ b/packages/main_hub/pca9685/0x6e.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x6E + id: "pca9685_0x6e" + +output: + - platform: pca9685 + id: pca_0x6e_ch0 + pca9685_id: 'pca9685_0x6e' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch1 + pca9685_id: 'pca9685_0x6e' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch2 + pca9685_id: 'pca9685_0x6e' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch3 + pca9685_id: 'pca9685_0x6e' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch4 + pca9685_id: 'pca9685_0x6e' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch5 + pca9685_id: 'pca9685_0x6e' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch6 + pca9685_id: 'pca9685_0x6e' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch7 + pca9685_id: 'pca9685_0x6e' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch8 + pca9685_id: 'pca9685_0x6e' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch9 + pca9685_id: 'pca9685_0x6e' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch10 + pca9685_id: 'pca9685_0x6e' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch11 + pca9685_id: 'pca9685_0x6e' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch12 + pca9685_id: 'pca9685_0x6e' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch13 + pca9685_id: 'pca9685_0x6e' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch14 + pca9685_id: 'pca9685_0x6e' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x6e_ch15 + pca9685_id: 'pca9685_0x6e' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x6f.yaml b/packages/main_hub/pca9685/0x6f.yaml new file mode 100644 index 0000000..2edc579 --- /dev/null +++ b/packages/main_hub/pca9685/0x6f.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x6F + id: "pca9685_0x6f" + +output: + - platform: pca9685 + id: pca_0x6f_ch0 + pca9685_id: 'pca9685_0x6f' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch1 + pca9685_id: 'pca9685_0x6f' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch2 + pca9685_id: 'pca9685_0x6f' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch3 + pca9685_id: 'pca9685_0x6f' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch4 + pca9685_id: 'pca9685_0x6f' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch5 + pca9685_id: 'pca9685_0x6f' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch6 + pca9685_id: 'pca9685_0x6f' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch7 + pca9685_id: 'pca9685_0x6f' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch8 + pca9685_id: 'pca9685_0x6f' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch9 + pca9685_id: 'pca9685_0x6f' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch10 + pca9685_id: 'pca9685_0x6f' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch11 + pca9685_id: 'pca9685_0x6f' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch12 + pca9685_id: 'pca9685_0x6f' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch13 + pca9685_id: 'pca9685_0x6f' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch14 + pca9685_id: 'pca9685_0x6f' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x6f_ch15 + pca9685_id: 'pca9685_0x6f' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x70.yaml b/packages/main_hub/pca9685/0x70.yaml new file mode 100644 index 0000000..9c8a30c --- /dev/null +++ b/packages/main_hub/pca9685/0x70.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x70 + id: "pca9685_0x70" + +output: + - platform: pca9685 + id: pca_0x70_ch0 + pca9685_id: 'pca9685_0x70' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch1 + pca9685_id: 'pca9685_0x70' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch2 + pca9685_id: 'pca9685_0x70' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch3 + pca9685_id: 'pca9685_0x70' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch4 + pca9685_id: 'pca9685_0x70' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch5 + pca9685_id: 'pca9685_0x70' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch6 + pca9685_id: 'pca9685_0x70' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch7 + pca9685_id: 'pca9685_0x70' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch8 + pca9685_id: 'pca9685_0x70' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch9 + pca9685_id: 'pca9685_0x70' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch10 + pca9685_id: 'pca9685_0x70' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch11 + pca9685_id: 'pca9685_0x70' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch12 + pca9685_id: 'pca9685_0x70' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch13 + pca9685_id: 'pca9685_0x70' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch14 + pca9685_id: 'pca9685_0x70' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x70_ch15 + pca9685_id: 'pca9685_0x70' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x71.yaml b/packages/main_hub/pca9685/0x71.yaml new file mode 100644 index 0000000..a167d8e --- /dev/null +++ b/packages/main_hub/pca9685/0x71.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x71 + id: "pca9685_0x71" + +output: + - platform: pca9685 + id: pca_0x71_ch0 + pca9685_id: 'pca9685_0x71' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch1 + pca9685_id: 'pca9685_0x71' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch2 + pca9685_id: 'pca9685_0x71' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch3 + pca9685_id: 'pca9685_0x71' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch4 + pca9685_id: 'pca9685_0x71' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch5 + pca9685_id: 'pca9685_0x71' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch6 + pca9685_id: 'pca9685_0x71' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch7 + pca9685_id: 'pca9685_0x71' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch8 + pca9685_id: 'pca9685_0x71' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch9 + pca9685_id: 'pca9685_0x71' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch10 + pca9685_id: 'pca9685_0x71' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch11 + pca9685_id: 'pca9685_0x71' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch12 + pca9685_id: 'pca9685_0x71' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch13 + pca9685_id: 'pca9685_0x71' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch14 + pca9685_id: 'pca9685_0x71' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x71_ch15 + pca9685_id: 'pca9685_0x71' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x72.yaml b/packages/main_hub/pca9685/0x72.yaml new file mode 100644 index 0000000..fc32d02 --- /dev/null +++ b/packages/main_hub/pca9685/0x72.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x72 + id: "pca9685_0x72" + +output: + - platform: pca9685 + id: pca_0x72_ch0 + pca9685_id: 'pca9685_0x72' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch1 + pca9685_id: 'pca9685_0x72' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch2 + pca9685_id: 'pca9685_0x72' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch3 + pca9685_id: 'pca9685_0x72' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch4 + pca9685_id: 'pca9685_0x72' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch5 + pca9685_id: 'pca9685_0x72' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch6 + pca9685_id: 'pca9685_0x72' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch7 + pca9685_id: 'pca9685_0x72' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch8 + pca9685_id: 'pca9685_0x72' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch9 + pca9685_id: 'pca9685_0x72' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch10 + pca9685_id: 'pca9685_0x72' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch11 + pca9685_id: 'pca9685_0x72' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch12 + pca9685_id: 'pca9685_0x72' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch13 + pca9685_id: 'pca9685_0x72' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch14 + pca9685_id: 'pca9685_0x72' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x72_ch15 + pca9685_id: 'pca9685_0x72' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x73.yaml b/packages/main_hub/pca9685/0x73.yaml new file mode 100644 index 0000000..47f9da6 --- /dev/null +++ b/packages/main_hub/pca9685/0x73.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x73 + id: "pca9685_0x73" + +output: + - platform: pca9685 + id: pca_0x73_ch0 + pca9685_id: 'pca9685_0x73' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch1 + pca9685_id: 'pca9685_0x73' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch2 + pca9685_id: 'pca9685_0x73' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch3 + pca9685_id: 'pca9685_0x73' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch4 + pca9685_id: 'pca9685_0x73' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch5 + pca9685_id: 'pca9685_0x73' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch6 + pca9685_id: 'pca9685_0x73' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch7 + pca9685_id: 'pca9685_0x73' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch8 + pca9685_id: 'pca9685_0x73' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch9 + pca9685_id: 'pca9685_0x73' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch10 + pca9685_id: 'pca9685_0x73' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch11 + pca9685_id: 'pca9685_0x73' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch12 + pca9685_id: 'pca9685_0x73' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch13 + pca9685_id: 'pca9685_0x73' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch14 + pca9685_id: 'pca9685_0x73' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x73_ch15 + pca9685_id: 'pca9685_0x73' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x74.yaml b/packages/main_hub/pca9685/0x74.yaml new file mode 100644 index 0000000..a3a1c05 --- /dev/null +++ b/packages/main_hub/pca9685/0x74.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x74 + id: "pca9685_0x74" + +output: + - platform: pca9685 + id: pca_0x74_ch0 + pca9685_id: 'pca9685_0x74' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch1 + pca9685_id: 'pca9685_0x74' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch2 + pca9685_id: 'pca9685_0x74' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch3 + pca9685_id: 'pca9685_0x74' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch4 + pca9685_id: 'pca9685_0x74' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch5 + pca9685_id: 'pca9685_0x74' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch6 + pca9685_id: 'pca9685_0x74' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch7 + pca9685_id: 'pca9685_0x74' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch8 + pca9685_id: 'pca9685_0x74' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch9 + pca9685_id: 'pca9685_0x74' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch10 + pca9685_id: 'pca9685_0x74' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch11 + pca9685_id: 'pca9685_0x74' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch12 + pca9685_id: 'pca9685_0x74' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch13 + pca9685_id: 'pca9685_0x74' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch14 + pca9685_id: 'pca9685_0x74' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x74_ch15 + pca9685_id: 'pca9685_0x74' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x75.yaml b/packages/main_hub/pca9685/0x75.yaml new file mode 100644 index 0000000..d116d00 --- /dev/null +++ b/packages/main_hub/pca9685/0x75.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x75 + id: "pca9685_0x75" + +output: + - platform: pca9685 + id: pca_0x75_ch0 + pca9685_id: 'pca9685_0x75' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch1 + pca9685_id: 'pca9685_0x75' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch2 + pca9685_id: 'pca9685_0x75' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch3 + pca9685_id: 'pca9685_0x75' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch4 + pca9685_id: 'pca9685_0x75' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch5 + pca9685_id: 'pca9685_0x75' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch6 + pca9685_id: 'pca9685_0x75' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch7 + pca9685_id: 'pca9685_0x75' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch8 + pca9685_id: 'pca9685_0x75' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch9 + pca9685_id: 'pca9685_0x75' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch10 + pca9685_id: 'pca9685_0x75' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch11 + pca9685_id: 'pca9685_0x75' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch12 + pca9685_id: 'pca9685_0x75' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch13 + pca9685_id: 'pca9685_0x75' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch14 + pca9685_id: 'pca9685_0x75' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x75_ch15 + pca9685_id: 'pca9685_0x75' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x76.yaml b/packages/main_hub/pca9685/0x76.yaml new file mode 100644 index 0000000..584875e --- /dev/null +++ b/packages/main_hub/pca9685/0x76.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x76 + id: "pca9685_0x76" + +output: + - platform: pca9685 + id: pca_0x76_ch0 + pca9685_id: 'pca9685_0x76' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch1 + pca9685_id: 'pca9685_0x76' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch2 + pca9685_id: 'pca9685_0x76' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch3 + pca9685_id: 'pca9685_0x76' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch4 + pca9685_id: 'pca9685_0x76' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch5 + pca9685_id: 'pca9685_0x76' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch6 + pca9685_id: 'pca9685_0x76' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch7 + pca9685_id: 'pca9685_0x76' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch8 + pca9685_id: 'pca9685_0x76' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch9 + pca9685_id: 'pca9685_0x76' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch10 + pca9685_id: 'pca9685_0x76' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch11 + pca9685_id: 'pca9685_0x76' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch12 + pca9685_id: 'pca9685_0x76' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch13 + pca9685_id: 'pca9685_0x76' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch14 + pca9685_id: 'pca9685_0x76' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x76_ch15 + pca9685_id: 'pca9685_0x76' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x77.yaml b/packages/main_hub/pca9685/0x77.yaml new file mode 100644 index 0000000..50f724d --- /dev/null +++ b/packages/main_hub/pca9685/0x77.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x77 + id: "pca9685_0x77" + +output: + - platform: pca9685 + id: pca_0x77_ch0 + pca9685_id: 'pca9685_0x77' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch1 + pca9685_id: 'pca9685_0x77' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch2 + pca9685_id: 'pca9685_0x77' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch3 + pca9685_id: 'pca9685_0x77' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch4 + pca9685_id: 'pca9685_0x77' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch5 + pca9685_id: 'pca9685_0x77' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch6 + pca9685_id: 'pca9685_0x77' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch7 + pca9685_id: 'pca9685_0x77' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch8 + pca9685_id: 'pca9685_0x77' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch9 + pca9685_id: 'pca9685_0x77' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch10 + pca9685_id: 'pca9685_0x77' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch11 + pca9685_id: 'pca9685_0x77' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch12 + pca9685_id: 'pca9685_0x77' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch13 + pca9685_id: 'pca9685_0x77' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch14 + pca9685_id: 'pca9685_0x77' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x77_ch15 + pca9685_id: 'pca9685_0x77' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x78.yaml b/packages/main_hub/pca9685/0x78.yaml new file mode 100644 index 0000000..f6fa11c --- /dev/null +++ b/packages/main_hub/pca9685/0x78.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x78 + id: "pca9685_0x78" + +output: + - platform: pca9685 + id: pca_0x78_ch0 + pca9685_id: 'pca9685_0x78' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch1 + pca9685_id: 'pca9685_0x78' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch2 + pca9685_id: 'pca9685_0x78' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch3 + pca9685_id: 'pca9685_0x78' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch4 + pca9685_id: 'pca9685_0x78' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch5 + pca9685_id: 'pca9685_0x78' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch6 + pca9685_id: 'pca9685_0x78' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch7 + pca9685_id: 'pca9685_0x78' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch8 + pca9685_id: 'pca9685_0x78' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch9 + pca9685_id: 'pca9685_0x78' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch10 + pca9685_id: 'pca9685_0x78' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch11 + pca9685_id: 'pca9685_0x78' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch12 + pca9685_id: 'pca9685_0x78' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch13 + pca9685_id: 'pca9685_0x78' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch14 + pca9685_id: 'pca9685_0x78' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x78_ch15 + pca9685_id: 'pca9685_0x78' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x79.yaml b/packages/main_hub/pca9685/0x79.yaml new file mode 100644 index 0000000..7b5651c --- /dev/null +++ b/packages/main_hub/pca9685/0x79.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x79 + id: "pca9685_0x79" + +output: + - platform: pca9685 + id: pca_0x79_ch0 + pca9685_id: 'pca9685_0x79' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch1 + pca9685_id: 'pca9685_0x79' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch2 + pca9685_id: 'pca9685_0x79' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch3 + pca9685_id: 'pca9685_0x79' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch4 + pca9685_id: 'pca9685_0x79' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch5 + pca9685_id: 'pca9685_0x79' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch6 + pca9685_id: 'pca9685_0x79' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch7 + pca9685_id: 'pca9685_0x79' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch8 + pca9685_id: 'pca9685_0x79' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch9 + pca9685_id: 'pca9685_0x79' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch10 + pca9685_id: 'pca9685_0x79' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch11 + pca9685_id: 'pca9685_0x79' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch12 + pca9685_id: 'pca9685_0x79' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch13 + pca9685_id: 'pca9685_0x79' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch14 + pca9685_id: 'pca9685_0x79' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x79_ch15 + pca9685_id: 'pca9685_0x79' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x7a.yaml b/packages/main_hub/pca9685/0x7a.yaml new file mode 100644 index 0000000..61a7c84 --- /dev/null +++ b/packages/main_hub/pca9685/0x7a.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x7A + id: "pca9685_0x7a" + +output: + - platform: pca9685 + id: pca_0x7a_ch0 + pca9685_id: 'pca9685_0x7a' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch1 + pca9685_id: 'pca9685_0x7a' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch2 + pca9685_id: 'pca9685_0x7a' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch3 + pca9685_id: 'pca9685_0x7a' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch4 + pca9685_id: 'pca9685_0x7a' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch5 + pca9685_id: 'pca9685_0x7a' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch6 + pca9685_id: 'pca9685_0x7a' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch7 + pca9685_id: 'pca9685_0x7a' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch8 + pca9685_id: 'pca9685_0x7a' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch9 + pca9685_id: 'pca9685_0x7a' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch10 + pca9685_id: 'pca9685_0x7a' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch11 + pca9685_id: 'pca9685_0x7a' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch12 + pca9685_id: 'pca9685_0x7a' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch13 + pca9685_id: 'pca9685_0x7a' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch14 + pca9685_id: 'pca9685_0x7a' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x7a_ch15 + pca9685_id: 'pca9685_0x7a' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x7b.yaml b/packages/main_hub/pca9685/0x7b.yaml new file mode 100644 index 0000000..3aacc07 --- /dev/null +++ b/packages/main_hub/pca9685/0x7b.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x7B + id: "pca9685_0x7b" + +output: + - platform: pca9685 + id: pca_0x7b_ch0 + pca9685_id: 'pca9685_0x7b' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch1 + pca9685_id: 'pca9685_0x7b' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch2 + pca9685_id: 'pca9685_0x7b' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch3 + pca9685_id: 'pca9685_0x7b' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch4 + pca9685_id: 'pca9685_0x7b' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch5 + pca9685_id: 'pca9685_0x7b' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch6 + pca9685_id: 'pca9685_0x7b' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch7 + pca9685_id: 'pca9685_0x7b' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch8 + pca9685_id: 'pca9685_0x7b' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch9 + pca9685_id: 'pca9685_0x7b' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch10 + pca9685_id: 'pca9685_0x7b' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch11 + pca9685_id: 'pca9685_0x7b' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch12 + pca9685_id: 'pca9685_0x7b' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch13 + pca9685_id: 'pca9685_0x7b' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch14 + pca9685_id: 'pca9685_0x7b' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x7b_ch15 + pca9685_id: 'pca9685_0x7b' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x7c.yaml b/packages/main_hub/pca9685/0x7c.yaml new file mode 100644 index 0000000..95fb1f0 --- /dev/null +++ b/packages/main_hub/pca9685/0x7c.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x7C + id: "pca9685_0x7c" + +output: + - platform: pca9685 + id: pca_0x7c_ch0 + pca9685_id: 'pca9685_0x7c' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch1 + pca9685_id: 'pca9685_0x7c' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch2 + pca9685_id: 'pca9685_0x7c' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch3 + pca9685_id: 'pca9685_0x7c' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch4 + pca9685_id: 'pca9685_0x7c' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch5 + pca9685_id: 'pca9685_0x7c' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch6 + pca9685_id: 'pca9685_0x7c' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch7 + pca9685_id: 'pca9685_0x7c' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch8 + pca9685_id: 'pca9685_0x7c' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch9 + pca9685_id: 'pca9685_0x7c' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch10 + pca9685_id: 'pca9685_0x7c' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch11 + pca9685_id: 'pca9685_0x7c' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch12 + pca9685_id: 'pca9685_0x7c' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch13 + pca9685_id: 'pca9685_0x7c' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch14 + pca9685_id: 'pca9685_0x7c' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x7c_ch15 + pca9685_id: 'pca9685_0x7c' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x7d.yaml b/packages/main_hub/pca9685/0x7d.yaml new file mode 100644 index 0000000..3e699d4 --- /dev/null +++ b/packages/main_hub/pca9685/0x7d.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x7D + id: "pca9685_0x7d" + +output: + - platform: pca9685 + id: pca_0x7d_ch0 + pca9685_id: 'pca9685_0x7d' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch1 + pca9685_id: 'pca9685_0x7d' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch2 + pca9685_id: 'pca9685_0x7d' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch3 + pca9685_id: 'pca9685_0x7d' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch4 + pca9685_id: 'pca9685_0x7d' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch5 + pca9685_id: 'pca9685_0x7d' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch6 + pca9685_id: 'pca9685_0x7d' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch7 + pca9685_id: 'pca9685_0x7d' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch8 + pca9685_id: 'pca9685_0x7d' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch9 + pca9685_id: 'pca9685_0x7d' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch10 + pca9685_id: 'pca9685_0x7d' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch11 + pca9685_id: 'pca9685_0x7d' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch12 + pca9685_id: 'pca9685_0x7d' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch13 + pca9685_id: 'pca9685_0x7d' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch14 + pca9685_id: 'pca9685_0x7d' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x7d_ch15 + pca9685_id: 'pca9685_0x7d' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x7e.yaml b/packages/main_hub/pca9685/0x7e.yaml new file mode 100644 index 0000000..2f6ee4b --- /dev/null +++ b/packages/main_hub/pca9685/0x7e.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x7E + id: "pca9685_0x7e" + +output: + - platform: pca9685 + id: pca_0x7e_ch0 + pca9685_id: 'pca9685_0x7e' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch1 + pca9685_id: 'pca9685_0x7e' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch2 + pca9685_id: 'pca9685_0x7e' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch3 + pca9685_id: 'pca9685_0x7e' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch4 + pca9685_id: 'pca9685_0x7e' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch5 + pca9685_id: 'pca9685_0x7e' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch6 + pca9685_id: 'pca9685_0x7e' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch7 + pca9685_id: 'pca9685_0x7e' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch8 + pca9685_id: 'pca9685_0x7e' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch9 + pca9685_id: 'pca9685_0x7e' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch10 + pca9685_id: 'pca9685_0x7e' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch11 + pca9685_id: 'pca9685_0x7e' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch12 + pca9685_id: 'pca9685_0x7e' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch13 + pca9685_id: 'pca9685_0x7e' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch14 + pca9685_id: 'pca9685_0x7e' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x7e_ch15 + pca9685_id: 'pca9685_0x7e' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/pca9685/0x7f.yaml b/packages/main_hub/pca9685/0x7f.yaml new file mode 100644 index 0000000..f80693f --- /dev/null +++ b/packages/main_hub/pca9685/0x7f.yaml @@ -0,0 +1,102 @@ +pca9685: + - frequency: 1500 + address: 0x7F + id: "pca9685_0x7f" + +output: + - platform: pca9685 + id: pca_0x7f_ch0 + pca9685_id: 'pca9685_0x7f' + channel: 0 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch1 + pca9685_id: 'pca9685_0x7f' + channel: 1 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch2 + pca9685_id: 'pca9685_0x7f' + channel: 2 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch3 + pca9685_id: 'pca9685_0x7f' + channel: 3 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch4 + pca9685_id: 'pca9685_0x7f' + channel: 4 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch5 + pca9685_id: 'pca9685_0x7f' + channel: 5 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch6 + pca9685_id: 'pca9685_0x7f' + channel: 6 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch7 + pca9685_id: 'pca9685_0x7f' + channel: 7 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch8 + pca9685_id: 'pca9685_0x7f' + channel: 8 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch9 + pca9685_id: 'pca9685_0x7f' + channel: 9 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch10 + pca9685_id: 'pca9685_0x7f' + channel: 10 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch11 + pca9685_id: 'pca9685_0x7f' + channel: 11 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch12 + pca9685_id: 'pca9685_0x7f' + channel: 12 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch13 + pca9685_id: 'pca9685_0x7f' + channel: 13 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch14 + pca9685_id: 'pca9685_0x7f' + channel: 14 + max_power: 100% + + - platform: pca9685 + id: pca_0x7f_ch15 + pca9685_id: 'pca9685_0x7f' + channel: 15 + max_power: 100% + diff --git a/packages/main_hub/scripts.yaml b/packages/main_hub/scripts.yaml new file mode 100644 index 0000000..5703bbd --- /dev/null +++ b/packages/main_hub/scripts.yaml @@ -0,0 +1,479 @@ +script: + # ── Wyłącz wszystkie lampy ─────────────────────────────────────────────── + # Odkomentuj bloki odpowiadające aktywnym adresom z main-hub.yaml + - id: off_all_lights + then: + # ── PCA9685 PWM ────────────────────────────────────────────────────────── + # Odkomentuj i uzupełnij ID świateł zdefiniowanych w pca9685.yaml + + # PCA9685 0x40 (A0=0 A1=0 A2=0 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x40_ch0 + # - light.turn_off: # pca_0x40_ch1..15 + + # PCA9685 0x41 (A0=1 A1=0 A2=0 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x41_ch0 + # - light.turn_off: # pca_0x41_ch1..15 + + # PCA9685 0x42 (A0=0 A1=1 A2=0 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x42_ch0 + # - light.turn_off: # pca_0x42_ch1..15 + + # PCA9685 0x43 (A0=1 A1=1 A2=0 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x43_ch0 + # - light.turn_off: # pca_0x43_ch1..15 + + # PCA9685 0x44 (A0=0 A1=0 A2=1 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x44_ch0 + # - light.turn_off: # pca_0x44_ch1..15 + + # PCA9685 0x45 (A0=1 A1=0 A2=1 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x45_ch0 + # - light.turn_off: # pca_0x45_ch1..15 + + # PCA9685 0x46 (A0=0 A1=1 A2=1 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x46_ch0 + # - light.turn_off: # pca_0x46_ch1..15 + + # PCA9685 0x47 (A0=1 A1=1 A2=1 A3=0 A4=0 A5=0) + # - light.turn_off: # pca_0x47_ch0 + # - light.turn_off: # pca_0x47_ch1..15 + + # PCA9685 0x48 (A0=0 A1=0 A2=0 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x48_ch0 + # - light.turn_off: # pca_0x48_ch1..15 + + # PCA9685 0x49 (A0=1 A1=0 A2=0 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x49_ch0 + # - light.turn_off: # pca_0x49_ch1..15 + + # PCA9685 0x4a (A0=0 A1=1 A2=0 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x4a_ch0 + # - light.turn_off: # pca_0x4a_ch1..15 + + # PCA9685 0x4b (A0=1 A1=1 A2=0 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x4b_ch0 + # - light.turn_off: # pca_0x4b_ch1..15 + + # PCA9685 0x4c (A0=0 A1=0 A2=1 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x4c_ch0 + # - light.turn_off: # pca_0x4c_ch1..15 + + # PCA9685 0x4d (A0=1 A1=0 A2=1 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x4d_ch0 + # - light.turn_off: # pca_0x4d_ch1..15 + + # PCA9685 0x4e (A0=0 A1=1 A2=1 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x4e_ch0 + # - light.turn_off: # pca_0x4e_ch1..15 + + # PCA9685 0x4f (A0=1 A1=1 A2=1 A3=1 A4=0 A5=0) + # - light.turn_off: # pca_0x4f_ch0 + # - light.turn_off: # pca_0x4f_ch1..15 + + # PCA9685 0x50 (A0=0 A1=0 A2=0 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x50_ch0 + # - light.turn_off: # pca_0x50_ch1..15 + + # PCA9685 0x51 (A0=1 A1=0 A2=0 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x51_ch0 + # - light.turn_off: # pca_0x51_ch1..15 + + # PCA9685 0x52 (A0=0 A1=1 A2=0 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x52_ch0 + # - light.turn_off: # pca_0x52_ch1..15 + + # PCA9685 0x53 (A0=1 A1=1 A2=0 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x53_ch0 + # - light.turn_off: # pca_0x53_ch1..15 + + # PCA9685 0x54 (A0=0 A1=0 A2=1 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x54_ch0 + # - light.turn_off: # pca_0x54_ch1..15 + + # PCA9685 0x55 (A0=1 A1=0 A2=1 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x55_ch0 + # - light.turn_off: # pca_0x55_ch1..15 + + # PCA9685 0x56 (A0=0 A1=1 A2=1 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x56_ch0 + # - light.turn_off: # pca_0x56_ch1..15 + + # PCA9685 0x57 (A0=1 A1=1 A2=1 A3=0 A4=1 A5=0) + # - light.turn_off: # pca_0x57_ch0 + # - light.turn_off: # pca_0x57_ch1..15 + + # PCA9685 0x58 (A0=0 A1=0 A2=0 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x58_ch0 + # - light.turn_off: # pca_0x58_ch1..15 + + # PCA9685 0x59 (A0=1 A1=0 A2=0 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x59_ch0 + # - light.turn_off: # pca_0x59_ch1..15 + + # PCA9685 0x5a (A0=0 A1=1 A2=0 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x5a_ch0 + # - light.turn_off: # pca_0x5a_ch1..15 + + # PCA9685 0x5b (A0=1 A1=1 A2=0 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x5b_ch0 + # - light.turn_off: # pca_0x5b_ch1..15 + + # PCA9685 0x5c (A0=0 A1=0 A2=1 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x5c_ch0 + # - light.turn_off: # pca_0x5c_ch1..15 + + # PCA9685 0x5d (A0=1 A1=0 A2=1 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x5d_ch0 + # - light.turn_off: # pca_0x5d_ch1..15 + + # PCA9685 0x5e (A0=0 A1=1 A2=1 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x5e_ch0 + # - light.turn_off: # pca_0x5e_ch1..15 + + # PCA9685 0x5f (A0=1 A1=1 A2=1 A3=1 A4=1 A5=0) + # - light.turn_off: # pca_0x5f_ch0 + # - light.turn_off: # pca_0x5f_ch1..15 + + # PCA9685 0x60 (A0=0 A1=0 A2=0 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x60_ch0 + # - light.turn_off: # pca_0x60_ch1..15 + + # PCA9685 0x61 (A0=1 A1=0 A2=0 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x61_ch0 + # - light.turn_off: # pca_0x61_ch1..15 + + # PCA9685 0x62 (A0=0 A1=1 A2=0 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x62_ch0 + # - light.turn_off: # pca_0x62_ch1..15 + + # PCA9685 0x63 (A0=1 A1=1 A2=0 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x63_ch0 + # - light.turn_off: # pca_0x63_ch1..15 + + # PCA9685 0x64 (A0=0 A1=0 A2=1 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x64_ch0 + # - light.turn_off: # pca_0x64_ch1..15 + + # PCA9685 0x65 (A0=1 A1=0 A2=1 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x65_ch0 + # - light.turn_off: # pca_0x65_ch1..15 + + # PCA9685 0x66 (A0=0 A1=1 A2=1 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x66_ch0 + # - light.turn_off: # pca_0x66_ch1..15 + + # PCA9685 0x67 (A0=1 A1=1 A2=1 A3=0 A4=0 A5=1) + # - light.turn_off: # pca_0x67_ch0 + # - light.turn_off: # pca_0x67_ch1..15 + + # PCA9685 0x68 (A0=0 A1=0 A2=0 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x68_ch0 + # - light.turn_off: # pca_0x68_ch1..15 + + # PCA9685 0x69 (A0=1 A1=0 A2=0 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x69_ch0 + # - light.turn_off: # pca_0x69_ch1..15 + + # PCA9685 0x6a (A0=0 A1=1 A2=0 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x6a_ch0 + # - light.turn_off: # pca_0x6a_ch1..15 + + # PCA9685 0x6b (A0=1 A1=1 A2=0 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x6b_ch0 + # - light.turn_off: # pca_0x6b_ch1..15 + + # PCA9685 0x6c (A0=0 A1=0 A2=1 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x6c_ch0 + # - light.turn_off: # pca_0x6c_ch1..15 + + # PCA9685 0x6d (A0=1 A1=0 A2=1 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x6d_ch0 + # - light.turn_off: # pca_0x6d_ch1..15 + + # PCA9685 0x6e (A0=0 A1=1 A2=1 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x6e_ch0 + # - light.turn_off: # pca_0x6e_ch1..15 + + # PCA9685 0x6f (A0=1 A1=1 A2=1 A3=1 A4=0 A5=1) + # - light.turn_off: # pca_0x6f_ch0 + # - light.turn_off: # pca_0x6f_ch1..15 + + # PCA9685 0x70 (A0=0 A1=0 A2=0 A3=0 A4=1 A5=1) # ZAREZERWOWANY (All Call) + # - light.turn_off: # pca_0x70_ch0 + # - light.turn_off: # pca_0x70_ch1..15 + + # PCA9685 0x71 (A0=1 A1=0 A2=0 A3=0 A4=1 A5=1) # ZAREZERWOWANY (Sub Call) + # - light.turn_off: # pca_0x71_ch0 + # - light.turn_off: # pca_0x71_ch1..15 + + # PCA9685 0x72 (A0=0 A1=1 A2=0 A3=0 A4=1 A5=1) # ZAREZERWOWANY (Sub Call) + # - light.turn_off: # pca_0x72_ch0 + # - light.turn_off: # pca_0x72_ch1..15 + + # PCA9685 0x73 (A0=1 A1=1 A2=0 A3=0 A4=1 A5=1) # ZAREZERWOWANY (Sub Call) + # - light.turn_off: # pca_0x73_ch0 + # - light.turn_off: # pca_0x73_ch1..15 + + # PCA9685 0x74 (A0=0 A1=0 A2=1 A3=0 A4=1 A5=1) + # - light.turn_off: # pca_0x74_ch0 + # - light.turn_off: # pca_0x74_ch1..15 + + # PCA9685 0x75 (A0=1 A1=0 A2=1 A3=0 A4=1 A5=1) + # - light.turn_off: # pca_0x75_ch0 + # - light.turn_off: # pca_0x75_ch1..15 + + # PCA9685 0x76 (A0=0 A1=1 A2=1 A3=0 A4=1 A5=1) + # - light.turn_off: # pca_0x76_ch0 + # - light.turn_off: # pca_0x76_ch1..15 + + # PCA9685 0x77 (A0=1 A1=1 A2=1 A3=0 A4=1 A5=1) + # - light.turn_off: # pca_0x77_ch0 + # - light.turn_off: # pca_0x77_ch1..15 + + # PCA9685 0x78 (A0=0 A1=0 A2=0 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x78_ch0 + # - light.turn_off: # pca_0x78_ch1..15 + + # PCA9685 0x79 (A0=1 A1=0 A2=0 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x79_ch0 + # - light.turn_off: # pca_0x79_ch1..15 + + # PCA9685 0x7a (A0=0 A1=1 A2=0 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x7a_ch0 + # - light.turn_off: # pca_0x7a_ch1..15 + + # PCA9685 0x7b (A0=1 A1=1 A2=0 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x7b_ch0 + # - light.turn_off: # pca_0x7b_ch1..15 + + # PCA9685 0x7c (A0=0 A1=0 A2=1 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x7c_ch0 + # - light.turn_off: # pca_0x7c_ch1..15 + + # PCA9685 0x7d (A0=1 A1=0 A2=1 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x7d_ch0 + # - light.turn_off: # pca_0x7d_ch1..15 + + # PCA9685 0x7e (A0=0 A1=1 A2=1 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x7e_ch0 + # - light.turn_off: # pca_0x7e_ch1..15 + + # PCA9685 0x7f (A0=1 A1=1 A2=1 A3=1 A4=1 A5=1) + # - light.turn_off: # pca_0x7f_ch0 + # - light.turn_off: # pca_0x7f_ch1..15 + + + # MCP23017 OUTPUT 0x20 (A2=0 A1=0 A0=0) + # - light.turn_off: mcp_0x20_out0 + # - light.turn_off: mcp_0x20_out1 + # - light.turn_off: mcp_0x20_out2 + # - light.turn_off: mcp_0x20_out3 + # - light.turn_off: mcp_0x20_out4 + # - light.turn_off: mcp_0x20_out5 + # - light.turn_off: mcp_0x20_out6 + # - light.turn_off: mcp_0x20_out7 + # - light.turn_off: mcp_0x20_out8 + # - light.turn_off: mcp_0x20_out9 + # - light.turn_off: mcp_0x20_out10 + # - light.turn_off: mcp_0x20_out11 + # - light.turn_off: mcp_0x20_out12 + # - light.turn_off: mcp_0x20_out13 + # - light.turn_off: mcp_0x20_out14 + # - light.turn_off: mcp_0x20_out15 + + # MCP23017 OUTPUT 0x21 (A2=0 A1=0 A0=1) + # - light.turn_off: mcp_0x21_out0 + # - light.turn_off: mcp_0x21_out1 + # - light.turn_off: mcp_0x21_out2 + # - light.turn_off: mcp_0x21_out3 + # - light.turn_off: mcp_0x21_out4 + # - light.turn_off: mcp_0x21_out5 + # - light.turn_off: mcp_0x21_out6 + # - light.turn_off: mcp_0x21_out7 + # - light.turn_off: mcp_0x21_out8 + # - light.turn_off: mcp_0x21_out9 + # - light.turn_off: mcp_0x21_out10 + # - light.turn_off: mcp_0x21_out11 + # - light.turn_off: mcp_0x21_out12 + # - light.turn_off: mcp_0x21_out13 + # - light.turn_off: mcp_0x21_out14 + # - light.turn_off: mcp_0x21_out15 + + # MCP23017 OUTPUT 0x22 (A2=0 A1=1 A0=0) + # - light.turn_off: mcp_0x22_out0 + # - light.turn_off: mcp_0x22_out1 + # - light.turn_off: mcp_0x22_out2 + # - light.turn_off: mcp_0x22_out3 + # - light.turn_off: mcp_0x22_out4 + # - light.turn_off: mcp_0x22_out5 + # - light.turn_off: mcp_0x22_out6 + # - light.turn_off: mcp_0x22_out7 + # - light.turn_off: mcp_0x22_out8 + # - light.turn_off: mcp_0x22_out9 + # - light.turn_off: mcp_0x22_out10 + # - light.turn_off: mcp_0x22_out11 + # - light.turn_off: mcp_0x22_out12 + # - light.turn_off: mcp_0x22_out13 + # - light.turn_off: mcp_0x22_out14 + # - light.turn_off: mcp_0x22_out15 + + # MCP23017 OUTPUT 0x23 (A2=0 A1=1 A0=1) + # - light.turn_off: mcp_0x23_out0 + # - light.turn_off: mcp_0x23_out1 + # - light.turn_off: mcp_0x23_out2 + # - light.turn_off: mcp_0x23_out3 + # - light.turn_off: mcp_0x23_out4 + # - light.turn_off: mcp_0x23_out5 + # - light.turn_off: mcp_0x23_out6 + # - light.turn_off: mcp_0x23_out7 + # - light.turn_off: mcp_0x23_out8 + # - light.turn_off: mcp_0x23_out9 + # - light.turn_off: mcp_0x23_out10 + # - light.turn_off: mcp_0x23_out11 + # - light.turn_off: mcp_0x23_out12 + # - light.turn_off: mcp_0x23_out13 + # - light.turn_off: mcp_0x23_out14 + # - light.turn_off: mcp_0x23_out15 + + # MCP23017 OUTPUT 0x24 (A2=1 A1=0 A0=0) + # - light.turn_off: mcp_0x24_out0 + # - light.turn_off: mcp_0x24_out1 + # - light.turn_off: mcp_0x24_out2 + # - light.turn_off: mcp_0x24_out3 + # - light.turn_off: mcp_0x24_out4 + # - light.turn_off: mcp_0x24_out5 + # - light.turn_off: mcp_0x24_out6 + # - light.turn_off: mcp_0x24_out7 + # - light.turn_off: mcp_0x24_out8 + # - light.turn_off: mcp_0x24_out9 + # - light.turn_off: mcp_0x24_out10 + # - light.turn_off: mcp_0x24_out11 + # - light.turn_off: mcp_0x24_out12 + # - light.turn_off: mcp_0x24_out13 + # - light.turn_off: mcp_0x24_out14 + # - light.turn_off: mcp_0x24_out15 + + # MCP23017 OUTPUT 0x25 (A2=1 A1=0 A0=1) + # - light.turn_off: mcp_0x25_out0 + # - light.turn_off: mcp_0x25_out1 + # - light.turn_off: mcp_0x25_out2 + # - light.turn_off: mcp_0x25_out3 + # - light.turn_off: mcp_0x25_out4 + # - light.turn_off: mcp_0x25_out5 + # - light.turn_off: mcp_0x25_out6 + # - light.turn_off: mcp_0x25_out7 + # - light.turn_off: mcp_0x25_out8 + # - light.turn_off: mcp_0x25_out9 + # - light.turn_off: mcp_0x25_out10 + # - light.turn_off: mcp_0x25_out11 + # - light.turn_off: mcp_0x25_out12 + # - light.turn_off: mcp_0x25_out13 + # - light.turn_off: mcp_0x25_out14 + # - light.turn_off: mcp_0x25_out15 + + # MCP23017 OUTPUT 0x26 (A2=1 A1=1 A0=0) + # - light.turn_off: mcp_0x26_out0 + # - light.turn_off: mcp_0x26_out1 + # - light.turn_off: mcp_0x26_out2 + # - light.turn_off: mcp_0x26_out3 + # - light.turn_off: mcp_0x26_out4 + # - light.turn_off: mcp_0x26_out5 + # - light.turn_off: mcp_0x26_out6 + # - light.turn_off: mcp_0x26_out7 + # - light.turn_off: mcp_0x26_out8 + # - light.turn_off: mcp_0x26_out9 + # - light.turn_off: mcp_0x26_out10 + # - light.turn_off: mcp_0x26_out11 + # - light.turn_off: mcp_0x26_out12 + # - light.turn_off: mcp_0x26_out13 + # - light.turn_off: mcp_0x26_out14 + # - light.turn_off: mcp_0x26_out15 + + # MCP23017 OUTPUT 0x27 (A2=1 A1=1 A0=1) + # - light.turn_off: mcp_0x27_out0 + # - light.turn_off: mcp_0x27_out1 + # - light.turn_off: mcp_0x27_out2 + # - light.turn_off: mcp_0x27_out3 + # - light.turn_off: mcp_0x27_out4 + # - light.turn_off: mcp_0x27_out5 + # - light.turn_off: mcp_0x27_out6 + # - light.turn_off: mcp_0x27_out7 + # - light.turn_off: mcp_0x27_out8 + # - light.turn_off: mcp_0x27_out9 + # - light.turn_off: mcp_0x27_out10 + # - light.turn_off: mcp_0x27_out11 + # - light.turn_off: mcp_0x27_out12 + # - light.turn_off: mcp_0x27_out13 + # - light.turn_off: mcp_0x27_out14 + # - light.turn_off: mcp_0x27_out15 + + - logger.log: + level: INFO + format: "off_all_lights executed" + + # ── Wyłącz wszystkie wentylatory ───────────────────────────────────────── + # Wentylatory to konkretne wyjścia MCP — odkomentuj i uzupełnij adresy + - id: off_all_fans + then: + # - light.turn_off: mcp_0x??_out? # Fan: + # - light.turn_off: mcp_0x??_out? # Fan: + - logger.log: + level: INFO + format: "off_all_fans executed" + + # ── WLED — Korytarz kinkiety ───────────────────────────────────────────── + # TODO: Zastąp logger rzeczywistym sterowaniem WLED przez MQTT lub HA + - id: wled_korytarz_kinkiety_toggle + then: + - logger.log: + level: INFO + format: "wled_korytarz_kinkiety_toggle — TODO" + + # ── WLED — Komin (toggle) ──────────────────────────────────────────────── + - id: wled_komin_toggle + then: + - logger.log: + level: INFO + format: "wled_komin_toggle — TODO" + + # ── WLED — Komin (on) ─────────────────────────────────────────────────── + - id: wled_komin_on + then: + - logger.log: + level: INFO + format: "wled_komin_on — TODO" + + # ── WLED — Salon kinkiety (toggle) ────────────────────────────────────── + - id: wled_salon_kinkiety_toggle + then: + - logger.log: + level: INFO + format: "wled_salon_kinkiety_toggle — TODO" + + # ── WLED — Salon kinkiety (off) ───────────────────────────────────────── + - id: wled_salon_kinkiety_off + then: + - logger.log: + level: INFO + format: "wled_salon_kinkiety_off — TODO" + + # ── WLED — Schody wszystkie ────────────────────────────────────────────── + - id: wled_schody_all_toggle + then: + - logger.log: + level: INFO + format: "wled_schody_all_toggle — TODO" + + # ── WLED — WC LED ──────────────────────────────────────────────────────── + - id: wled_wc_led_toggle + then: + - logger.log: + level: INFO + format: "wled_wc_led_toggle — TODO" + + # ── WLED — Salon wentylator ────────────────────────────────────────────── + - id: wled_salon_wentylator_toggle + then: + - logger.log: + level: INFO + format: "wled_salon_wentylator_toggle — TODO" diff --git a/packages/main_hub/status_led.yaml b/packages/main_hub/status_led.yaml new file mode 100644 index 0000000..107010d --- /dev/null +++ b/packages/main_hub/status_led.yaml @@ -0,0 +1,30 @@ +output: + - platform: ledc + id: output_blue + pin: 5 + - platform: ledc + id: output_green + pin: 14 + - platform: ledc + id: output_red + pin: 15 + +light: + - platform: rgb + name: "Status LED" + red: output_red + green: output_green + blue: output_blue + effects: + - pulse: + name: "Fast Pulse" + transition_length: 0.5s + update_interval: 0.5s + - pulse: + name: "Slow Pulse" + transition_length: 1s + update_interval: 1s + - random: + name: "Random Effect" + transition_length: 1s + update_interval: 2s