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

Add a Data value selector that doesn't include RFXCOM headers#4520

Merged
watou merged 1 commit into
openhab:masterfrom
Jamstah:master
Aug 7, 2016
Merged

Add a Data value selector that doesn't include RFXCOM headers#4520
watou merged 1 commit into
openhab:masterfrom
Jamstah:master

Conversation

@Jamstah

@Jamstah Jamstah commented Jul 6, 2016

Copy link
Copy Markdown
Contributor

The Undecoded implementation only has one value selector, RawData. This updates the item state with the full message.

I'd like to introduce a "Data" value selector, which drops the header from the message. The bytes of the header are:

  1. Length - not required as we get a byte array of the right length anyway.
  2. Type (Undecoded) - Not required as we know the item is undecoded from the items file.
  3. Subtype - This could potentially be of use to someone, but it wasn't in my case, and RawData is still an option.
  4. Sequence number, this changes consistently, unlikely to be required.

I have devices that just spit out their ID as a message and nothing else, by using the Data selector instead of the RawData selector, I get a consistent output (without sequence), which means my rules file can detect the state update really easily. With RawData, the value would change every time so would need more work.

@Jamstah

Jamstah commented Jul 6, 2016

Copy link
Copy Markdown
Contributor Author

Assuming this is pulled into openhab, I next plan to upgrade my system to openhab2 and make the same changes. The code for undecoded messages hasn't reached openhab2-addons yet, so I'll port that in as well.

@watou watou added this to the 1.9.0 milestone Aug 7, 2016
@watou watou merged commit 3d3e37e into openhab:master Aug 7, 2016
@watou

watou commented Aug 7, 2016

Copy link
Copy Markdown
Contributor

Thank you for this. Would you also please update the wiki to document the new "Data" value selector, noting that it will be available in 1.9 of the binding?

@Jamstah

Jamstah commented Aug 7, 2016

Copy link
Copy Markdown
Contributor Author

Thanks. wiki updated.

@watou

watou commented Aug 7, 2016

Copy link
Copy Markdown
Contributor

Thank you very much, @Jamstah!

cdjackson added a commit to cdjackson/openhab1-addons that referenced this pull request Aug 12, 2016
* master: (41 commits)
  Zwave database 120816 (openhab#4585)
  Introduce a 20s delay before attempting to reconnect once connection (openhab#4549)
  [Modbus] Read errors now emit UNDEF (configurable) (openhab#4577)
  [modbus] PR 4575 small fix (openhab#4579)
  ZWave Database updates (openhab#4580)
  Modbus: enable tests that used to fail (openhab#4576)
  Modbus binding: do not read out-of-bounds discrete inputs/coils (openhab#4575)
  Influxdb update influxdb java api, make retentionPolicy configurable (openhab#4564)
  Add a Data value selector that doesn't include RFXCOM headers (openhab#4520)
  Fix demo links in readme (openhab#4572)
  ZWave database update (openhab#4571)
  Add binding IRTrans and Souliss to OH2 (openhab#4568)
  [+] snmp binding: added port support via url ("address/port" with specified port or "address" with default 161 port) (openhab#4474)
  Prevent NPE when neohub is down (openhab#4567)
  Thread interruption changes. (openhab#4566)
  Added new weather provider: MeteoBlue (openhab#4554)
  made Onkyo binding 1.x legacy as there is now a 2.0 version (openhab#4556)
  ZWave update kfob codes (openhab#4563)
  Fix for SqueezeboxSpeak volume. (openhab#4561)
  KNX start/stop dimming openhab#635 (openhab#3403)
  ...
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