-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
RFXCOM update to get energy devices working Esp. ELEC3 #1230
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,8 +84,8 @@ public class RFXComBindingConstants { | |
public final static String CHANNEL_CHILL_FACTOR = "chillFactor"; | ||
public final static String CHANNEL_INSTANT_POWER = "instantPower"; | ||
public final static String CHANNEL_TOTAL_USAGE = "totalUsage"; | ||
public final static String CHANNEL_INSTANT_AMPS = "instantAmps"; | ||
public final static String CHANNEL_TOTAL_AMP_HOURS = "totalAmpHours"; | ||
public final static String CHANNEL_INSTANT_AMPS = "instantAmp"; | ||
public final static String CHANNEL_TOTAL_AMP_HOUR = "totalAmpHour"; | ||
public final static String CHANNEL_STATUS = "status"; | ||
public final static String CHANNEL_MOTION = "motion"; | ||
public final static String CHANNEL_CONTACT = "contact"; | ||
|
@@ -123,7 +123,7 @@ public class RFXComBindingConstants { | |
public final static ThingTypeUID THING_TYPE_UV = new ThingTypeUID(BINDING_ID, "uv"); | ||
public final static ThingTypeUID THING_TYPE_DATE_TIME = new ThingTypeUID(BINDING_ID, "datetime"); | ||
public final static ThingTypeUID THING_TYPE_CURRENT = new ThingTypeUID(BINDING_ID, "current"); | ||
public final static ThingTypeUID THING_TYPE_ENERGY_USAGE = new ThingTypeUID(BINDING_ID, "energyusage"); | ||
public final static ThingTypeUID THING_TYPE_ENERGY = new ThingTypeUID(BINDING_ID, "energy"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would make sense for the constant name to match the thing type id, so we should change this to THING_TYPE_ENERGY (across the board), or stick with the energyusage id and change the xml file to match. I don't mind which. |
||
public final static ThingTypeUID THING_TYPE_CURRENT_ENERGY = new ThingTypeUID(BINDING_ID, "currentenergy"); | ||
public final static ThingTypeUID THING_TYPE_POWER = new ThingTypeUID(BINDING_ID, "power"); | ||
public final static ThingTypeUID THING_TYPE_WEIGHTING_SCALE = new ThingTypeUID(BINDING_ID, "weightingscale"); | ||
|
@@ -144,9 +144,9 @@ public class RFXComBindingConstants { | |
THING_TYPE_THERMOSTAT2, THING_TYPE_THERMOSTAT3, THING_TYPE_BBQ_TEMPERATURE, THING_TYPE_TEMPERATURE_RAIN, | ||
THING_TYPE_TEMPERATURE, THING_TYPE_HUMIDITY, THING_TYPE_TEMPERATURE_HUMIDITY, THING_TYPE_BAROMETRIC, | ||
THING_TYPE_TEMPERATURE_HUMIDITY_BAROMETRIC, THING_TYPE_RAIN, THING_TYPE_WIND, THING_TYPE_UV, | ||
THING_TYPE_DATE_TIME, THING_TYPE_CURRENT, THING_TYPE_ENERGY_USAGE, THING_TYPE_CURRENT_ENERGY, | ||
THING_TYPE_POWER, THING_TYPE_WEIGHTING_SCALE, THING_TYPE_GAS_USAGE, THING_TYPE_WATER_USAGE, | ||
THING_TYPE_RFX_SENSOR, THING_TYPE_RFX_METER, THING_TYPE_FS20, THING_TYPE_RFY); | ||
THING_TYPE_DATE_TIME, THING_TYPE_CURRENT, THING_TYPE_ENERGY, THING_TYPE_CURRENT_ENERGY, THING_TYPE_POWER, | ||
THING_TYPE_WEIGHTING_SCALE, THING_TYPE_GAS_USAGE, THING_TYPE_WATER_USAGE, THING_TYPE_RFX_SENSOR, | ||
THING_TYPE_RFX_METER, THING_TYPE_FS20, THING_TYPE_RFY); | ||
|
||
/** | ||
* Map RFXCOM packet types to RFXCOM Thing types and vice versa. | ||
|
@@ -162,7 +162,7 @@ public class RFXComBindingConstants { | |
.put(PacketType.CURRENT_ENERGY, RFXComBindingConstants.THING_TYPE_CURRENT_ENERGY) | ||
.put(PacketType.CURTAIN1, RFXComBindingConstants.THING_TYPE_CURTAIN1) | ||
.put(PacketType.DATE_TIME, RFXComBindingConstants.THING_TYPE_DATE_TIME) | ||
.put(PacketType.ENERGY, RFXComBindingConstants.THING_TYPE_ENERGY_USAGE) | ||
.put(PacketType.ENERGY, RFXComBindingConstants.THING_TYPE_ENERGY) | ||
.put(PacketType.FAN, RFXComBindingConstants.THING_TYPE_FAN) | ||
.put(PacketType.FS20, RFXComBindingConstants.THING_TYPE_FS20) | ||
.put(PacketType.GAS, RFXComBindingConstants.THING_TYPE_GAS_USAGE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for de-pluralising this channel? It doesn't seem to make any functional difference, and it seems more natural to me to say amphours than amphour. Same comment applies to all the de-pluralisations, I'd be happier if the pull request changed instantamp to instantamps instead, as that is currently inconsistent throughout the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no particular reason other than i knew which bits i had had to change by looking at the code quickly (i.e. if singular i had changed it), ive updated the PR and have made it all singular, having only just spotted this. if you really want it converting back to multiples it can be done, but as you say no functionality is lost either way.