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

Interrupt support for raspberry module with bouncetime #79

Merged
merged 36 commits into from
Jan 24, 2020
Merged

Interrupt support for raspberry module with bouncetime #79

merged 36 commits into from
Jan 24, 2020

Conversation

BenjiU
Copy link
Collaborator

@BenjiU BenjiU commented Jan 5, 2020

So, here is support for interrupts on raspberry pi module. This should fix #5 and #48

  1. configure the interrupt in the config file (interrupt OR polling (default) mode)
  2. interrupt is registered on raspberry pi module
  3. raspberry pi module stores gpio_interrupt_callback callback function
  4. gpio_interrupt_callback is called on interrupt
  5. mqtt message is send
  • I created a lot of pytest functions for me, some need a hardware modification (gpioX connected to gpioY). I described that in the text. Not sure, if you would like to have this on the repo or not. But they did great work durring developing :-) (But the hardware tests are disabled normally!)
  • for yml verification tests, I had to change the "main" function: its now callable like a normal function, when tests use the whole program for tests. For this i had to add some "global" variables as parameters in functions, e.g.
    -- topic_prefix - not always, in mqtt callbacks its still global
    -- _LOG (I now need a basic initialization, if xml parsing fails)

Currently i've running it in my home: half the switches with polling, the others with interrupts. There are no problems.

Benji and others added 30 commits January 21, 2019 20:45
Adding sensor interface and LM75 i2c sensor support
Co-Authored-By: BenjiU <46675043+BenjiU@users.noreply.github.com>
Co-Authored-By: BenjiU <46675043+BenjiU@users.noreply.github.com>
Co-Authored-By: BenjiU <46675043+BenjiU@users.noreply.github.com>
Co-Authored-By: BenjiU <46675043+BenjiU@users.noreply.github.com>
Co-Authored-By: BenjiU <46675043+BenjiU@users.noreply.github.com>
Co-Authored-By: BenjiU <46675043+BenjiU@users.noreply.github.com>
@flyte
Copy link
Owner

flyte commented Jan 24, 2020

Wow, this is amazing work! I can only apologise that I haven't seen it until now.

I've had a cursory look over the changes, and I'm going to merge it with a degree of trust that everything works as you say. I can see that there are some other PRs on the go as well, so I'll likely review and merge those as appropriate and then spend some time properly going through manual tests myself before cutting a new version. I'm quite wary to avoid carelessly breaking people's installs, since quite a number of people use this project now.

I'd like to add you as a collaborator on this repo, if you think that'd be helpful? If so, let's chat on Gitter at some point to establish some better release processes etc.

@flyte flyte merged commit 74e1f44 into flyte:develop Jan 24, 2020
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.

Use interrupts where possible.
2 participants