@7365admin1/core 3.137.0 → 3.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +271 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/ounitech-api-2025-10.test.mjs +51 -8
package/dist/index.mjs
CHANGED
|
@@ -10280,7 +10280,7 @@ function robotFaultText(robotName, fault) {
|
|
|
10280
10280
|
}
|
|
10281
10281
|
return {
|
|
10282
10282
|
title: "Robot fault",
|
|
10283
|
-
body: `${robotName || "A robot"} reports a fault: ${fault.message || fault.code}.`
|
|
10283
|
+
body: `${robotName || "A robot"} reports a fault: ${String(fault.message || fault.code).replace(/\.\s*$/, "")}.`
|
|
10284
10284
|
};
|
|
10285
10285
|
}
|
|
10286
10286
|
function robotConnectionText(robotName, online, minutes) {
|
|
@@ -64008,7 +64008,7 @@ function robotManifest(brand, reportedModel) {
|
|
|
64008
64008
|
const b = robotBrandFor(brand);
|
|
64009
64009
|
const reported = typeof reportedModel === "string" ? reportedModel.trim().slice(0, 60) : "";
|
|
64010
64010
|
if (!b)
|
|
64011
|
-
return { capabilities: {}, profile: { model: reported, modelKnown: false, alarms: [], makerApp: "", makerAppOnly: [] } };
|
|
64011
|
+
return { capabilities: {}, profile: { model: reported, modelKnown: false, alarms: [], makerApp: "", makerAppOnly: [], clearFault: [] } };
|
|
64012
64012
|
const prefix = modelKey(b.brand);
|
|
64013
64013
|
let key = modelKey(reported);
|
|
64014
64014
|
if (prefix && key.startsWith(prefix) && key !== prefix)
|
|
@@ -64021,7 +64021,8 @@ function robotManifest(brand, reportedModel) {
|
|
|
64021
64021
|
modelKnown: Boolean(m),
|
|
64022
64022
|
alarms: [...m?.alarms ?? b.info?.alarms ?? []],
|
|
64023
64023
|
makerApp: m?.makerApp ?? b.info?.makerApp ?? "",
|
|
64024
|
-
makerAppOnly: [...m?.makerAppOnly ?? b.info?.makerAppOnly ?? []]
|
|
64024
|
+
makerAppOnly: [...m?.makerAppOnly ?? b.info?.makerAppOnly ?? []],
|
|
64025
|
+
clearFault: [...m?.clearFault ?? b.info?.clearFault ?? []]
|
|
64025
64026
|
}
|
|
64026
64027
|
};
|
|
64027
64028
|
}
|
|
@@ -64854,6 +64855,246 @@ function useRobotCloudService(credentials, options = {}) {
|
|
|
64854
64855
|
// src/services/ounitech.adapter.ts
|
|
64855
64856
|
import axios4 from "axios";
|
|
64856
64857
|
import { BadRequestError as BadRequestError137 } from "@7365admin1/node-server-utils";
|
|
64858
|
+
|
|
64859
|
+
// src/utils/ounitech-codes.util.ts
|
|
64860
|
+
var CLEAR = "Clear the fault (press and release the emergency stop)";
|
|
64861
|
+
var SUPPORT = "If it keeps happening, call Ounitech support";
|
|
64862
|
+
var DOCK = "Push it onto its charging dock so it can find its position again";
|
|
64863
|
+
var WAIT = "Wait until it is ready, then try again";
|
|
64864
|
+
var WHEEL = "Clear anything caught in the wheel and check the floor for holes";
|
|
64865
|
+
var NONE = "Normal when the emergency stop is pressed or released - no action needed";
|
|
64866
|
+
var T = {
|
|
64867
|
+
"100": ["Charging dock is over-heating", "Unplug the dock and let it cool down"],
|
|
64868
|
+
"101": ["Charging dock's clean-water tank is empty", "Fill the dock's clean-water tank"],
|
|
64869
|
+
"102": ["Charging dock's waste-water tank is full", "Drain the dock (unlock the dock, long-press Drain)"],
|
|
64870
|
+
"103": ["Charging dock valve or pump fault", `Check the pump connections. ${SUPPORT}`],
|
|
64871
|
+
"104": ["Charging dock valve or pump fault", `Check the pump connections. ${SUPPORT}`],
|
|
64872
|
+
"105": ["Charging dock valve or pump fault", `Check the pump connections. ${SUPPORT}`],
|
|
64873
|
+
"106": ["Charging dock valve or pump fault", `Check the pump connections. ${SUPPORT}`],
|
|
64874
|
+
"107": ["Charging dock valve or pump fault", `Check the pump connections. ${SUPPORT}`],
|
|
64875
|
+
"200": ["Battery not responding (flat for a long time)", "Charge it on the dock, or take the battery out and put it back"],
|
|
64876
|
+
"204": ["Wheel driver board offline", `Check the wheel wiring. ${SUPPORT}`],
|
|
64877
|
+
"205": ["Side-brush driver offline (side brush won't turn)", "Check the side-brush motor wire"],
|
|
64878
|
+
"206": ["Button panel offline (handle lights off)", `Check the handle's cable contact. ${SUPPORT}`],
|
|
64879
|
+
"207": ["Vacuum fan stalled", "Clean the vacuum pipe, HEPA filter, dust bag and tray"],
|
|
64880
|
+
"209": ["Vacuum fan fault", `${CLEAR}. ${SUPPORT}`],
|
|
64881
|
+
"210": ["Roller mop motor fault", "Take out the roller and clear anything tangled in it"],
|
|
64882
|
+
"211": ["Roller brush motor fault", "Take out the roller and clear anything tangled in it"],
|
|
64883
|
+
"212": ["Left side-brush motor fault", "Clear anything tangled in the side brush"],
|
|
64884
|
+
"213": ["Right side-brush motor fault", "Clear anything tangled in the side brush"],
|
|
64885
|
+
"214": ["Clean-water pump fault", `Re-plug the pump board. ${SUPPORT}`],
|
|
64886
|
+
"218": ["Waste-water pump fault", `Re-plug the pump board. ${SUPPORT}`],
|
|
64887
|
+
"219": ["Mop lift motor fault", `Restart the robot (power switch at the back). ${SUPPORT}`],
|
|
64888
|
+
"220": ["Brush lift motor fault", `Restart the robot (power switch at the back). ${SUPPORT}`],
|
|
64889
|
+
"221": ["Wheel fault", WHEEL],
|
|
64890
|
+
"222": ["Wheel fault", WHEEL],
|
|
64891
|
+
"223": ["Wheel stalled", WHEEL],
|
|
64892
|
+
"224": ["Wheel stalled", WHEEL],
|
|
64893
|
+
"228": ["Cooling fan fault", "Call Ounitech support"],
|
|
64894
|
+
"233": ["Battery short circuit", "Stop using the robot and call Ounitech support to replace the battery"],
|
|
64895
|
+
"234": ["Battery over-charged", "Take it off charge and call Ounitech support"],
|
|
64896
|
+
"245": ["Water-suction fan stalled", "Unclog the suction pipe and replace the filter"],
|
|
64897
|
+
"248": ["Squeegee motor fault", `Check the squeegee cable and motor. ${SUPPORT}`],
|
|
64898
|
+
"250": ["Battery full"],
|
|
64899
|
+
"251": ["Battery low"],
|
|
64900
|
+
"252": ["Battery too low to charge", "Call Ounitech support"],
|
|
64901
|
+
"255": ["Battery charging current high"],
|
|
64902
|
+
"256": ["Battery over-charged", "Take it off charge and call Ounitech support"],
|
|
64903
|
+
"257": ["Battery over 70 \xB0C", "Stop charging and let it cool down"],
|
|
64904
|
+
"302": ["Robot can't load its map", "Call Ounitech support"],
|
|
64905
|
+
"303": ["The map's area layout is damaged", "Re-edit the areas in the Ounitech app and save"],
|
|
64906
|
+
"304": ["The area layout doesn't match the map", "In the Ounitech app, switch to another floor map and back"],
|
|
64907
|
+
"305": ["Lost contact with its motion controller", "Restart the robot (power switch at the back)"],
|
|
64908
|
+
"306": ["Robot couldn't receive the chosen area", `${CLEAR}, then send the task again`],
|
|
64909
|
+
"307": ["Robot is finding its position again", "If the site has changed, push it onto its charging dock"],
|
|
64910
|
+
"308": ["Robot couldn't find its position", DOCK],
|
|
64911
|
+
"310": ["No signal from the charging dock", `Check the dock is powered. ${SUPPORT}`],
|
|
64912
|
+
"312": ["Couldn't dock", "Check the dock hasn't been moved"],
|
|
64913
|
+
"314": ["Couldn't dock - trying again", "Check the dock hasn't been moved"],
|
|
64914
|
+
"315": ["Couldn't dock - trying again", "Check the dock hasn't been moved"],
|
|
64915
|
+
"316": ["Lost the wireless link to its charging dock", "Check the dock is powered"],
|
|
64916
|
+
"319": ["Robot was moved while charging", "Press the emergency stop and push it back onto the dock"],
|
|
64917
|
+
"401": ["Battery below 10% - going to charge"],
|
|
64918
|
+
"403": ["Robot has left its charging dock"],
|
|
64919
|
+
"404": ["Charging dock reports a fault", "See the dock's other alerts"],
|
|
64920
|
+
"405": ["Couldn't call the lift"],
|
|
64921
|
+
"407": ["Lift is full"],
|
|
64922
|
+
"409": ["Couldn't switch map", "Call Ounitech support"],
|
|
64923
|
+
"410": ["Internal communication problem", SUPPORT],
|
|
64924
|
+
"415": ["Gyro data fault", `Check the cables. ${SUPPORT}`],
|
|
64925
|
+
"416": ["Wheel odometer data fault", `Check the cables. ${SUPPORT}`],
|
|
64926
|
+
"417": ["Laser scanner data fault", `Check the cables. ${SUPPORT}`],
|
|
64927
|
+
"418": ["Couldn't dock - trying again", "Check the dock hasn't been moved"],
|
|
64928
|
+
"419": ["Couldn't dock - trying again", "Check the dock hasn't been moved"],
|
|
64929
|
+
"420": ["Docking failed several times", "Check the dock's position and the robot's position"],
|
|
64930
|
+
"423": ["Dust box blocked", "Empty the dust box and clear the pipe"],
|
|
64931
|
+
"431": ["Robot's waste-water tank is high - returning to empty"],
|
|
64932
|
+
"432": ["Robot's clean water is low - returning to refill"],
|
|
64933
|
+
"433": ["Robot over-heating while charging", "Let it cool down"],
|
|
64934
|
+
"443": ["No charging current", "Seat the battery and clean the charging contacts"],
|
|
64935
|
+
"445": ["Area laser fault", "Call Ounitech support"],
|
|
64936
|
+
"446": ["Area laser board offline", "Call Ounitech support"],
|
|
64937
|
+
"448": ["Wheel drawing too much current", WHEEL],
|
|
64938
|
+
"449": ["Wheel over-current fault", `${WHEEL}, then clear the fault (press and release the emergency stop)`],
|
|
64939
|
+
"450": ["Wheels slipping", "Check the wheels"],
|
|
64940
|
+
"453": ["Robot tried to leave a no-go area", DOCK],
|
|
64941
|
+
"454": ["Robot hasn't moved for a long time", "Clear its path and wipe its sensors"],
|
|
64942
|
+
"457": ["Left bumper hit something", "Tap the bumper if it stays stuck"],
|
|
64943
|
+
"458": ["Right bumper hit something", "Tap the bumper if it stays stuck"],
|
|
64944
|
+
"459": ["Water suction blocked", "Clean the suction pipe and filters"],
|
|
64945
|
+
"460": ["Front camera fault", `Check the camera cable. ${SUPPORT}`],
|
|
64946
|
+
"462": ["Left camera fault", `Check the camera cable. ${SUPPORT}`],
|
|
64947
|
+
"464": ["Right camera fault", `Check the camera cable. ${SUPPORT}`],
|
|
64948
|
+
"469": ["The map's floor doesn't match the floor it senses", "Check it is on the right floor; the air-pressure sensor may need recalibrating"],
|
|
64949
|
+
"470": ["Gyro offline", "Call Ounitech support"],
|
|
64950
|
+
"471": ["Roller motor needs servicing", "Book a service"],
|
|
64951
|
+
"472": ["Fan needs servicing", "Book a service"],
|
|
64952
|
+
"500": ["Scheduled job skipped: floor can't be reached", "Cross-floor jobs need lift control"],
|
|
64953
|
+
"501": ["Scheduled job skipped: robot not ready to clean", "Check battery, water, tanks and dust box"],
|
|
64954
|
+
"502": ["Waited over 20 minutes for the lift - going to charge"],
|
|
64955
|
+
"503": ["Scheduled job done - going to charge"],
|
|
64956
|
+
"504": ["Job done - going to charge"],
|
|
64957
|
+
"505": ["Job cancelled - going to charge"],
|
|
64958
|
+
"506": ["Couldn't leave the charging dock", "Check the wheels"],
|
|
64959
|
+
"507": ["Clean water low - returning to refill, then continuing"],
|
|
64960
|
+
"508": ["Waste water high - returning to empty, then continuing"],
|
|
64961
|
+
"509": ["Dust box missing", "Fit the dust box"],
|
|
64962
|
+
"510": ["Clean-water tank missing", "Fit the clean-water tank"],
|
|
64963
|
+
"511": ["Waste-water tank missing", "Fit the waste-water tank"],
|
|
64964
|
+
"512": ["Tank cover missing", "Fit the tank cover"],
|
|
64965
|
+
"513": ["Top cover open", "Close the top cover"],
|
|
64966
|
+
"514": ["Handle is up (manual mode) - the app can't start a job", "Lower the handle"],
|
|
64967
|
+
"515": ["Battery below 10% - can't clean", "Let it charge"],
|
|
64968
|
+
"517": ["Robot is starting up - not ready yet", WAIT],
|
|
64969
|
+
"518": ["Robot is shutting down"],
|
|
64970
|
+
"519": ["Robot is resuming - not ready yet", WAIT],
|
|
64971
|
+
"520": ["Robot is finding its position - not ready yet", WAIT],
|
|
64972
|
+
"521": ["Robot is downloading its map - not ready yet", WAIT],
|
|
64973
|
+
"522": ["Couldn't resume: clean water below half", "Wait for it to refill"],
|
|
64974
|
+
"523": ["Couldn't resume: waste water too high", "Wait for it to empty"],
|
|
64975
|
+
"524": ["Charging dock doesn't match this robot", "Re-scan the dock's QR code in the Ounitech app"],
|
|
64976
|
+
"525": ["Scheduled time ended before the job finished", "Give the schedule a longer time window"],
|
|
64977
|
+
"527": ["Software updating", "Don't use the robot until it finishes"],
|
|
64978
|
+
"528": ["Software updating", "Don't use the robot until it finishes"],
|
|
64979
|
+
"529": ["Software updating", "Don't use the robot until it finishes"],
|
|
64980
|
+
"530": ["Software updating", "Don't use the robot until it finishes"],
|
|
64981
|
+
"531": ["Manual mode - the app's command was refused", "Lower the handle"],
|
|
64982
|
+
"532": ["Finding its starting position"],
|
|
64983
|
+
"534": ["Finding its starting position after a map switch"],
|
|
64984
|
+
"535": ["Areas updated"],
|
|
64985
|
+
"536": ["Virtual walls updated"],
|
|
64986
|
+
"537": ["Safe zones updated"],
|
|
64987
|
+
"538": ["Map saved"],
|
|
64988
|
+
"539": ["Couldn't save the map", "Save it again"],
|
|
64989
|
+
"540": ["Cliff sensor switched on"],
|
|
64990
|
+
"541": ["Cliff sensor switched off"],
|
|
64991
|
+
"542": ["Stopped at a drop (cliff sensor)", `Pull it back by the handle, ${CLEAR.charAt(0).toLowerCase()}${CLEAR.slice(1)}, and add a virtual wall there`],
|
|
64992
|
+
"543": ["Slowing down near a drop (cliff sensor)", "Add a virtual wall there if it keeps happening"],
|
|
64993
|
+
"544": ["Scheduled shutdown soon - returning to the dock"],
|
|
64994
|
+
"545": ["Edge cleaning started"],
|
|
64995
|
+
"546": ["Edge cleaning finished"],
|
|
64996
|
+
"549": ["Asking to switch map"],
|
|
64997
|
+
"552": ["No floor switch needed"],
|
|
64998
|
+
"553": ["Area can't be reached - job ended", "In the Ounitech app, switch map and back, or re-save an area"],
|
|
64999
|
+
"554": ["Sensor calibration"],
|
|
65000
|
+
"555": ["Sensor calibration - clear obstacles around the robot"],
|
|
65001
|
+
"556": ["Sensor calibration - clear obstacles around the robot"],
|
|
65002
|
+
"557": ["Slow zones updated"],
|
|
65003
|
+
"560": ["Fan stalled - returning to the dock", "Press and release the emergency stop, then check the fan"],
|
|
65004
|
+
"561": ["Couldn't reconnect to the charging dock", "Check the dock"],
|
|
65005
|
+
"562": ["Scheduled shutdown soon - no new jobs"],
|
|
65006
|
+
"563": ["Robot is in a fault state", "Find the cause, clear it (press and release the emergency stop), and check the robot"],
|
|
65007
|
+
"564": ["Fault cleared - robot on standby"],
|
|
65008
|
+
"565": ["Handling waste water"],
|
|
65009
|
+
"566": ["Waste water handled"],
|
|
65010
|
+
"567": ["Fan stalled", "Clear the fan, then resume"],
|
|
65011
|
+
"568": ["No charging dock on this floor", "Set the dock's floor in the Ounitech app"],
|
|
65012
|
+
"570": ["Finding its starting position - can't start yet", WAIT],
|
|
65013
|
+
"571": ["Stopped too long - side brush switched off", "Pause, then resume"],
|
|
65014
|
+
"572": ["Lift ride took too long - job cancelled", "Push it back onto its charging dock"],
|
|
65015
|
+
"573": ["Camera saw a drop", "Add a virtual wall 1 m from the drop"],
|
|
65016
|
+
"574": ["Map updating", WAIT],
|
|
65017
|
+
"575": ["Air-pressure sensor reading invalid", "Recalibrate the air-pressure sensor"],
|
|
65018
|
+
"576": ["Air-pressure sensor calibration"],
|
|
65019
|
+
"577": ["Air-pressure sensor calibration"],
|
|
65020
|
+
"578": ["Air-pressure sensor calibration"],
|
|
65021
|
+
"581": ["Taught route started"],
|
|
65022
|
+
"582": ["Taught route ended"],
|
|
65023
|
+
"583": ["Taught route cleared"],
|
|
65024
|
+
"585": ["An area's positioning mode changed"],
|
|
65025
|
+
"587": ["Battery discharging while on charge", "Seat the battery and clean the charging contacts"],
|
|
65026
|
+
"588": ["Switched off with the power button"],
|
|
65027
|
+
"589": ["Switched off by the timed power schedule"],
|
|
65028
|
+
"590": ["Switched on"],
|
|
65029
|
+
"591": ["Switched on with the power button"],
|
|
65030
|
+
"592": ["Switched on by the timed power schedule"],
|
|
65031
|
+
"593": ["Still finding its position - can't take commands yet", WAIT],
|
|
65032
|
+
"600": ["Left wheel driver offline", NONE],
|
|
65033
|
+
"601": ["Left wheel driver reset", NONE],
|
|
65034
|
+
"603": ["Left wheel drawing too much current", WHEEL],
|
|
65035
|
+
"604": ["Left wheel drawing too much current", WHEEL],
|
|
65036
|
+
"605": ["Left wheel stalled", WHEEL],
|
|
65037
|
+
"620": ["Right wheel driver offline", NONE],
|
|
65038
|
+
"621": ["Right wheel driver reset", NONE],
|
|
65039
|
+
"622": ["Right wheel driver error", "Call Ounitech support"],
|
|
65040
|
+
"623": ["Right wheel drawing too much current", WHEEL],
|
|
65041
|
+
"624": ["Right wheel drawing too much current", WHEEL],
|
|
65042
|
+
"625": ["Right wheel stalled", WHEEL],
|
|
65043
|
+
"640": ["A part is overdue for replacement - won't clean", "Replace the part"],
|
|
65044
|
+
"641": ["A running job is blocking the schedule", "Cancel the job or wait"],
|
|
65045
|
+
"642": ["Can't find its position while charging", "Put it on standby first"],
|
|
65046
|
+
"643": ["Can't reset the dock while charging", "Put it on standby first"],
|
|
65047
|
+
"644": ["Can't set its starting position while charging", "Put it on standby first"],
|
|
65048
|
+
"700": ["Vacuum button pressed"],
|
|
65049
|
+
"701": ["Standard button pressed"],
|
|
65050
|
+
"702": ["Dust-mop button pressed"],
|
|
65051
|
+
"703": ["Cancel button pressed"],
|
|
65052
|
+
"704": ["Strong button pressed"],
|
|
65053
|
+
"705": ["Mop button pressed"],
|
|
65054
|
+
"706": ["Pause button pressed"],
|
|
65055
|
+
"707": ["Recall button pressed"],
|
|
65056
|
+
"708": ["Pause button held"],
|
|
65057
|
+
"709": ["Pause button held"],
|
|
65058
|
+
"710": ["Wheel drawing too much current", WHEEL],
|
|
65059
|
+
"711": ["Wheel over-heating", "Let it cool and check the wheel"],
|
|
65060
|
+
"712": ["Wheel kept drawing too much current", `${WHEEL}, then clear the fault (press and release the emergency stop)`],
|
|
65061
|
+
"713": ["Switching lift - timed power paused"],
|
|
65062
|
+
"731": ["Robot locked by the dealer", "Ask the dealer"],
|
|
65063
|
+
"732": ["Voice file updated"],
|
|
65064
|
+
"733": ["Switched off from the app"],
|
|
65065
|
+
"737": ["Laser scanner motion-sensor fault", "Call Ounitech support"],
|
|
65066
|
+
"738": ["Can't start: clean water low", "Fill the clean-water tank"],
|
|
65067
|
+
"739": ["Can't start: waste water high", "Empty the waste-water tank"],
|
|
65068
|
+
"760": ["Map file missing", "Call Ounitech support"],
|
|
65069
|
+
"761": ["Map file damaged", "Call Ounitech support"],
|
|
65070
|
+
"762": ["Started from the wrong place (it was pushed)", "Push it back onto its charging dock"],
|
|
65071
|
+
"775": ["Moved by a person during a lift ride", "Cancel the job and push it back onto its charging dock"],
|
|
65072
|
+
"776": ["Boxed in", `Clear its path, wipe its sensors. ${DOCK}`],
|
|
65073
|
+
"777": ["Can't reach its target", `Clear its path, wipe its sensors. ${DOCK}`],
|
|
65074
|
+
"778": ["Couldn't dock - recovering by itself", "Check the dock's sensor and that the dock hasn't moved"],
|
|
65075
|
+
"779": ["Robot settings changed"],
|
|
65076
|
+
"780": ["Top cover open", "Close the top cover"],
|
|
65077
|
+
"781": ["Dust box not fitted", "Fit the dust box"],
|
|
65078
|
+
"782": ["Waste-water tank not fitted", "Fit the waste-water tank"],
|
|
65079
|
+
"785": ["Position ready"]
|
|
65080
|
+
};
|
|
65081
|
+
var _a;
|
|
65082
|
+
for (const c of [...range(740, 759), 763, 764, 783, 784])
|
|
65083
|
+
T[_a = String(c)] ?? (T[_a] = ["Sensor or camera calibration", "Recalibrate if it failed"]);
|
|
65084
|
+
var _a2;
|
|
65085
|
+
for (const c of range(765, 773))
|
|
65086
|
+
T[_a2 = String(c)] ?? (T[_a2] = ["QR code return-point / position scan", "Rescan if it failed"]);
|
|
65087
|
+
T["774"] ?? (T["774"] = ["Taught route saved"]);
|
|
65088
|
+
function range(a, b) {
|
|
65089
|
+
return Array.from({ length: b - a + 1 }, (_, i) => a + i);
|
|
65090
|
+
}
|
|
65091
|
+
var OUNITECH_CODES = T;
|
|
65092
|
+
function ounitechCodeWords(code) {
|
|
65093
|
+
const c = OUNITECH_CODES[code];
|
|
65094
|
+
return c ? c[1] ? `${c[0]}. ${c[1]}.` : c[0] : null;
|
|
65095
|
+
}
|
|
65096
|
+
|
|
65097
|
+
// src/services/ounitech.adapter.ts
|
|
64857
65098
|
var OUNITECH_BRAND = "ounitech";
|
|
64858
65099
|
var OUNITECH_CAPABILITIES = {
|
|
64859
65100
|
// Pose in the chapter-6 robot list (metres) and the tracking stream.
|
|
@@ -64882,8 +65123,9 @@ var OUNITECH_CAPABILITIES = {
|
|
|
64882
65123
|
// taskState carries the job and its %, shown in the status words; there is
|
|
64883
65124
|
// no command id to follow a job WE started, so completion is not claimed.
|
|
64884
65125
|
processCompletion: false,
|
|
65126
|
+
// The manual: "Combined cleaning" across floors exists in the Ounitech app and needs its
|
|
65127
|
+
// lift-control module (code 500 = floor unreachable); no API call starts one.
|
|
64885
65128
|
multiFloor: false,
|
|
64886
|
-
// plans can name floors; no API starts a cross-floor job
|
|
64887
65129
|
// `start-spot-cleaning` takes a PIXEL polygon while poses are metres, and
|
|
64888
65130
|
// whether y is flipped between the two is not documented. Hidden until one
|
|
64889
65131
|
// real robot confirms the frame.
|
|
@@ -65039,9 +65281,9 @@ function ounitechFault(list) {
|
|
|
65039
65281
|
}
|
|
65040
65282
|
function faultWords(a) {
|
|
65041
65283
|
if (!a.code)
|
|
65042
|
-
return { code: "error", message: a.message.slice(0,
|
|
65043
|
-
const words =
|
|
65044
|
-
return { code: a.code.slice(0, 60), message: words
|
|
65284
|
+
return { code: "error", message: a.message.slice(0, 300) };
|
|
65285
|
+
const words = alertWords(a.code) ?? a.vendorText ?? a.message;
|
|
65286
|
+
return { code: a.code.slice(0, 60), message: `${a.code} \xB7 ${words}`.slice(0, 300) };
|
|
65045
65287
|
}
|
|
65046
65288
|
function ounitechMapShare(map, x, y, clamp4 = false) {
|
|
65047
65289
|
const w = map?.width, h = map?.height, r = map?.resolution;
|
|
@@ -65189,22 +65431,8 @@ function ounitechTaskRecord(t, maps = [], tz = 480) {
|
|
|
65189
65431
|
floorNo: Number.isInteger(t.floorNo) ? t.floorNo : map?.floorNo ?? null
|
|
65190
65432
|
};
|
|
65191
65433
|
}
|
|
65192
|
-
var
|
|
65193
|
-
|
|
65194
|
-
"206": "Button panel offline",
|
|
65195
|
-
// 306 "接收定点指定区域故障": seen live 30 Sep right after start-area-cleaning on an area with no centre point.
|
|
65196
|
-
"306": "Robot couldn't receive the chosen cleaning area",
|
|
65197
|
-
"540": "Floor check: cliff sensor switched on",
|
|
65198
|
-
"563": "Robot is in a fault state",
|
|
65199
|
-
"588": "Switched off with the power button",
|
|
65200
|
-
"589": "Switched off by the timed power schedule",
|
|
65201
|
-
"593": "Still finding its position - try again shortly",
|
|
65202
|
-
"601": "Left wheel driver reset",
|
|
65203
|
-
"620": "Right wheel driver offline",
|
|
65204
|
-
"621": "Right wheel driver reset",
|
|
65205
|
-
"734": "IMU zero offset too large",
|
|
65206
|
-
"785": "Localisation ready"
|
|
65207
|
-
};
|
|
65434
|
+
var VENDOR_TEXT_EN = { "734": "IMU zero offset too large" };
|
|
65435
|
+
var alertWords = (code) => code ? ounitechCodeWords(code) ?? VENDOR_TEXT_EN[code] ?? null : null;
|
|
65208
65436
|
var ALERT_LEVEL_WORDS = { \u63D0\u793A: "Notice", \u8B66\u544A: "Warning", \u6545\u969C: "Fault", \u9519\u8BEF: "Error", \u4E25\u91CD: "Critical" };
|
|
65209
65437
|
function ounitechAlertRecord(a, tz = 480) {
|
|
65210
65438
|
const raw = String(a.errMsg ?? a.errCode ?? "").trim();
|
|
@@ -65220,7 +65448,7 @@ function ounitechAlertRecord(a, tz = 480) {
|
|
|
65220
65448
|
code,
|
|
65221
65449
|
level: lv ? ALERT_LEVEL_WORDS[lv[1].trim()] ?? lv[1].trim() : null,
|
|
65222
65450
|
// An untranslated Chinese text keeps its code up front, so the row is never only Chinese.
|
|
65223
|
-
message:
|
|
65451
|
+
message: alertWords(code) ?? (/[㐀-鿿]/.test(rest || raw) && code ? `Robot alert ${code}: ${rest || raw}` : rest || raw),
|
|
65224
65452
|
vendorText: rest || raw,
|
|
65225
65453
|
resolved,
|
|
65226
65454
|
at: ounitechTime(a.createTime, tz)
|
|
@@ -65598,7 +65826,7 @@ function createOunitechAdapter(credentials, options) {
|
|
|
65598
65826
|
const blind = command.areas.filter((n) => centre.has(n) && !centre.get(n));
|
|
65599
65827
|
if (blind.length) {
|
|
65600
65828
|
throw new BadRequestError137(
|
|
65601
|
-
`${blind.map((n) => `"${n}"`).join(", ")} has no centre point on the robot's map, so the robot can't be sent there (it stops with fault 306). Use Clean all, or redraw the area in the Ounitech app
|
|
65829
|
+
`${blind.map((n) => `"${n}"`).join(", ")} has no centre point on the robot's map, so the robot can't be sent there (it stops with fault 306). ` + (blind.includes("default") ? `"default" is the whole map before it is divided into areas. Use Clean all, or divide the map in the Ounitech app (Control -> Divide areas).` : "Use Clean all, or redraw the area in the Ounitech app.")
|
|
65602
65830
|
);
|
|
65603
65831
|
}
|
|
65604
65832
|
await cloud.startAreaCleaning(robotSn, command.areas, options2);
|
|
@@ -65861,7 +66089,17 @@ var OUNITECH_BRAND_DEFINITION = {
|
|
|
65861
66089
|
{ name: "Q3-G", codes: ["Q3G", "Q3-G"] },
|
|
65862
66090
|
{ name: "Q3-W", codes: ["Q3W", "Q3-W"] }
|
|
65863
66091
|
],
|
|
65864
|
-
info: {
|
|
66092
|
+
info: {
|
|
66093
|
+
makerApp: "the Ounitech app",
|
|
66094
|
+
makerAppOnly: ["pausing or stopping a job", "cleaning across floors", "changing maps, areas and schedules"],
|
|
66095
|
+
// Q3-G User Manual / Troubleshooting Checklist (2026-09-30). The API has no documented way to clear an Error.
|
|
66096
|
+
clearFault: [
|
|
66097
|
+
'Press the red emergency stop on top of the robot, then turn it clockwise to release it. It says "emergency stop button bounced" and the fault clears.',
|
|
66098
|
+
"If it has lost its position: lift the handle, push it onto its charging dock until the metal contacts touch, then press and release the emergency stop. It relocates by itself.",
|
|
66099
|
+
"Still stuck: restart it with the power switch at the back. It is ready when only the child-lock light stays on.",
|
|
66100
|
+
"Handle buttons not responding: press Child lock 3 times to unlock them."
|
|
66101
|
+
]
|
|
66102
|
+
},
|
|
65865
66103
|
create: (credentials) => createOunitechAdapter(credentials)
|
|
65866
66104
|
};
|
|
65867
66105
|
function registerOunitechBrand() {
|
|
@@ -71153,7 +71391,7 @@ function toBuildingYaml(name, rmf) {
|
|
|
71153
71391
|
}
|
|
71154
71392
|
const lifts = {};
|
|
71155
71393
|
for (const l of rmf.lifts) {
|
|
71156
|
-
const
|
|
71394
|
+
const range2 = liftFloorRange(l, rmf.levels);
|
|
71157
71395
|
lifts[l.name] = {
|
|
71158
71396
|
x: l.x,
|
|
71159
71397
|
y: l.y,
|
|
@@ -71161,9 +71399,9 @@ function toBuildingYaml(name, rmf) {
|
|
|
71161
71399
|
width: l.widthM,
|
|
71162
71400
|
depth: l.depthM,
|
|
71163
71401
|
reference_floor_name: l.referenceFloor,
|
|
71164
|
-
initial_floor_name:
|
|
71165
|
-
lowest_floor:
|
|
71166
|
-
highest_floor:
|
|
71402
|
+
initial_floor_name: range2.initial,
|
|
71403
|
+
lowest_floor: range2.lowest,
|
|
71404
|
+
highest_floor: range2.highest,
|
|
71167
71405
|
doors: Object.fromEntries(
|
|
71168
71406
|
l.doors.map((d) => [d.name, { door_type: LIFT_DOOR_TYPE_INT[d.type] ?? 2, x: d.x, y: d.y, width: d.widthM, motion_axis_orientation: d.axisYawRad }])
|
|
71169
71407
|
),
|
|
@@ -71213,13 +71451,13 @@ function toNavGraphs(name, rmf) {
|
|
|
71213
71451
|
const out = {};
|
|
71214
71452
|
const elevation = new Map(rmf.levels.map((l) => [l.name, l.elevationM]));
|
|
71215
71453
|
const shafts = rmf.lifts.map((l) => {
|
|
71216
|
-
const
|
|
71454
|
+
const range2 = liftFloorRange(l, rmf.levels);
|
|
71217
71455
|
return {
|
|
71218
71456
|
lift: l,
|
|
71219
71457
|
verts: liftShaft(l),
|
|
71220
71458
|
// lift.py: no lowest / highest floor = no bound; a lift with no level_doors marks nothing.
|
|
71221
|
-
lo: elevation.get(
|
|
71222
|
-
hi: elevation.get(
|
|
71459
|
+
lo: elevation.get(range2.lowest) ?? -Infinity,
|
|
71460
|
+
hi: elevation.get(range2.highest) ?? Infinity,
|
|
71223
71461
|
hasDoors: l.levelDoors.length > 0
|
|
71224
71462
|
};
|
|
71225
71463
|
});
|