* [nanoleaf] More robust caching of layout
This is a bugfix/enhancement to make sure the caching of the layout
(to save it from being recalculated) works better:
- Only save previous layout if indeed painted
- Only save layout from the layout update, not the display state
- Recalculate anyway if current state is null
* Bugfix: Update colors
When Stefan runs, the getBridge() returns null, when Jørgen runs, is doesn't. But it isn't needed, because we
are already in the handler, so just call own methods.
Improvement: Less draws when updating colors
Instead of drawing the picture for each panel (which gave a cool effect), draw only once when we have parsed all color data.
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* [nanoleaf] More color for less network calls
This is a refactoring that moves the "get panel color" out of the
panel handler and into a separate class, with callbacks.
This makes us do only one REST call to get colors instead of one per
panel that is a thing. It also lets us retrieve colors for all panels -
also those that doesn't have a thing in OpenHAB,
While testing this out, I found a bug where solid colors set in the app
wasn't reflected in neither the controller nor panel channels, and that
should also be fixed now.
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Lines is a Nanoleaf shape we haven't been able to test earlier.
Now we have tested them, and added support for painting them as well.
They do unfortunately not support touch gestures.
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* Nanoleaf Visual State fix
Fix the visual state channel name.
Also:
- Better name (from state to visual state) of the (new) channel
- Better logs which has helped us debug the problem
- Some more information on when it will work in the README
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* [Nanoleaf] New Channel: State
Shows an image of the state of the panels with color.
Also makes the layout slightly prettier. This is less functional than the layout, and more eyecandy.
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
* Visualize Nanoleaf layout
* Only calculate image if channel is linked
* White background image
* Render more shapes
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
On Windows the view has different line endings causing some tests to fail.
For readability the big strings have also been moved into files.
Signed-off-by: Wouter Born <github@maindrain.net>
- do not go from INITIALIZING to OFFLINE and then ONLINE, but skip OFFLINE for panels, if the controller is ONLINE
- reduce logging to debug when receiving trigger events
- only update Thing configuration if necessary to avoid Thing updated events
- fix description of model types, which was outdated due to new models being available by now
Signed-off-by: Kai Kreuzer <kai.kreuzer@telekom.de>
* New translations openhabcloud.properties (French)
* New translations transform.properties (French)
* New translations voicerss.properties (French)
* New translations actions.properties (German)
* New translations errors.properties (German)
* New translations stateflags.properties (German)
* New translations nanoleaf.properties (German)
* New translations surepetcare.properties (German)
* New translations deconz.properties (German)
* New translations tr064.properties (German)
* New translations deconz.properties (German)
* New translations openhabcloud.properties (German)
* New translations astro.properties (French)
* New translations hue.properties (French)
* New translations ntp.properties (French)
* New translations feed.properties (German)
* New translations lgwebos.properties (French)
* New translations gce.properties (French)
* New translations airquality.properties (French)
* New translations airquality.properties (French)
* New translations rotel.properties (French)
* New translations feed.properties (German)
* New translations hue.properties (French)
* New translations mail.properties (German)
* New translations sonyprojector.properties (French)
* New translations tradfri.properties (French)
* New translations powermax.properties (French)
* [nanoleaf] reimplement touch detection based on sse, stabilize behavior
* [nanoleaf] add swipe support
* [nanoleaf] add / tested full shapes support
Signed-off-by: Stefan Höhn <stefan@andreaundstefanhoehn.de>
This is a bigger refactoring bringing these (breaking) changes:
- System channel types are used where applicable
- Obsolete channels (such as power) were removed
- Some channel types were marked "advanced"
- "Tap" channels were converted to a trigger channel type providing a "system button" behavior
- Layout can now be requested by a console command
- Command options for effect channel are dynamically provided
- Log level has been reduced where appropriate
- HTTP request timeouts were reduced
- handleRemoval now returns quickly as expected
- Fixed hanging thread / infinite loop when requesting layouts for non-square panels
- Various other smaller enhancements and fixes
- Documentation has been adapted accordingly
Signed-off-by: Kai Kreuzer <kai@openhab.org>