Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

[satel] Support for troubles added #5162

Merged
merged 1 commit into from
Apr 22, 2017
Merged

Conversation

druciak
Copy link
Member

@druciak druciak commented Apr 9, 2017

This PR introduces support for detailed Integra troubles. It allows defining items that reflect various troubles in Integra alarm system.

Copy link
Contributor

@9037568 9037568 left a comment

Choose a reason for hiding this comment

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

Just a few requests for changes.

if (!isPayloadLengthValid(response.getPayload().length)) {
logger.error("Invalid payload length for this object type {}: {}", this.stateType.getObjectType(),
if (response.getPayload().length != this.stateType.getPayloadLength(isExtended())) {
logger.error("Invalid payload length for this state type {}: {}", this.stateType,
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be a warn instead of an error.

Copy link
Member Author

Choose a reason for hiding this comment

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

The level hasn't changed in this PR, it was always an error. But I can change it, if you wish.

stateType = iterator.nextOfType(TroubleState.class, "trouble state type");
break;
case TROUBLE_MEMORY:
stateType = iterator.nextOfType(TroubleMemoryState.class, "trouble mamory state type");
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be "memory" instead of "mamory" ?

@@ -0,0 +1,119 @@
/**
* Copyright (c) 2010-2016 by the respective copyright holders.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

JAMMED_ACU100(0x21, 39, 24, 2),
LCD_RESTART(0x21, 39, 26, 1),
EXPANDER_RESTART(0x21, 39, 27, 8),
// GSM_CODE(0x21, 39, 35, 2), not an on/off state
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unused/commented code.

@@ -0,0 +1,113 @@
/**
* Copyright (c) 2010-2016 by the respective copyright holders.
Copy link
Contributor

Choose a reason for hiding this comment

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

2017

EXPANDER_OVERLOAD(0x1c, 26, 16, 8),
JAMMED_ACU100(0x1c, 26, 24, 2),
// part 3
// JAM_LEVEL(0x1d, 60, 0, 15), not an on/off state
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unused/commented code.

@druciak
Copy link
Member Author

druciak commented Apr 18, 2017

Hey, I made changes for all requests except for the first one, for which I added a comment.

@9037568
Copy link
Contributor

9037568 commented Apr 18, 2017

Cool, thanks!

@9037568 9037568 added this to the 1.10.0 milestone Apr 18, 2017
@9037568 9037568 merged commit 630cc1c into openhab:master Apr 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants