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

[neohub] Workaround for 'Legacy API Disabled' problem #12906

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Jun 7, 2022

Background

From early 2022 Heatmiser introduced NeoHub firmware that has the ability to enable / disable the NeoHub portNumber 4242. If this port is disabled the OpenHAB binding cannot connect and the binding will report a "Connection Refused" warning in the log. In prior firmware versions the port was always enabled. But in the new firmware the port is initially enabled on power up but if no communication occurs for 48 hours it is automatically disabled. Alternatively the Heatmiser mobile App has a setting (Settings | System | API Access | Legacy API Enable | On) whereby the port can be permanently enabled.

Solution

In this PR when the handler initialize() method is called, we try to 'ping' the NeoHub. And if the ping fails with "Connection Refused" it sets the Bridge status as offline / configuration error, with a message to consult the readme, and also writes a warning message in the log to say the same. And a chapter has been added to the readme to explain how to resolve the issue.

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg added the enhancement An enhancement or new feature for an existing add-on label Jun 7, 2022
@andrewfg andrewfg requested a review from kaikreuzer June 7, 2022 21:48
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM

@lolodomo lolodomo merged commit e24ca57 into openhab:main Jun 8, 2022
@lolodomo lolodomo added this to the 3.3 milestone Jun 8, 2022
@andrewfg
Copy link
Contributor Author

andrewfg commented Jun 8, 2022

@lolodomo many thanks for merging this PR :) -- just for info, probably motivated by my posts on their developer portal, Heatmiser uploaded their API specification v3.0 today. In it, they announced an additional authenticated / encrypted connection channel to their hubs. I have just created #12909 to describe it. And I am starting work on the binding development to implement it now. But in the meantime this PR, just merged, is the official work around.

leifbladt pushed a commit to leifbladt/openhab-addons that referenced this pull request Oct 15, 2022
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Nov 12, 2022
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants