-
-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to call service xiaomi_miio/vacuum_clean_segment. Service not found. #356
Comments
The vacuum integrated through this component does not support this card if it does not support custom services. |
Think I got it.... (didn't try it yet) but it's explained here: PiotrMachowski/lovelace-xiaomi-vacuum-map-card#251 |
What I can't understand is that |
This is the code in the react plugin of [
{
key: "clean",
value: function clean() {
var _this2 = this;
var operType = this.props.getOperType();
var mode = Base.device.mode;
var run_state = this.state.run_state;
var isWorking = _Config.default.run_state.isWorking(run_state);
var isWorkingOrPause = _Config.default.run_state.isWorkingOrPause(run_state);
var method,
params = [];
var preCleanProps = null;
if (!isWorkingOrPause) {
if (Base.device.is_mop === _Config.default.is_mop.custom) {
method = _Config.default.methods.setCustomClean;
params = [];
} else if (operType === _Config.default.operType.roomClean || operType === _Config.default.operType.allClean) {
if (_Config.default.supportCleanTimes) {
var cleantimes = this.props.dealCompMethod("extraBtns", 'getCleanTimes');
preCleanProps = {
cleantimes: cleantimes
};
}
var ids = [];
if (operType === _Config.default.operType.roomClean) {
ids = this.props.dealCompMethod('mapContainer', 'dealMapMethod', 'getSelectedRoomIds');
if (!ids) {
return;
}
if (ids.length === 0) {
return Base.toast(Base.lang.plzChooseLess1Room);
}
this.props.dealCompMethod("mapContainer", "unSelectAllRooms", ids);
}
method = _Config.default.methods.startModeWork;
var cleanRoomMode;
if (mode === _Config.default.mode.wall) {
cleanRoomMode = 1;
} else {
cleanRoomMode = 0;
}
params = [cleanRoomMode, 1, ids.join(",")];
} else {
var isPointing = this.props.dealCompMethod("extraBtns", "getIsPointing");
preCleanProps = {};
if (_Config.default.supportCleanTimes) {
preCleanProps.cleantimes = this.props.dealCompMethod("extraBtns", 'getCleanTimes');
}
if (isPointing) {
var pointData = this.props.dealCompMethod("mapContainer", 'getPointData');
if (!pointData) {
return Base.toast(Base.lang.plzSetPoint);
}
preCleanProps['target-point'] = pointData.x + "," + pointData.y;
Base.log("设置定点清扫中心点坐标", pointData);
method = _Config.default.methods.startPointClean;
} else {
var zoneData = this.props.dealCompMethod("mapContainer", 'getZoneData');
if (!zoneData) {
return Base.toast(Base.lang.zoneNotIn);
}
if (zoneData[0] === 0) {
return Base.toast(Base.lang.plzSetZone);
}
var data = [];
for (var i = 1; i < zoneData.length; i++) {
var item = zoneData[i];
var arr = item.split("_");
data.push([arr[2], arr[3], arr[4], arr[5], arr[6], arr[7], arr[8], arr[9]].join(","));
}
if (_Config.default.supportMultipleZones) {
preCleanProps['multiple-zone-points'] = JSON.stringify(data);
Base.log(data);
} else {
preCleanProps['zone-points'] = data[0];
}
method = _Config.default.methods.startZoneClean;
}
this.props.dealCompMethod("mapContainer", 'clearZonePoint');
this.props.dealCompMethod("extraBtns", 'resetZonePoint');
}
} else if (isWorking) {
method = _Config.default.methods.pauseWork;
} else {
method = _Config.default.methods.startWork;
}
if (method) {
if (preCleanProps) {
this.props.loading(true);
FetchUtil.setProps({
props: preCleanProps,
callback: function callback(result) {
_this2.props.loading(false);
if (result.status === FetchUtil.PropsStatus.success) {
_this2.doClean(method, params);
} else {
Base.toast(Base.lang.setFail);
Base.log("set props fail", preCleanProps, result);
_this2.doClean(method, params);
}
}
});
} else {
this.doClean(method, params);
}
}
}
}, {
key: "doClean",
value: function doClean(method, params) {
var _this3 = this;
Base.log(method, params);
FetchUtil.doAction(method, params, function (result) {
if (result.code === 0) {
_this3.props.setSweptAreaTypeProp();
} else {
Base.toast(Base.lang.setFail);
Base.log(method + ' error', result);
_this3.props.resotreImmediately();
}
});
}
}
] |
Hi. did you find soluton? |
I have the same issue when I try room cleaning or zone cleaning in roborock s5... Xiaomi Miot Auto and this Addon. Also status is always unknown |
Using the xiaomi-vacuum-map-card lovelace card, and trying to do a "Room clean" I get that error message. Am I missing something on the configuration or is it something not yet supported?
The text was updated successfully, but these errors were encountered: