rfoutlet
rfoutlet copied to clipboard
Support GET Requests, Update RCSwitch, Separate Configuration File, Up to 10 Outlets, Homebridge-HTTP Support, Status Tracking
- Update RCSwitch
- New sniffer utility
- Remove old files
- Place configuration into its own file for easier editing
- Support for GET requests
- Add a shared mutex lock for codesend which allows proper use with fast simultaneous HTTP requests as HomeBridge would do when you ask Siri to "Turn On All the Lights". This also allows for the removal of the delay when toggling all outlets at once in the web interface.
- Support status tracking for Homebridge-HTTP and other systems
- Support up to 10 outlets
- Better handling of the 'All' toggle case
Hi @marcetcheverry, I have RFOutlet installed together with HAP-Node js and having problems activating multiple outlets at the same time, as you discribe in your pull request. I have been trying to copy your new files and changes, but I cannot get it to work. I am not using http requests to call codesend but rather a childprocess directly from within the accessory, so maybe that is a problem. If you could give me any assistance that would be greatly appreciated! Best regards, blefjell
@blefjell I don't think this is the right place to ask for that kind of support. That sounds like an issue with HAP-Node. My solution is agnostic to whatever system you use and only adds support for calling codesend repeatedly quickly. I chose to use HomeBridge over HTTP. Maybe try that.
Please note that HomeKit (or Homebridge) at least, does require status tracking of the outlets on the server side to work 100% properly. I have created a solution for that, and I have updated this pull request to include the sample configuration file.
@marcetcheverry Thank you for the quick response. I am sorry, for asking in the wrong place. I am totally new to github and was not sure, where I should ask. However I have figured out, how your mutex lock can work for me. My error was the way I called 'codesend', which seemed to have changed in your version. I am not sure what you mean with server side status tracking, but as it stands I do not have any problems. Thanks again for your help and work on the mutex lock!!
That is correct, the mutex lock serializes access to the hardware which can only send one signal at a time. It allows third parties to execute multiple codesend instances simultaneously (example "Hey Siri, turn off all the lights").
Server side status tracking helps HomeKit know if the lights are on or off. At least Homebridge does polling to know what the status of the light is, as it may be turned of and on by other sources than Homekit (or even another Homekit device). As of now, I have not implemented support for tracking status with a 433 receiving chip, but that is the next step as it allows you to use your remote and HomeKit simultaneously while keeping proper track of status.
As it stands right now Homekit does not have support for "toggle" "write only" lights, it keeps track of status.