mirror of https://github.com/Hypfer/Valetudo.git
82 lines
3.3 KiB
JavaScript
82 lines
3.3 KiB
JavaScript
const capabilities = require("./capabilities");
|
|
const DreameGen2ValetudoRobot = require("./DreameGen2ValetudoRobot");
|
|
const DreameGen2VSlamValetudoRobot = require("./DreameGen2VSlamValetudoRobot");
|
|
const DreameValetudoRobot = require("./DreameValetudoRobot");
|
|
const MiioValetudoRobot = require("../MiioValetudoRobot");
|
|
|
|
class DreameMovaZ500ValetudoRobot extends DreameGen2VSlamValetudoRobot {
|
|
/**
|
|
*
|
|
* @param {object} options
|
|
* @param {import("../../Configuration")} options.config
|
|
* @param {import("../../ValetudoEventStore")} options.valetudoEventStore
|
|
*/
|
|
constructor(options) {
|
|
super(options);
|
|
|
|
this.registerCapability(new capabilities.DreameZoneCleaningCapability({
|
|
robot: this,
|
|
miot_actions: {
|
|
start: {
|
|
siid: DreameGen2ValetudoRobot.MIOT_SERVICES.VACUUM_2.SIID,
|
|
aiid: DreameGen2ValetudoRobot.MIOT_SERVICES.VACUUM_2.ACTIONS.START.AIID
|
|
}
|
|
},
|
|
miot_properties: {
|
|
mode: {
|
|
piid: DreameGen2ValetudoRobot.MIOT_SERVICES.VACUUM_2.PROPERTIES.MODE.PIID
|
|
},
|
|
additionalCleanupParameters: {
|
|
piid: DreameGen2ValetudoRobot.MIOT_SERVICES.VACUUM_2.PROPERTIES.ADDITIONAL_CLEANUP_PROPERTIES.PIID
|
|
}
|
|
},
|
|
zoneCleaningModeId: 19
|
|
}));
|
|
|
|
this.registerCapability(new capabilities.DreameConsumableMonitoringCapability({
|
|
robot: this,
|
|
miot_properties: {
|
|
main_brush: {
|
|
siid: DreameGen2ValetudoRobot.MIOT_SERVICES.MAIN_BRUSH.SIID,
|
|
piid: DreameGen2ValetudoRobot.MIOT_SERVICES.MAIN_BRUSH.PROPERTIES.TIME_LEFT.PIID
|
|
},
|
|
side_brush: {
|
|
siid: DreameGen2ValetudoRobot.MIOT_SERVICES.SIDE_BRUSH.SIID,
|
|
piid: DreameGen2ValetudoRobot.MIOT_SERVICES.SIDE_BRUSH.PROPERTIES.TIME_LEFT.PIID
|
|
},
|
|
filter: {
|
|
siid: DreameGen2ValetudoRobot.MIOT_SERVICES.FILTER.SIID,
|
|
piid: DreameGen2ValetudoRobot.MIOT_SERVICES.FILTER.PROPERTIES.TIME_LEFT.PIID
|
|
}
|
|
},
|
|
miot_actions: {
|
|
reset_main_brush: {
|
|
siid: DreameGen2ValetudoRobot.MIOT_SERVICES.MAIN_BRUSH.SIID,
|
|
aiid: DreameGen2ValetudoRobot.MIOT_SERVICES.MAIN_BRUSH.ACTIONS.RESET.AIID
|
|
},
|
|
reset_side_brush: {
|
|
siid: DreameGen2ValetudoRobot.MIOT_SERVICES.SIDE_BRUSH.SIID,
|
|
aiid: DreameGen2ValetudoRobot.MIOT_SERVICES.SIDE_BRUSH.ACTIONS.RESET.AIID
|
|
},
|
|
reset_filter: {
|
|
siid: DreameGen2ValetudoRobot.MIOT_SERVICES.FILTER.SIID,
|
|
aiid: DreameGen2ValetudoRobot.MIOT_SERVICES.FILTER.ACTIONS.RESET.AIID
|
|
}
|
|
},
|
|
}));
|
|
}
|
|
|
|
getModelName() {
|
|
return "MOVA Z500";
|
|
}
|
|
|
|
static IMPLEMENTATION_AUTO_DETECTION_HANDLER() {
|
|
const deviceConf = MiioValetudoRobot.READ_DEVICE_CONF(DreameValetudoRobot.DEVICE_CONF_PATH);
|
|
|
|
return !!(deviceConf && deviceConf.model === "dreame.vacuum.p2156o");
|
|
}
|
|
}
|
|
|
|
|
|
module.exports = DreameMovaZ500ValetudoRobot;
|