scorpionmit01 / homebridge-jewish-calendar

Homebridge Plugin that provides contact sensors related to the Jewish Calendar.
MIT License
3 stars 3 forks source link

this is awesome! #2

Closed moshed closed 3 years ago

moshed commented 3 years ago

just wanted to say thanks! this plugin is awesome!

gonna try to hook this up to not allow my motion sensors to turn on lights when its kodesh

scorpionmit01 commented 3 years ago

Awesome!

I recommend Eve or Home+ for Programming/Editing the rules, both have much better handling of values.

Sent from my iPhone

On Jan 20, 2021, at 3:05 AM, moshed notifications@github.com wrote:

 just wanted to say thanks! this plugin is awesome!

gonna try to hook this up to not allow my motion sensors to turn on lights when its kodesh

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

moshed commented 3 years ago

I have tried both and its a pain that you have to make everything a scene. im going to try my hand at node-red and see if that can do what I need

scorpionmit01 commented 3 years ago

Agreed. I ended up making everything a scene in Home (because I can include HomePod rules) and a rule in Eve.

I think Home has gotten better with the new release.

Best of luck and let me know what you end up doing!

Sent from my iPhone

On Jan 20, 2021, at 11:49 AM, moshed notifications@github.com wrote:

 I have tried both and its a pain that you have to make everything a scene. im going to try my hand at node-red and see if that can do what I need

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

moshed commented 3 years ago

home is pretty good now but it doesn't support multiple triggers with and/or functionality, which is really holding it back.

ill let you know how it goes!

scorpionmit01 commented 3 years ago

Which is why is use it and build scenes but do most of my programming in Eve.

Sent from my iPhone

On Jan 20, 2021, at 6:03 PM, moshed notifications@github.com wrote:

 home is pretty good now but it doesn't support multiple triggers with and/or functionality, which is really holding it back.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

moshed commented 3 years ago

I think I finally figured out how to accomplish this in nod-red with node-red gate if anyone else was curious. below is the code and screenshot of the flow

image

to quickly describe the above, the flow does as follows;

  1. check if kodesh sensor is active

  2. use the switch action as an IF statement to check if kodesh is open.

  3. if kodesh is open close gate

  4. use the switch action as an IF statement to check if motion in living room Is detected

  5. attempt to send message to turn on entryway pendant and kitchen counter lights through gate. if the gate was closed by kodesh this message is ignored

I can only imagine this is not the most efficient way to do this as im just learning but wow is node-red powerful.


[
    {
        "id": "2b8e1008.cf9cd8",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "e2f83318.9d0c2",
        "type": "hb-event",
        "z": "2b8e1008.cf9cd8",
        "name": "Living Room",
        "Homebridge": "Homebridge 59FA",
        "Manufacturer": "Ring",
        "Service": "Motion Sensor",
        "device": "Homebridge 59FA0E:D5:B5:9C:5A:65RingLiving Room00000085",
        "conf": "28ee9017.59d728",
        "x": 250,
        "y": 560,
        "wires": [
            [
                "78034bd6.bc1724"
            ]
        ]
    },
    {
        "id": "7a3cfff.a0da6",
        "type": "hb-control",
        "z": "2b8e1008.cf9cd8",
        "name": "Overhead",
        "Homebridge": "Homebridge 59FA",
        "Manufacturer": "Tasmota",
        "Service": "Switch",
        "device": "Homebridge 59FA0E:D5:B5:9C:5A:65TasmotaOverhead00000049",
        "conf": "28ee9017.59d728",
        "outputs": 0,
        "x": 780,
        "y": 500,
        "wires": []
    },
    {
        "id": "5642016b.413718",
        "type": "hb-status",
        "z": "2b8e1008.cf9cd8",
        "name": "Kodesh",
        "Homebridge": "Homebridge 59FA",
        "Manufacturer": "Alex Hochberger",
        "Service": "Contact Sensor",
        "device": "Homebridge 59FA0E:D5:B5:9C:5A:65Alex HochbergerKodesh00000080",
        "conf": "28ee9017.59d728",
        "x": 220,
        "y": 440,
        "wires": [
            [
                "8a88c98f.e377b"
            ]
        ]
    },
    {
        "id": "aab04288.fae85",
        "type": "inject",
        "z": "2b8e1008.cf9cd8",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "x": 90,
        "y": 420,
        "wires": [
            [
                "5642016b.413718"
            ]
        ]
    },
    {
        "id": "8a88c98f.e377b",
        "type": "switch",
        "z": "2b8e1008.cf9cd8",
        "name": "",
        "property": "payload.ContactSensorState",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 350,
        "y": 460,
        "wires": [
            [
                "bdc01507.f7295"
            ]
        ]
    },
    {
        "id": "d8e6f236.c0176",
        "type": "gate",
        "z": "2b8e1008.cf9cd8",
        "name": "",
        "controlTopic": "control",
        "defaultState": "open",
        "openCmd": "open",
        "closeCmd": "close",
        "toggleCmd": "toggle",
        "defaultCmd": "default",
        "statusCmd": "status",
        "persist": false,
        "x": 650,
        "y": 500,
        "wires": [
            [
                "7a3cfff.a0da6"
            ]
        ]
    },
    {
        "id": "bdc01507.f7295",
        "type": "change",
        "z": "2b8e1008.cf9cd8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "control",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "close",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 500,
        "y": 480,
        "wires": [
            [
                "d8e6f236.c0176"
            ]
        ]
    },
    {
        "id": "69ffff00.5f9a4",
        "type": "change",
        "z": "2b8e1008.cf9cd8",
        "name": "change",
        "rules": [
            {
                "t": "delete",
                "p": "payload",
                "pt": "msg"
            },
            {
                "t": "set",
                "p": "payload.On",
                "pt": "msg",
                "to": "true",
                "tot": "json"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 520,
        "y": 520,
        "wires": [
            [
                "d8e6f236.c0176"
            ]
        ]
    },
    {
        "id": "78034bd6.bc1724",
        "type": "switch",
        "z": "2b8e1008.cf9cd8",
        "name": "",
        "property": "payload.MotionDetected",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 390,
        "y": 540,
        "wires": [
            [
                "69ffff00.5f9a4"
            ]
        ]
    },
    {
        "id": "28ee9017.59d728",
        "type": "hb-conf",
        "username": "687-68-718"
    }
]