这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@theater
Copy link
Contributor

@theater theater commented Mar 9, 2023

It's a request from a member of the community to implement a zone bypass functionality from within the OpenHAB. Has been tested by me and the customer. Additionally I enhanced a bit the unit tests.

  • Zone bypass command
  • 8 new zone special read-only states
  • Refactoring of some classes and extraction in interfaces of logic common for partition and zone commands
  • Changed RAM pages enumeration so the interfaces of the related methods always use enumeration from 0(as in all Java APIs) and not from 1(as in Paradox system)
  • Fixed potential NPEs in several places from the static code scan maven warnings (more to come in separate PR if this one gets merged)
  • Minor fixes and code clean up

theater added 20 commits March 4, 2023 11:41
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
2
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
3
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
* Added the checksum functionality
* Added more examples to the test

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
* Refactor the common logic
* Extract interface Command
* CHange the Response class to use Switch/case

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
* Fix checksum creation
* Fix the parse and confirmation of the response

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
@theater theater added enhancement An enhancement or new feature for an existing add-on community approved labels Mar 9, 2023
theater added 4 commits March 9, 2023 18:22
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
* A silly copy/paste mistake

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
As per community discussion this makes more sense and will be more
intuitive - when something is true -> make it ON, when it's false ->
make it OFF. OPEN and CLOSED are not fitting so well here...

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
* For both zone and partitions

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
@theater
Copy link
Contributor Author

theater commented Apr 18, 2023

I wonder if someone could have a look at this PR? It looks like a lot of changes but not really... Just one feature added and some refactoring to fit better the new feature...

@theater
Copy link
Contributor Author

theater commented Jun 19, 2023

@openhab/add-ons-maintainers Could someone have a look at the PR? I'd like to merge it sooner or later and it's pending for a lot of time. Also there is subsequent PR that's waiting a review together with this one and optimally if these two get merged, I would like to invest a little bit to remove all (as much as possible) of the warnings.

Thanks in advance,
Konstantin

Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

You could run mvn org.openhab.core.tools:i18n-maven-plugin:3.4.0:generate-default-translations to update the i18n properties file to make the newly added channels available in Crowdin for translation.

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
@theater theater force-pushed the implement_zone_bypass branch from c8372d8 to 980f27f Compare June 21, 2023 13:03
@theater theater requested a review from fwolter June 21, 2023 13:17
@theater
Copy link
Contributor Author

theater commented Jul 18, 2023

@fwolter Hi Fabian, I wonder if you could continue with the review so we can merge this PR? I already did the requested change a few weeks back...

Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

LGTM

@fwolter fwolter merged commit 33dd5e7 into openhab:main Jul 25, 2023
@fwolter fwolter added this to the 4.1 milestone Jul 25, 2023
@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/paradox-evo-alarm-binding-using-ip150/148931/14

@theater theater deleted the implement_zone_bypass branch August 24, 2023 14:14
Pshatsillo pushed a commit to Pshatsillo/openhab-addons that referenced this pull request Sep 29, 2023
…es (openhab#14557)

* Reduce warnings 1

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* 2

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* 3

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Initial files and package refactoring

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Implemented zone commands without checksum calculation

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* More stuff

* Added the checksum functionality
* Added more examples to the test

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Implement ZoneCommand and necessary classes

* Refactor the common logic
* Extract interface Command
* CHange the Response class to use Switch/case

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fully implement the test for creating zone command payload

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix build / add headers and author to the new files

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add command handling to the zone handler

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add command channel to the Zone thing

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Research of zone states and some TODO notes

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Retrieval of zone special states from the panel

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix build

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add the new channels to the metadata file

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add new channels to zone handler

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix indexing in memory map and add more logging

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Refactoring and potential NPE access fixes

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add new property "label" to the discovered zones and partitions

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix zone command issues

* Fix checksum creation
* Fix the parse and confirmation of the response

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add the new channels to the README.md

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fixed issue with not updating new channels in the zones

* A silly copy/paste mistake

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Change the type of the new channels from contact to switch

As per community discussion this makes more sense and will be more
intuitive - when something is true -> make it ON, when it's false ->
make it OFF. OPEN and CLOSED are not fitting so well here...

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix issue that the channel label is always NULL

* For both zone and partitions

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add new types and channels to the i18n

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

---------

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
@jlaur jlaur linked an issue Oct 6, 2023 that may be closed by this pull request
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
…es (openhab#14557)

* Reduce warnings 1

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* 2

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* 3

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Initial files and package refactoring

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Implemented zone commands without checksum calculation

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* More stuff

* Added the checksum functionality
* Added more examples to the test

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Implement ZoneCommand and necessary classes

* Refactor the common logic
* Extract interface Command
* CHange the Response class to use Switch/case

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fully implement the test for creating zone command payload

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix build / add headers and author to the new files

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add command handling to the zone handler

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add command channel to the Zone thing

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Research of zone states and some TODO notes

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Retrieval of zone special states from the panel

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix build

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add the new channels to the metadata file

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add new channels to zone handler

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix indexing in memory map and add more logging

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Refactoring and potential NPE access fixes

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add new property "label" to the discovered zones and partitions

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix zone command issues

* Fix checksum creation
* Fix the parse and confirmation of the response

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add the new channels to the README.md

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fixed issue with not updating new channels in the zones

* A silly copy/paste mistake

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Change the type of the new channels from contact to switch

As per community discussion this makes more sense and will be more
intuitive - when something is true -> make it ON, when it's false ->
make it OFF. OPEN and CLOSED are not fitting so well here...

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Fix issue that the channel label is always NULL

* For both zone and partitions

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

* Add new types and channels to the i18n

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>

---------

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community approved enhancement An enhancement or new feature for an existing add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[paradoxalarm] Implement bypass/clear bypass commands for zones

3 participants