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

No way to handle a SEL pin that's just tied to a pullup or pulldown #5

Open
xoseperez opened this issue Feb 1, 2018 · 2 comments
Open
Labels
bug Something isn't working major

Comments

@xoseperez
Copy link
Owner

Originally reported by: pjz (Bitbucket: pjz, GitHub: pjz)


There's not a good way to use this library with a SEL pin that's not tied to a GPIO.

@xoseperez
Copy link
Owner Author

Original comment by pjz (Bitbucket: pjz, GitHub: pjz):


I presented you with my first PR ( https://bitbucket.org/xoseperez/hlw8012/pull-requests/2 ), but you wanted a different API than I proposed. I tried to fix it in another PR ( https://bitbucket.org/xoseperez/hlw8012/pull-requests/3 ) but you again expressed dissatisfaction with that API. Could you please present an API you'd be happy with, and I'd be happy to write the code for it? I'd like to get this fixed.

@NdK73
Copy link

NdK73 commented May 28, 2019

Just found a nice device that uses hardwired SEL and ignores CF1: shelly1pf (from shelly.cloud ).
What about just passing an invalid pin (42? :) ) as CF1 pin and SEL pin? Should require minimal changes. Obviously some methods will be useless: is it better to return 'invalid' values or an exception?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

2 participants