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

[icalendar][WIP] add Filtered events item type #8468

Closed
wants to merge 5,290 commits into from

Conversation

daMihe
Copy link
Contributor

@daMihe daMihe commented Sep 13, 2020

This PR adds a new thing type filteredevents to the iCalendar binding. It allows to get multiple events in a time frame and filtered by some event's text fields. It handles some use cases in issue #8022.

Technically the calendar item type was converted to a bridge and filteredevents requires an calendar bridge. The conversion is done automatically by readding the item with same configuration and uid.

J-N-K and others added 30 commits July 7, 2020 13:43
Fix json parsing
Improve error handling
Remove unused Exception
* Changes for new build system
* Original
* Bugfixed for new version and merge request
* Added license information and author
* Added contributor and readme information
* Uncommented test comment for production use
* Removed the waitForUpdate variable - not used
* Added two configurations params for pulling interval and activating the smart bulbs
* [amazonechocontrol]
Formatting change
Fix for Announcment Channel
* Bugfixed discovery
* Bugfixed wrong entries of the amazon echo devices as lights
* [amazonechocontrol]
Fix for Announcment Channel
* Implemented recursive searching for devices, filtered smart plugs
* Added smart plugs
* Removed unused code, renamed new function and it's references
* Added translation
* Added documentation
* Added capabilities to smart home device
* Added dynamic channel adding
Improve smart home discover and and add options for openHAB smarthome devices
Handle on/off in percentage channel
Smart Home Device Handling
Update Smart Home Device Handling
Move Polling Timer to Account Handler
Remove polling from smart home handler
Alexa guard support
* [amazonechocontrol] Bugfix for login in Australia (openhab#6034)
Fix invalid device state
Bugfix and docu for announcment
Fix duplicate channel registration
Fix updates
Skill device detection
Improve channel handling
Color Name handling
Single device update
Color handling
Handle Security Panel Controller
Color handling
Alexa.AcousticEventSensor added
Code cleanup
Alexa.TemperatureSensor Interface
PowerLevelController, PercentageController
Add readme
Add To Do List
Fix nullable warning in Announcment
Fix nullable warning
Prepare Release Notes
SmartHome update groups
Fix spelling
Fix group initialization
* Removed unused file
* Removed unused file
* Error fixes
* codestyle
* Fix issues, codestyle and refactoring
* address review comment

Co-authored-by: Lkn94 <[email protected]>
Co-authored-by: Michael Geramb <[email protected]>
Co-authored-by: Lukas Knöller <[email protected]>
Signed-off-by: Jan N. Klug <[email protected]>
…nhab#8055)

* add dynamic state descriptions and fix property updates
* fixes and improvements

Signed-off-by: Jan N. Klug <[email protected]>
* re-factoring WIP

Signed-off-by: Markus Michels <[email protected]>
…nhab#7396)

* Implement like/unlike for remote streaming services
* Fix formatting
* Address review feedback
* Combine like/unlike to single rate channel
* Address review comments

Signed-off-by: Mark Hilbush <[email protected]>
* some cleanups

Signed-off-by: Eugen Freiter <[email protected]>
Also-by: Jarle Hjortland <[email protected]> (github: jarlebh)
Signed-off-by: Jan Gustafsson <[email protected]> (github: jannegpriv)
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <[email protected]>
* [modbus] connection closing behaviour finetuned

The binding closes TCP/serial connections connections as per user
configuration. It is either
- every time, immediately after a transaction (reconnectAfterMillis=0)
- *after* a read/write transaction, if the connection has been open "too
  long" (configurable with reconnectAfterMillis)

We have an obvious downside to this simple logic -- the connection
can remain open "indefinitely" if there are no transactions occurring.
With Modbus we are quite often dealing with PLCs and other embedded
systems with limited resources, and "reserving" the connection is not
always something we want.

Previously (2.5.x branch) connections were also closed when
- a regular poll task was unregistered (i.e. we stop reading regularly
from a modbus server ("slave"). Since most users have regular polling in
place, so this ensured that connections do get closed.

In this commit, the behaviour is adjusted such that connections are
closed when last communication interface pointing to the server/serial
port (i.e. "endpoint") is close()'d.

With modbus binding this basically means when the tcp or serial thing
is removed / disabled, the connections is closed/freed, but only if it
is the last thing pointing to that server or serial port.

Since modbus.sunspec binding reuses modbus serial & tcp endpoint things,
the same note applies for modbus.sunspec binding.

This is change in functional behaviour but in a way is logical. We can
further introduce to have "delayed"/"deferred"/"debounce" connection
closing connections as per the setting reconnectAfterMillis even in
situations where communication interface is still open.

* [modbus] Check and disconnect idle connections without transactions
* [modbus] mvn spotless:apply
* [modbubs] Fixed log message
* [modbus] Race condition fix

The CountDownLatch was used as a guard (latch.await) in many tests to
wait for callbacks to be called before proceeding with assertions.

Since the latch was countDown() beginning of the callback, we introduced
a race condition with the subsequent assertions and updating the other
counters used in the subsequent assertions.

This commit updates the CountDownLatch as the last step of the callback,
resolving the race condition.

* [modbus] small test fix
* [modbus] readcallback changed to nonnull
* [modbus] Refactored ModbusCommunicationInterface to have seperate callback for result and failure

However I had to dig deep to reach all the affected parts.
Also there is a new callback, and a new "result" type to communicate
the failures.
* [modbus] SmokeTest refactored to new api
* [modbus] Modbus bundle refactored to use the new api
* [modbus][sunspec] refactored sunspec bundle to use the new modbus API
* [modbus] refactor modbus tests to use the new api
* [modbus] Removed ModbusWriteCallback interface from ModbusDataThingHandler
Also reset ModbusDataThingHandler testWriteHandling generic to it's original form
* [modbus] ModbusDataThingHandler does not implement ModbusReadCallback anymore
Instead it has a public onReadResult method. ModbusPollerThingHandler changed to
work with ModbusDataThingHandler children.
* [modbus] Fixed caching in ModbusPollerThingHandler
* [modbus] read modbus data as Optionals
* [modbus] toString for PollResult
* [modbus] fixed confusing variable name
* [modbus] Disallow null callbacks
* [modbus] mvn spotless:apply
* [modbus] Removing Nullable decorations
* [modbus] submitOneTimeWrite simplification
* [modbus] Less verbose logging
* [modbus] submitOneTimePoll simplification
* [modbus] Less verbose logging
* [modbus] Many null warnings removed
* [modbus] Fix: no need for a @nonnull annotation because it is default
* [modbus] Removing unneeded Nullable, using final in immutables
* [modbus] Explicit functional interface
* [modbus] @nullable and @NonNullByDefault aligned with coding conventions
* [modbus] Collections.emptyMap instead of allocating new map every time.

Signed-off-by: Sami Salonen <[email protected]>

Co-authored-by: Nagy Attila Gábor <[email protected]>
Signed-off-by: toweosp <[email protected]>

Co-authored-by: Fabian Wolter <[email protected]>
- Replaced Joda time

Signed-off-by: Jan Gustafsson <[email protected]>
)

* Remove deprecated discovery interfaces

Signed-off-by: Jan N. Klug <[email protected]>
…8110)

* add support window covering without inversion
* fix typo in README and apply spotless
* address feedback

Signed-off-by: Eugen Freiter <[email protected]>
* Enhancing action method call for Issue openhab#8116

Signed-off-by: clinique <[email protected]>
* [hue] Add support for hue scene activation

Closes openhab#6043

This is the continuation of the PR openhab#7540

95% of credits go to leluna

Signed-off-by: Laurent Garnier <[email protected]>
Also-by: leluna <[email protected]>
taboneclayton and others added 19 commits September 11, 2020 01:04
Fixes exceptions thrown in OH3 when building discovery results for things with bridges where the thing UID is missing the bridge UID.

Related to openhab/openhab-core#1481

Signed-off-by: Wouter Born <[email protected]>
Migrated from the openHAB 1 version.

Signed-off-by: Christian Niessner <[email protected]>
These changes were necessary to fix errors when opening these projects in Eclipse.

Signed-off-by: Wouter Born <[email protected]>
* Newer pool2 resolves many bugs present in the old version.
* Hacky workaround for faultiness of setEvictionPolicyClassName(String) in OSGi (POOL-338) is not needed anymore, thanks to new setEvictionPolicy(EvictionPolicy).
* Codeowners update for modbus itests

Signed-off-by: Sami Salonen <[email protected]>
…ec (openhab#8370)

* Related to discussion in openhab#8228
* Documented where the limits come from.
* Internet is full of interpretation and variations. We follow the spec.

Signed-off-by: Sami Salonen <[email protected]>
* [mqtt.generic] Add CIE xyY color support

Signed-off-by: Aitor Iturrioz <[email protected]>
@TravisBuddy
Copy link

Travis tests were successful

Hey @daMihe,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@Hilbrand Hilbrand added the enhancement An enhancement or new feature for an existing add-on label Sep 13, 2020
@Hilbrand
Copy link
Member

It's not possible to rebase yet as this binding is not yet on the master branch. Wait until we've migrated the 2.5.x bindings to the master branch and than rebase on master. You can than switch the pull request here to merge against master and push force the code back.

@daMihe
Copy link
Contributor Author

daMihe commented Sep 13, 2020

It's not possible to rebase yet as this binding is not yet on the master branch. Wait until we've migrated the 2.5.x bindings to the master branch and than rebase on master. You can than switch the pull request here to merge against master and push force the code back.

OK i'll wait.

@Hilbrand Hilbrand added the oh3 label Sep 13, 2020
@kaikreuzer
Copy link
Member

Could you please re-create this PR against the main branch?
See #8512. Thanks!

@daMihe
Copy link
Contributor Author

daMihe commented Sep 22, 2020

I'll do in a few days.

@wborn wborn removed the oh3 label Oct 17, 2020
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.