这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@msteiger
Copy link

@msteiger msteiger commented Sep 11, 2022

Description

By default, the GPIO output pins are OFF. Using the "invert" flag, the behavior is changed so that the default state is ON. This works fine unless the service is restarted. On startup, the GPIO values are not set to ON despite the inverted flag being set.

This PR fixes that problem by setting the value in the constructor.

Maybe @nils-bauer or @SloCompTech could review and/or test a bit?

This might also be a fix for issue #11296.

Signed-off-by: Martin Steiger <git@martin-steiger.de>
}
this.gpio = new GPIO(jPigpio, gpioId, JPigpio.PI_OUTPUT);
if (configuration.invert) {
updateStatus.accept(OnOffType.ON);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this line be added ? Because inverted means that pin should be by default in state 1, but this means OFF not ON, because it is inverted .

Copy link
Author

Choose a reason for hiding this comment

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

Good point, I'm not sure on this on either. Maybe not setting updateStatus would be the correct thing to do. What do you think @nils-bauer ?

Copy link
Contributor

@lsiepel lsiepel Mar 26, 2023

Choose a reason for hiding this comment

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

As 6 months have passsed, is this properly addressed ?

Copy link
Author

Choose a reason for hiding this comment

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

I was hoping that this entire PR could be replaced with #13643 and still keep my fingers crossed that it will be merged over the next days.

@msteiger
Copy link
Author

Could someone review this, please?

@lolodomo
Copy link
Contributor

lolodomo commented Sep 25, 2022

Could someone review this, please?

As I can see, this was already reviewed and there is still an open point. We need the feedback from the binding maintainer @nils-bauer . I have myself not the response to the opened question.

@nils-bauer
Copy link
Member

Hi all together,
sorry for the late response, I have a lot on my plate right now (university and work...).
@jeremyrumpf is also working on an update for this addon too (see forum, I haven't tested it yet but it could be relevant here.
In order to give you a meaningful review, I need to look into it a bit deeper and test it in my lab setup. Sadly, I won't have the time to do this before the end of October.

@msteiger
Copy link
Author

Any chance you could review this soon?

@nils-bauer
Copy link
Member

Hopefully end of October/start of November.

@jeremyrumpf
Copy link
Contributor

jeremyrumpf commented Oct 19, 2022 via email

@lolodomo lolodomo added the bug An unexpected problem or unintended behavior of an add-on label Oct 20, 2022
jeremyrumpf pushed a commit to jeremyrumpf/openhab-addons that referenced this pull request Nov 2, 2022
…ality.

* Add the ability to recover from network disconnects to pigpiod.
* Provide actions to what the binding does on pigpiod connect/disconnect/reconnect.
* Provide the ability to pulse outputs in a one-shot/momentary fashion.
* Provide edge level configuration for gpio outputs.

Workaround: openhab#11039
Fixes:      openhab#11038
Fixes:      openhab#13376
jeremyrumpf pushed a commit to jeremyrumpf/openhab-addons that referenced this pull request Nov 5, 2022
…ality.

* Add the ability to recover from network disconnects to pigpiod.
* Provide actions to what the binding does on pigpiod connect/disconnect/reconnect.
* Provide the ability to pulse outputs in a one-shot/momentary fashion.
* Provide edge level configuration for gpio outputs.

Workaround: openhab#11039
Fixes:      openhab#11038
Fixes:      openhab#13376
Signed-off-by: Jeremy Rumpf <rumpf.99@gmail.com>
@msteiger
Copy link
Author

Hey guys, any updates on this one? It would be great to have this issue fixed.

Maybe even better to fully replace the implementation with that of @jeremyrumpf but that seems to be a bigger project.

@jeremyrumpf
Copy link
Contributor

jeremyrumpf commented Dec 21, 2022 via email

@msteiger
Copy link
Author

Looks good to me! There seems to be a merge conflict which needs to be resolved before it can be integrated.

@jeremyrumpf
Copy link
Contributor

I will say learning the continuous integration and workflows has been pretty fun. I believe i have the conflicts resolved against 4.0.0-SNAPSHOT.

@lsiepel lsiepel added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Mar 26, 2023
@jlaur jlaur closed this in b24f3a2 Oct 30, 2023
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Nov 26, 2023
openhab#13643)

* [GPIO] Update the GPIO binding to fix issues and provide new functionality.

* Add the ability to recover from network disconnects to pigpiod.
* Provide actions to what the binding does on pigpiod connect/disconnect/reconnect.
* Provide the ability to pulse outputs in a one-shot/momentary fashion.
* Provide edge level configuration for gpio outputs.
* Fix automated style checks.
* Attempt to squash jenkins build warnings/errors.
* Correct Null annotations and adjust log levels in certain areas.
* Fix bracing per checkstyle review.
* Normalize gpiod/pigpiod to pigpiod. openhab/openHAB normalized to OpenHAB.
* Fix a copy/paste error. Output channels should not be referred as input. Attempt to clarify plurals.
* Convert strings to defined constants.
* Convert pulse command strings to binding constants.
* Java17 instanceof pattern matching.
* Nit, fix missed pulse command string to binding constant.
* Add missing quotes in demo.things file definition.

Workaround openhab#11039
Fixes openhab#11038
Fixes openhab#13376

Signed-off-by: Jeremy Rumpf <rumpf.99@gmail.com>
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
openhab#13643)

* [GPIO] Update the GPIO binding to fix issues and provide new functionality.

* Add the ability to recover from network disconnects to pigpiod.
* Provide actions to what the binding does on pigpiod connect/disconnect/reconnect.
* Provide the ability to pulse outputs in a one-shot/momentary fashion.
* Provide edge level configuration for gpio outputs.
* Fix automated style checks.
* Attempt to squash jenkins build warnings/errors.
* Correct Null annotations and adjust log levels in certain areas.
* Fix bracing per checkstyle review.
* Normalize gpiod/pigpiod to pigpiod. openhab/openHAB normalized to OpenHAB.
* Fix a copy/paste error. Output channels should not be referred as input. Attempt to clarify plurals.
* Convert strings to defined constants.
* Convert pulse command strings to binding constants.
* Java17 instanceof pattern matching.
* Nit, fix missed pulse command string to binding constant.
* Add missing quotes in demo.things file definition.

Workaround openhab#11039
Fixes openhab#11038
Fixes openhab#13376

Signed-off-by: Jeremy Rumpf <rumpf.99@gmail.com>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants