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

Add HAP doorbell input type #495

Merged
merged 2 commits into from
Feb 14, 2021
Merged

Add HAP doorbell input type #495

merged 2 commits into from
Feb 14, 2021

Conversation

zeevox
Copy link
Contributor

@zeevox zeevox commented Feb 12, 2021

  • Refactored out bulk of stateless_switch into stateless_switch_base to avoid code duplication
  • Added simple doorbell service based on stateless_switch_base
  • Fix Doorbell #375

@andyblac
Copy link
Collaborator

@zeevox this should help with adding #74 correct ? stateless base i mean

@zeevox
Copy link
Contributor Author

zeevox commented Feb 12, 2021

@andyblac from what I gather that issue is about a dummy switch that persists state. This is a stateless switch so I don't see how it would fit in with the example they provided, but perhaps I didn't understand correctly?

@andyblac
Copy link
Collaborator

andyblac commented Feb 12, 2021

ah, ye, ignore me, must be half a sleep, been long day 😄

Copy link
Contributor

@rojer rojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly looks good, see a few comments inline.
also, please add copyright blurb to new files (i made them generic)
and run "make format" to make sure formatting is in order (would be nice to add to github action as well).

src/shelly_hap_doorbell.cpp Outdated Show resolved Hide resolved
src/shelly_hap_doorbell.cpp Show resolved Hide resolved
src/shelly_hap_doorbell.cpp Outdated Show resolved Hide resolved
src/shelly_hap_doorbell.cpp Outdated Show resolved Hide resolved
src/shelly_hap_doorbell.hpp Outdated Show resolved Hide resolved
src/shelly_hap_input.cpp Outdated Show resolved Hide resolved
* Refactor out SSW into stateless_switch_base so that both doorbell and
  ssw inherit from the base class

Signed-off-by: Timothy Langer <[email protected]>
Copy link
Contributor

@rojer rojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one minor nit

fs_src/script.js Outdated Show resolved Hide resolved
fs_src/script.js Outdated Show resolved Hide resolved
Signed-off-by: Timothy Langer <[email protected]>
@rojer rojer merged commit 20f6ce0 into mongoose-os-apps:master Feb 14, 2021
@rojer
Copy link
Contributor

rojer commented Feb 14, 2021

very good, thank you!

@zeevox zeevox deleted the doorbell branch February 14, 2021 16:10
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.

Doorbell
3 participants