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] Add support for WebSocket connection to hub #12915

Merged
merged 16 commits into from
Aug 1, 2022

Conversation

andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Jun 10, 2022

Fixes #12909
Fixes #12899

As described in #12909 the manufacturer Heatmiser has implemented a new way of connecting to NeoHubs by means of a secure WSS web socket connection. This is in addition to the existing non-secure TCP socket connection.

This PR adds support for the OH binding to connect via such a web socket.

The web socket connection requires an additional configuration parameter apiToken. Such tokens have to be created by the user for each hub on their Heatmiser mobile App. The read me explains how to do this.

The support for the existing non-secure TCP socket connection is not removed. However if users want to continue using it, they now need to enable that via the Heatmiser mobile App. The read me already explains how to do this.

Note that #12909 also mentions that Heatmiser introduced a new way of discovering hubs on the LAN. However this has not been implemented, since the prior implemented method of discovery still works.

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 10, 2022
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/neohub-binding-error-connecting-to-my-neohub-2nd-generation/129948/10

@andrewfg andrewfg requested a review from a team June 21, 2022 14:39
@andrewfg andrewfg marked this pull request as draft June 28, 2022 07:51
andrewfg added 2 commits June 28, 2022 14:13
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg marked this pull request as ready for review June 28, 2022 13:24
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Thanks, nice improvement! Some quick feedback provided.

andrewfg added 2 commits July 28, 2022 17:45
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg added the rebuild Triggers Jenkins PR build label Jul 28, 2022
andrewfg added 3 commits July 28, 2022 18:09
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg removed the rebuild Triggers Jenkins PR build label Jul 28, 2022
@andrewfg andrewfg requested a review from jlaur July 28, 2022 17:19
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg requested a review from jlaur July 31, 2022 15:03
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@jlaur jlaur merged commit f60e324 into openhab:main Aug 1, 2022
@jlaur jlaur added this to the 3.4 milestone Aug 1, 2022
@andrewfg andrewfg deleted the neohub-wss branch August 2, 2022 11:35
leifbladt pushed a commit to leifbladt/openhab-addons that referenced this pull request Oct 15, 2022
* [neohub] add support for secure web socket connection
* [neohub] clean code
* [neohub] synchronize api calls
* [neohub] rename classes, fix compiler errors, remove SuppressWarnings

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
* [neohub] add support for secure web socket connection
* [neohub] clean code
* [neohub] synchronize api calls
* [neohub] rename classes, fix compiler errors, remove SuppressWarnings

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
* [neohub] add support for secure web socket connection
* [neohub] clean code
* [neohub] synchronize api calls
* [neohub] rename classes, fix compiler errors, remove SuppressWarnings

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
* [neohub] add support for secure web socket connection
* [neohub] clean code
* [neohub] synchronize api calls
* [neohub] rename classes, fix compiler errors, remove SuppressWarnings

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
* [neohub] add support for secure web socket connection
* [neohub] clean code
* [neohub] synchronize api calls
* [neohub] rename classes, fix compiler errors, remove SuppressWarnings

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.

[neohub] Add support for WebSocket connection to hub [neohub] Add support for "new" API
3 participants