Skip to content

Commit

Permalink
feat(add): b-parasite (#5810)
Browse files Browse the repository at this point in the history
* Add support for b-parasite

* Update custom_devices_diy.js

---------

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
ginkel and Koenkk authored May 30, 2023
1 parent 0a8161f commit b1c249a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/devices/custom_devices_diy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1057,4 +1057,23 @@ module.exports = [
toZigbee: [],
exposes: [],
},
{
zigbeeModel: ['b-parasite'],
model: 'b-parasite',
vendor: 'Custom devices (DiY)',
description: '[b-parasite open source soil moisture sensor](https://github.com/rbaron/b-parasite)',
fromZigbee: [fz.temperature, fz.humidity, fz.battery, fz.soil_moisture, fz.illuminance],
toZigbee: [],
exposes: [e.temperature(), e.humidity(), e.battery(), e.soil_moisture(), e.illuminance_lux()],
configure: async (device, coordinatorEndpoint, _logger) => {
const endpoint = device.getEndpoint(10);
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg',
'msTemperatureMeasurement', 'msRelativeHumidity', 'msSoilMoisture', 'msIlluminanceMeasurement']);
await reporting.batteryPercentageRemaining(endpoint);
await reporting.temperature(endpoint);
await reporting.humidity(endpoint);
await reporting.soil_moisture(endpoint);
await reporting.illuminance(endpoint);
},
},
];

0 comments on commit b1c249a

Please sign in to comment.