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

[wled] Abstract json api for better segment support #11509

Merged
merged 16 commits into from
Nov 20, 2021
Merged

Conversation

Skinah
Copy link
Contributor

@Skinah Skinah commented Nov 4, 2021

This PR changes to using the json API which has more features then the older http based API and gets better testing.
New features that the changes also bring:

  • Abstracting the API now allows older firmwares to continue working instead of forcing users to always match firmware to their openHAB core version requirement.
  • Far better support for segments.
  • New channels added for mirror, reverse and segment brightness.
  • Named presets are now supported.
  • TransformTime now presents a default list to choose from in the UI instead of requiring a user to create one.
  • Three colours are now supported.
  • Auto add/remove white channels so the extra channels are not seen for RGB users.

Precompiled jar found at link below or it can be installed via the marketplace:
http://pcmus.com/openhab/wled/
Due to new channels getting added, please delete and re-add the things if you use the UI. If you use textual things then no need to do that.

Signed-off-by: Matthew Skinner [email protected]

Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
@Skinah Skinah added the enhancement An enhancement or new feature for an existing add-on label Nov 4, 2021
@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/wled-binding-newer-json-api-beta/128405/1

Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Matthew Skinner <[email protected]>
@fwolter fwolter merged commit ec86311 into openhab:main Nov 20, 2021
@fwolter fwolter added this to the 3.2 milestone Nov 20, 2021
@Skinah Skinah deleted the wled branch December 15, 2021 09:20
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
* Change to json for states


Signed-off-by: Matthew Skinner <[email protected]>

* Add 3rd colours.


Signed-off-by: Matthew Skinner <[email protected]>

* Segments now mostly work


Signed-off-by: Matthew Skinner <[email protected]>

* changes to json api fully made


Signed-off-by: Matthew Skinner <[email protected]>

* Mirror and Reverse channels added.


Signed-off-by: Matthew Skinner <[email protected]>

* Remove old channels when needed.


Signed-off-by: Matthew Skinner <[email protected]>

* Simplify return

Signed-off-by: Matthew Skinner <[email protected]>

* Add support for named presets


Signed-off-by: Matthew Skinner <[email protected]>

* Dont add empty preset 0 to list


Signed-off-by: Matthew Skinner <[email protected]>

* Add preset saving with custom names


Signed-off-by: Matthew Skinner <[email protected]>

* Tidy up


Signed-off-by: Matthew Skinner <[email protected]>

* Rename function for clarity


Signed-off-by: Matthew Skinner <[email protected]>

* Add more channels

Signed-off-by: Matthew Skinner <[email protected]>

* Clean up


Signed-off-by: Matthew Skinner <[email protected]>

* Fix bugs and update readme for new channels


Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Nick Waterton <[email protected]>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this pull request Jan 9, 2022
* Change to json for states


Signed-off-by: Matthew Skinner <[email protected]>

* Add 3rd colours.


Signed-off-by: Matthew Skinner <[email protected]>

* Segments now mostly work


Signed-off-by: Matthew Skinner <[email protected]>

* changes to json api fully made


Signed-off-by: Matthew Skinner <[email protected]>

* Mirror and Reverse channels added.


Signed-off-by: Matthew Skinner <[email protected]>

* Remove old channels when needed.


Signed-off-by: Matthew Skinner <[email protected]>

* Simplify return

Signed-off-by: Matthew Skinner <[email protected]>

* Add support for named presets


Signed-off-by: Matthew Skinner <[email protected]>

* Dont add empty preset 0 to list


Signed-off-by: Matthew Skinner <[email protected]>

* Add preset saving with custom names


Signed-off-by: Matthew Skinner <[email protected]>

* Tidy up


Signed-off-by: Matthew Skinner <[email protected]>

* Rename function for clarity


Signed-off-by: Matthew Skinner <[email protected]>

* Add more channels

Signed-off-by: Matthew Skinner <[email protected]>

* Clean up


Signed-off-by: Matthew Skinner <[email protected]>

* Fix bugs and update readme for new channels


