luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

controlling rf light switches with homebridge #28

Closed stredwizard closed 4 years ago

stredwizard commented 6 years ago

hi i have an issue although it may be a limitation rather than anythign else.

i have 3 rf light switches and 3 rf mains plugs in my home, they all work off a pi configured with homebridge, they work on and off beautifully within homekit.

but if i switch a light on leave the app, re-enter the app the light briefly appears still on in the app before updating to off, i know there is no two way comms between the switch and the pi/homebridge, but surely if its on when you leave the app its should stay on when re-entering.

below is my config.json

{ "bridge": { "name": "HomebridgePi", "username": "CC:22:3D:E3:CE:31", "port": 51827, "pin": "031-45-154" },

"platforms": [
    {
            "platform": "Nest",

            "token" : "c.0e5aVcFLjhosBLqHrROREcM2YyTz3OAayfXxJr1PHHDPrkWZhq5SyuTalbjqjeH8FWDnjQWGdIFywJOEB0clrC5gBsuH9Y9ASCLfMDcfXLfCkOlp808fwhNeoZgWsc2mAsxZRAV6eGQTodEE",

            "clientId": "3901b87a-9837-44c4-8bb5-e4cc4eb93860",
            "clientSecret": "C3PIHynvO0lRAptZnFo90GpdM",
            "code": "WWW3LWSW",

            "username" : "username",
            "password" : "password"
    },

{ "platform": "cmdSwitch2", "switches": [{

                            "name": "Boys Light",
                            "state_cmd": "/var/www/rfoutlet/codesend 0 | grep -i 'bogus'",
                            "on_cmd": "sleep .2 && /var/www/rfoutlet/codesend 13684101",
                            "off_cmd": "sleep .2 && /var/www/rfoutlet/codesend 13684102"
                    }, {

                            "name": "Evas Light",
                            "state_cmd": "/var/www/rfoutlet/codesend 0 | grep -i 'bogus'",
                            "on_cmd": "sleep .4 && /var/www/rfoutlet/codesend 13684103",
                            "off_cmd": "sleep .4 && /var/www/rfoutlet/codesend 13684104"
                    }, {

                            "name": "Bedroom Light",
                            "state_cmd": "/var/www/rfoutlet/codesend 0 | grep -i 'bogus'",
                            "on_cmd": "sleep .6 && /var/www/rfoutlet/codesend 13684209",
                            "off_cmd": "sleep .6 && /var/www/rfoutlet/codesend 13684212"
                    }, {
                            "name": "Lounge Light",
                            "state_cmd": "/var/www/rfoutlet/codesend 0 | grep -i 'bogus'",
                            "on_cmd": "/var/www/rfoutlet/codesend 1398531",
                            "off_cmd": "/var/www/rfoutlet/codesend 1398540"
            }, {

                            "name": "Evas Fairy Lights",
                            "state_cmd": "/var/www/rfoutlet/codesend 0  | grep -i 'bogus'",
                            "on_cmd": "sleep .8 && /var/www/rfoutlet/codesend 1398211",
                            "off_cmd": "sleep .8 && /var/www/rfoutlet/codesend 1398220"
                    }]
            }
]

}

im running the ios11 beta, but my partner is still on ios 10 and the issue is still the same.

appreciate any help.

stred