Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GET Requests, Update RCSwitch, Separate Configuration File, Up to 10 Outlets, Homebridge-HTTP Support, Status Tracking #5

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

marcetcheverry
Copy link

@marcetcheverry marcetcheverry commented Oct 15, 2017

  1. Update RCSwitch
  2. New sniffer utility
  3. Remove old files
  4. Place configuration into its own file for easier editing
  5. Support for GET requests
  6. 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.
  7. Support status tracking for Homebridge-HTTP and other systems
  8. Support up to 10 outlets
  9. Better handling of the 'All' toggle case

@blefjell
Copy link

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

@marcetcheverry
Copy link
Author

marcetcheverry commented Jan 16, 2018

@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 marcetcheverry changed the title Support GET Requests, Update RCSwitch, Separate Configuration File Support GET Requests, Update RCSwitch, Separate Configuration File, 10 Outlets, Homebridge support, Status tracking Jan 16, 2018
@marcetcheverry marcetcheverry changed the title Support GET Requests, Update RCSwitch, Separate Configuration File, 10 Outlets, Homebridge support, Status tracking Support GET Requests, Update RCSwitch, Separate Configuration File, Up to 10 Outlets, Homebridge-HTTP Support, Status Tracking Jan 16, 2018
@blefjell
Copy link

@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!!

@marcetcheverry
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants