Skip to content

Conversation

@ssalonen
Copy link
Contributor

@ssalonen ssalonen commented Nov 9, 2025

With #19730, resolves #19608

Decided to keep the same thing for simplicity (see discussion here #19608 (comment))

Relies on yet unreleased ruuvi-common-java: Scrin/ruuvitag-common-java#6 ruuvi-common-java 1.1.0 https://github.com/Scrin/ruuvitag-common-java/releases/tag/v1.1.0 . This jar should be uploaded to openHAB maven repo by an openHAB maintainer.

Signed-off-by: Sami Salonen <[email protected]>
@ssalonen ssalonen requested a review from a team as a code owner November 9, 2025 10:43
@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/ruuvi-air-support-experimental/167132/1

ssalonen and others added 23 commits November 9, 2025 13:07
Signed-off-by: Sami Salonen <[email protected]>
Add initial implementation framework for Ruuvi Air support:

## Parser Library Integration
- Add Ruuvi Air Format 6 parser to ruuvitag-common-java dependency
- Configure BND embedding to include parser library in bindings

## Bluetooth Binding Foundation
- Add air quality channel constants to RuuviTagBindingConstants
- Extend RuuviTagHandler with Format 6 measurement handling
- Define thing-type and channel-type stubs for Ruuvi Air in XML

## MQTT Binding Foundation
- Add air quality channel constants to RuuviGatewayBindingConstants
- Extend RuuviTagHandler with Format 6 measurement handling
- Define thing-type and channel-type stubs for Ruuvi Air in XML

## Documentation
- Create IMPLEMENTATION_SUMMARY.md with implementation overview
- Update PLAN.md with detailed implementation progress

This commit provides the foundational structure for full Ruuvi Air support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
…r channel types

Implement complete Ruuvi Air Format 6 support across Bluetooth and MQTT bindings:

## Architecture Changes
- Separate RuuviTag and Ruuvi Air into distinct thing-types in both bindings
- Define shared channel-types (temperature, humidity, pressure, dataFormat) used by both devices
- Rename calibrationStatus to calibrationCompleted with Switch item type semantics

## Bluetooth Binding
- Rename ruuvitag.xml to ruuvi.xml to reflect support for both device types
- Add ruuviair_beacon thing-type with air quality specific channels
- Create separate RuuviTag-specific channels (acceleration, battery, txPower, movementCounter)
- Remove unused StringType updateStateIfLinked method
- Update RuuviTagBindingConstants with THING_TYPE_AIR_BEACON
- Update RuuviTagHandlerFactory to support both thing-types

## MQTT Binding
- Add ruuviair_beacon thing-type to thing-types.xml
- Create RuuviCachedSwitchState class for proper Switch channel state caching
- Update handler to use new RuuviCachedSwitchState for calibrationCompleted channel
- Update RuuviGatewayBindingConstants with THING_TYPE_AIR_BEACON
- Add tags to ruuvitag_txPower for consistency with Bluetooth binding

## Air Quality Channels (Ruuvi Air only)
- pm25: Particulate matter ≤2.5 μm concentration
- co2: CO2 concentration in ppm
- vocIndex: Volatile Organic Compounds index (0-500, avg=100)
- noxIndex: Nitrogen Oxides index (0-500, base=1)
- luminosity: Light intensity in lux
- calibrationCompleted: Sensor calibration status (ON=complete, OFF=in progress)

## Documentation
- Update both binding READMEs with comprehensive channel tables
- Document supported devices: RuuviTag (all variants) and Ruuvi Air
- Add air quality index interpretation section explaining VOC and NOX semantics
- Ensure channel description consistency across both bindings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Both RuuviTag and Ruuvi Air devices are now handled by the same
handler class, so RuuviHandler is a more appropriate name than
RuuviTagHandler to reflect its broader responsibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Add missing case statements for PM1, PM4, and PM10 particulate matter
channels in MQTT Ruuvi Gateway binding handler.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Add airQualityIndex channel to both Bluetooth RuuviTag and MQTT RuuviGateway
bindings. This calculated index (0-100%) combines PM2.5 and CO2 values to
provide a comprehensive air quality assessment for Ruuvi Air devices.

- Update channel definitions with airQualityIndex
- Add handler implementations for both BLE and MQTT bindings
- Update README documentation with examples
- Fixed 0-100% description in XML definitions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
Remove PLAN.md and IMPLEMENTATION_SUMMARY.md which were temporary
documentation created during development.

Signed-off-by: Sami Salonen <[email protected]>
ssalonen and others added 3 commits November 9, 2025 14:02
…g/openhab/binding/mqtt/ruuvigateway/internal/discovery/RuuviGatewayDiscoveryService.java

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
…g/openhab/binding/mqtt/ruuvigateway/internal/parser/GatewayPayloadParser.java

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
…xamples

- Change vocIndex and noxIndex from Number:Dimensionless to Number in both bindings
- Add noxIndex example to both README files
- Add pm4 example to Bluetooth binding README
- Add luminosity example to MQTT binding README
- Reorder PM channels (pm1, pm25, pm4, pm10) for consistency

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

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks. Left some comments for the bluetooth part of this PR. Please also run the i18n plugin to update the properties file.

I would like to ask you to extract the mqtt part to a seperate PR. Would be better for review, release notes, historie etc.

@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Nov 28, 2025
Co-authored-by: lsiepel <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
@ssalonen
Copy link
Contributor Author

Separated mqtt to new PR #19730

Will clean it from here next...

@ssalonen
Copy link
Contributor Author

Now this branch is purely about bluetooth

Revert all changes to bundles/org.openhab.binding.mqtt.ruuvigateway
and its integration tests to match the main branch. This binding will
remain unchanged while the bluetooth.ruuvitag binding continues to be
developed.

Signed-off-by: Sami Salonen <[email protected]>
Signed-off-by: Sami Salonen <[email protected]>
@ssalonen
Copy link
Contributor Author

i18 added in 5857db6

@lsiepel
Copy link
Contributor

lsiepel commented Nov 29, 2025

There is a dependency build failure

@ssalonen
Copy link
Contributor Author

@lsiepel yes. The dependency issue is described in the first post

Needs action from maintainer with jfrog upload access

@lsiepel
Copy link
Contributor

lsiepel commented Nov 29, 2025

Right, i have not seen this error before. (ah i see now as it was not uploaded to mavencentral) @florian-h05 or @kaikreuzer can you upload the file

Could not find artifact fi.tkgwf.ruuvi:ruuvitag-common:jar:1.1.0 in openhab-release (https://openhab.jfrog.io/openhab/libs-release)

@lsiepel lsiepel changed the title [bluetooth.ruuvitag] [mqtt.ruuvigateway] Ruuvi Air support [bluetooth.ruuvitag] Ruuvi Air support Nov 29, 2025
@florian-h05
Copy link
Contributor

Uploaded the artefact and restarted the build, should succeed now.

@lsiepel lsiepel merged commit 42fab21 into openhab:main Nov 30, 2025
2 of 3 checks passed
@lsiepel lsiepel added this to the 5.1 milestone Nov 30, 2025
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.

Ruuvi Air support

4 participants