Signed-off-by: Matthew Skinner <[email protected]>
Signed-off-by: Michael Schmidt <[email protected]>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
* Change to json for states


Signed-off-by: Matthew Skinner <[email protected]>

* Add 3rd colours.


Signed-off-by: Matthew Skinner <[email protected]>

* Segments now mostly work


Signed-off-by: Matthew Skinner <[email protected]>

* changes to json api fully made


Signed-off-by: Matthew Skinner <[email protected]>

* Mirror and Reverse channels added.


Signed-off-by: Matthew Skinner <[email protected]>

* Remove old channels when needed.


Signed-off-by: Matthew Skinner <[email protected]>

* Simplify return

Signed-off-by: Matthew Skinner <[email protected]>

* Add support for named presets


Signed-off-by: Matthew Skinner <[email protected]>

* Dont add empty preset 0 to list


Signed-off-by: Matthew Skinner <[email protected]>

* Add preset saving with custom names


Signed-off-by: Matthew Skinner <[email protected]>

* Tidy up


Signed-off-by: Matthew Skinner <[email protected]>

* Rename function for clarity


Signed-off-by: Matthew Skinner <[email protected]>

* Add more channels

Signed-off-by: Matthew Skinner <[email protected]>

* Clean up


Signed-off-by: Matthew Skinner <[email protected]>

* Fix bugs and update readme for new channels


Signed-off-by: Matthew Skinner <[email protected]>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* Change to json for states


Signed-off-by: Matthew Skinner <[email protected]>

* Add 3rd colours.


Signed-off-by: Matthew Skinner <[email protected]>

* Segments now mostly work


Signed-off-by: Matthew Skinner <[email protected]>

* changes to json api fully made


Signed-off-by: Matthew Skinner <[email protected]>

* Mirror and Reverse channels added.


Signed-off-by: Matthew Skinner <[email protected]>

* Remove old channels when needed.


Signed-off-by: Matthew Skinner <[email protected]>

* Simplify return

Signed-off-by: Matthew Skinner <[email protected]>

* Add support for named presets


Signed-off-by: Matthew Skinner <[email protected]>

* Dont add empty preset 0 to list


Signed-off-by: Matthew Skinner <[email protected]>

* Add preset saving with custom names


Signed-off-by: Matthew Skinner <[email protected]>

* Tidy up


Signed-off-by: Matthew Skinner <[email protected]>

* Rename function for clarity


Signed-off-by: Matthew Skinner <[email protected]>

* Add more channels

Signed-off-by: Matthew Skinner <[email protected]>

* Clean up


Signed-off-by: Matthew Skinner <[email protected]>

* Fix bugs and update readme for new channels


Signed-off-by: Matthew Skinner <[email protected]>
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
* Change to json for states


Signed-off-by: Matthew Skinner <[email protected]>

* Add 3rd colours.


Signed-off-by: Matthew Skinner <[email protected]>

* Segments now mostly work


Signed-off-by: Matthew Skinner <[email protected]>

* changes to json api fully made


Signed-off-by: Matthew Skinner <[email protected]>

* Mirror and Reverse channels added.


Signed-off-by: Matthew Skinner <[email protected]>

* Remove old channels when needed.


Signed-off-by: Matthew Skinner <[email protected]>

* Simplify return

Signed-off-by: Matthew Skinner <[email protected]>

* Add support for named presets


Signed-off-by: Matthew Skinner <[email protected]>

* Dont add empty preset 0 to list


Signed-off-by: Matthew Skinner <[email protected]>

* Add preset saving with custom names


Signed-off-by: Matthew Skinner <[email protected]>

* Tidy up


Signed-off-by: Matthew Skinner <[email protected]>

* Rename function for clarity


Signed-off-by: Matthew Skinner <[email protected]>

* Add more channels

Signed-off-by: Matthew Skinner <[email protected]>

* Clean up


Signed-off-by: Matthew Skinner <[email protected]>

* Fix bugs and update readme for new channels


Signed-off-by: Matthew Skinner <[email protected]>
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.

3 participants