Skip to content

WWSTCERT-13068 - add aeotec 8 series new - #2897

Open
iot-holding wants to merge 20 commits into
SmartThingsCommunity:mainfrom
iot-holding:add-aeotec-8-series-new
Open

iot-holding wants to merge 20 commits into
SmartThingsCommunity:mainfrom
iot-holding:add-aeotec-8-series-new

Conversation

@iot-holding

Copy link
Copy Markdown
Contributor

Check all that apply

Type of Change

  • [ x] WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • [x ] New feature
  • Refactor

Checklist

  • [x ] I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • [ x] I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

This is a new clean pull request for the new Aeotec Series 8 devices.

Summary of Completed Tests

@github-actions

github-actions Bot commented Apr 13, 2026 •

Copy link
Copy Markdown

Duplicate profile check: Passed - no duplicate profiles detected.

@github-actions

github-actions Bot commented Apr 13, 2026 •

Copy link
Copy Markdown

Test Results

   73 files  ± 0    543 suites  +2   0s ⏱️ ±0s
3 312 tests +36  3 312 ✅ +36  0 💤 ±0  0 ❌ ±0 
5 317 runs  +52  5 317 ✅ +52  0 💤 ±0  0 ❌ ±0 

Results for commit 20da095. ± Comparison against base commit 81a89ae.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Apr 13, 2026 •

Copy link
Copy Markdown

File Coverage
All files 71% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/sub_drivers.lua 87% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/init.lua 54% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/preferences.lua 93% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/lazy_load_subdriver.lua 57% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/configurations.lua 84% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/timed-tamper-clear/can_handle.lua 52% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/zooz-4-in-1-sensor/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/fibaro-motion-sensor/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/fibaro-door-window-sensor/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/fibaro-door-window-sensor/fibaro-door-window-sensor-2/can_handle.lua 16% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/sensative-strip/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/homeseer-multi-sensor/can_handle.lua 12% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/firmware-version/can_handle.lua 40% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/vision-motion-detector/can_handle.lua 12% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/glentronics-water-leak-sensor/can_handle.lua 12% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/wakeup-no-poll/can_handle.lua 20% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/fibaro-flood-sensor/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/multisensor-6/can_handle.lua 20% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/fibaro-door-window-sensor/fibaro-door-window-sensor-1/can_handle.lua 16% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/v1-contact-event/can_handle.lua 7% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/zwave-water-leak-sensor/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/ezmultipli-multipurpose-sensor/can_handle.lua 12% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/multisensor-7/can_handle.lua 20% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-water-sensor/can_handle.lua 14% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/enerwave-motion-sensor/can_handle.lua 16% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/everspring-motion-light-sensor/can_handle.lua 11% ❌

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against a01294e

@github-actions

Copy link
Copy Markdown

@iot-holding iot-holding changed the title new pull request add aeotec 8 series Apr 14, 2026
@iot-holding iot-holding changed the title add aeotec 8 series add aeotec 8 series new Apr 14, 2026
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-aerq-8/init.lua Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/preferences.lua Outdated
Comment thread drivers/SmartThings/zwave-sensor/profiles/aeotec-aerq-8.yml Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-door-window-sensor-8/init.lua Outdated
Comment thread drivers/SmartThings/zwave-sensor/profiles/aeotec-aerq-8.yml Outdated
Comment thread drivers/SmartThings/zwave-sensor/profiles/aeotec-door-window-sensor-8.yml Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-water-sensor-8/init.lua
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-aerq-8/init.lua Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-aerq-8/init.lua Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This subdriver is unnecessary. The aeotec-door-window-sensor-8 handlers cover everything here. Remove this driver, and have the device be handled by that one.

@cjswedes

Copy link
Copy Markdown
Contributor

I will re-review once the tests are passing.

Ill also request that you test your device on a real hub to ensure its functionality is what you expect.

@KKlimczukS KKlimczukS changed the title add aeotec 8 series new WWSTCERT-10832 - add aeotec 8 series new Apr 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This file must also have a weird name

Comment thread drivers/SmartThings/zwave-sensor/src/timed-tamper-clear/init.lua Outdated
@cbaumler

Copy link
Copy Markdown
Contributor

@iot-holding once you resolve the branch conflicts and ensure the tests are passing, we can re-review this PR.

@cbaumler

Copy link
Copy Markdown
Contributor

@cjswedes @aleclorimer could you re-review this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can handle never returns true and no longer loads the sub_driver when returning.

@aleclorimer aleclorimer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Look like a couple of @cjswedes comments were still not addressed and a lot of driver tests are broken.

@cbaumler

cbaumler commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Hi @iot-holding, let us know when the comments/tests have been addressed and you're ready for us to re-review.

@github-actions

github-actions Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

zwave-sensor_coverage.xml

File Coverage
All files 98% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/lazy_load_subdriver.lua 57% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/init.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/configurations.lua 99% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-door-window-sensor-8/init.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-water-sensor-8/init.lua 97% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/enerwave-motion-sensor/init.lua 92% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/sensative-strip/init.lua 94% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/multisensor-7/init.lua 93% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/aeotec-multisensor/multisensor-6/init.lua 93% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/homeseer-multi-sensor/init.lua 94% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/wakeup-no-poll/init.lua 90% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zwave-sensor/src/timed-tamper-clear/init.lua 95% ✅

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 20da095

@github-actions

Copy link
Copy Markdown

Profile category check: ✅ Passed - all profiles have a category defined.

@iot-holding

Copy link
Copy Markdown
Contributor Author

I apologize for the delay. All open issues should have been addressed in the latest commits. If there are still any issues, please let me know.

@KKlimczukS KKlimczukS changed the title WWSTCERT-10832 - add aeotec 8 series new WWSTCERT-13068 - add aeotec 8 series new Jul 30, 2026
@cbaumler

Copy link
Copy Markdown
Contributor

Hi @iot-holding, thanks for making the changes. Could you update this branch from main and we'll re-review.

Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-water-sensor-8/init.lua
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-door-window-sensor-8/init.lua Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-water-sensor-8/init.lua Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/preferences.lua Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-door-window-sensor-8/can_handle.lua Outdated
@iot-holding
iot-holding requested a review from cjswedes August 10, 2026 10:33
Comment thread drivers/SmartThings/zwave-sensor/src/aeotec-door-window-sensor-8/init.lua Outdated
local event
local event_parameter

if (0 ~= string.len(cmd.args.event_parameter)) then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think a defensive nil check and early return for cmd.args.event_parameter is warranted since it is an optional field in the spec.

Comment on lines +100 to +112
if (sensor_type == SensorMultilevel.sensor_type.ACCELERATION_X_AXIS) then
x = value
device:set_field("three_axis_x", x)
event = ThreeAxis.threeAxis({value = {x, y, z}, unit = 'mG'})
elseif (sensor_type == SensorMultilevel.sensor_type.ACCELERATION_Y_AXIS) then
y = value
device:set_field("three_axis_y", y)
event = ThreeAxis.threeAxis({value = {x, y, z}, unit = 'mG'})
elseif (sensor_type == SensorMultilevel.sensor_type.ACCELERATION_Z_AXIS) then
z = value
device:set_field("three_axis_z", z)
event = ThreeAxis.threeAxis({value = {x, y, z}, unit = 'mG'})
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is the only part of the sensor_multilevel_report_handler that is not default functionality. It differs in the device fields it uses, and most importantly in the unit conversion (there is none here, whereas the default handler converts from ms^2 to mG.

Is this device reporting acceleration in mG or in m/s^2? The spec dictates it is reported in m/s^2 so I would expect that is the unit being used by the device. In that case, this function is not needed, and the default should be used instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When I use the standard handler, which converts the values from m/s² to mG, the converted values fall outside the allowed range of min: -10000 and max: 10000, which causes an error. That’s why I tried the custom handler.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please check that the values with this handler make sense. I am concerned by the lack of conversion; however, it could be that our default is incorrect in the conversion. If this is what is needed, I would ask that you leave a comment in this function explaining how this is the only part that differs from the defaults because of the units/conversion

profile = t_utils.get_profile_definition("aeotec-door-window-sensor-8.yml"),
zwave_endpoints = sensor_endpoints,
zwave_manufacturer_id = 0x0371,
zwave_product_id = 0x0037,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missing product type in the mock.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is still missing.

test.mock_device.add_test_device(mock_co_sensor)
test.mock_device.add_test_device(mock_co2_sensor)
test.mock_device.add_test_device(mock_contact_sensor)
test.mock_device.add_test_device(mock_contact_sensor)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

mock_contact_sensor is added twice unnecessarily

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This has not been resolved.

Comment thread drivers/SmartThings/zwave-sensor/profiles/aeotec-aerq-8.yml Outdated
@KKlimczukS

Copy link
Copy Markdown
Contributor

@iot-holding Please check latest remarks. Thank You.

Comment thread drivers/SmartThings/zwave-sensor/profiles/aeotec-aerq-8.yml Outdated
Comment thread drivers/SmartThings/zwave-sensor/src/test/test_aeotec_door_window_sensor_8.lua Outdated
profile = t_utils.get_profile_definition("aeotec-door-window-sensor-8.yml"),
zwave_endpoints = sensor_endpoints,
zwave_manufacturer_id = 0x0371,
zwave_product_id = 0x0037,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is still missing.

test.mock_device.add_test_device(mock_co_sensor)
test.mock_device.add_test_device(mock_co2_sensor)
test.mock_device.add_test_device(mock_contact_sensor)
test.mock_device.add_test_device(mock_contact_sensor)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This has not been resolved.

Comment on lines +141 to +144
supported_capabilities = {
capabilities.powerSource,
capabilities.threeAxis,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
supported_capabilities = {
capabilities.powerSource,
capabilities.threeAxis,
},

This doesnt actually do anything when put in a subdriver; it is used by the top level driver when registering for default functionality. IMO it is misleading to put it here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove this.

device:set_field("active_profile", profile.profile, {persist = true})

-- Set supported modes and default value based on profile
if profile.profile == "aeotec-water-sensor-8" then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I should have caught this in the first pass, but emitting these events immediately after calling try_update_metadata means any capability that wasnt already on the old profile will not have events emitted. The profile is not immediately updated; the indication that it has been updated is an infoChanged event with the new profile capabilities on the device. Move the initial event emission to the infoChanged handler.

local function added_handler(driver, device)
-- Get parameter 10 to switch device profile bsaed on the parameter value
-- Get parameter 10 to switch device profile based on the parameter value
device:send(Configuration:Get({ parameter_number = 10 }))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can the user change this configuration value? It is only being read once after the device is onboarded, so there is no way for it to affect the device profiles afterwards.

Comment on lines +141 to +144
supported_capabilities = {
capabilities.powerSource,
capabilities.threeAxis,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove this.


-- Z-Wave: m/s²; SmartThings threeAxis: mG
local mg = utils.round(value / 9.81 * 1000)
mg = math.max(-10000, math.min(10000, mg))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The conversion is now the same as the default; the only difference is the clamp. If the device is sending values > 98.1 m/s^2 then perhaps the device is actually reporting in different units, and the clamping is misleading. I do not believe the device is actually being accelerated that fast. The max/min are in place on the capability to prevent unrealistic numbers, and as such we should understand why we are receiving unrealistic values instead of covering up the value by clamping it to the max value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants