Skip to content

Commit

Permalink
Merge dev (#660)
Browse files Browse the repository at this point in the history
* S6 doesn't support any carpet mode

* S6 doesn't support shake mop strength

* Remove unsupported node 18.x from tests

* Make isElectronicWaterBoxSupported always false for now

* Revert "S6 doesn't support any carpet mode"

This reverts commit 0e9a230.

* fix getting robot model in initializeDeviceUpdates() (#659)

* @napi-rs/canvas baby!

Migrate from canvas to @napi-rs/canvas
@napi-rs/canvas is written in rust, has multithreating and is based on Skia instead of cairo. This should be a good performance boost for map rendering.

* Update test-and-release.yml

* Update README.md

* Add minimal Roborock Qrevo S support

* Add minimal Qrevo Curve support

* Always request get_network_info regardless of connection state

* Add most Qrevo S features

* Add more Qrevo S features

* Wait for dss objects to be created

* Prepare  chai and mocha versions for future tests

* Fix app_zoned_clean command validation

* More preps for tests

* Fix lint script

* Update package.json

* Add most Qrevo Curve features

* Update README.md

* More Qrevo Curve features

* Fix Qrevo Curve definitions

* Revert "Merge branch 'main' into dev"

This reverts commit 4521922, reversing
changes made to f1ee7be.

* Merge branch 'main' into dev

---------

Co-authored-by: Black-Thunder <[email protected]>
  • Loading branch information
copystring and Black-Thunder authored Oct 2, 2024
1 parent 2851140 commit 4ddd51b
Show file tree
Hide file tree
Showing 10 changed files with 1,146 additions and 1,209 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: ioBroker/testing-action-check@v1
with:
node-version: '18.x'
node-version: '20.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
lint: true
Expand All @@ -40,7 +40,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x]
os: [ubuntu-latest, windows-latest]

steps:
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
steps:
- uses: ioBroker/testing-action-deploy@v1
with:
node-version: '18.x'
node-version: '20.x'
# Uncomment the following line if your adapter cannot be installed using 'npm ci'
# install-command: 'npm install'
npm-token: ${{ secrets.NPM_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_rr_zips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Create Pull Request
if: steps.changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Updates for packages from roborock server"
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ This adapter allows you the control, get states, cleaning history and view the m
- Roborock Q8 Max
- Roborock Q5 Pro
- Roborock Q Revo Pro
- Roborock Qrevo S
- Roborock Qrevo Curve

## Zone cleaning
This feature only works when map creation is enabled in the adapter options!
Expand All @@ -53,6 +55,13 @@ This feature only works when map creation is enabled in the adapter options!
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
* (copystring) Bugfixes
* (copystring) update test-and-release.yml
* (Black-Thunder) Fix S6 feature detection
* (copystring) Migrate from canvas to @napu-rs/canvas
* (copystring) Add Qrevo S & Qrevo Curve

### 0.6.15 (2024-09-22)
* (copystring) Refactor some code
* (copystring) improve handling of online/offline detection and related logging
Expand Down
58 changes: 55 additions & 3 deletions lib/deviceFeatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,16 @@ const actions = {
},
set_clean_fluid: () => {
deviceStates.clean_fluid = "number";
}
},
set_extra_time: () => {
cleaningRecordsString.extra_time = "number";
},
set_cleaning_info: () => {
deviceStates.cleaning_info = "string";
},
set_exit_dock: () => {
deviceStates.exit_dock = "number";
},
};

class deviceFeatures {
Expand Down Expand Up @@ -590,12 +599,13 @@ class deviceFeatures {
"roborock.vacuum.a87", // Qrevo MaxV
"roborock.vacuum.a101", // Q Revo Pro
"roborock.vacuum.a97", // S8 MaxV (Ultra)
"roborock.vacuum.a104", // Roborock Qrevo S
"roborock.vacuum.a135" // Qrevo Curve
].includes(robotModel),
// isShakeMopStrengthSupported: p.DMM.currentProduct == p.Products.TanosS || p.DMM.currentProduct == p.Products.TanosSPlus || p.DMM.isGarnet || p.DMM.isTopazSV || p.DMM.isPearlPlus || p.DMM.isCoral || p.DMM.isTopazS || p.DMM.isTopazSPlus || p.DMM.isTopazSC || p.DMM.isTopazSV || p.DMM.isPearlPlus || p.DMM.isTanosSMax || p.DMM.isUltron || p.DMM.isUltronSPlus || p.DMM.isUltronSMop || p.DMM.isUltronSV || p.DMM.isPearl
isShakeMopStrengthSupported: [
"roborock.vacuum.a08", // S6 Pure
"roborock.vacuum.a10", // S6 MaxV
"roborock.vacuum.s6", // S6
"roborock.vacuum.a62", // S7 Pro Ultra
"roborock.vacuum.a51", // S8
"roborock.vacuum.a15", // S7
Expand Down Expand Up @@ -631,6 +641,8 @@ class deviceFeatures {
"roborock.vacuum.a87", // Qrevo MaxV
"roborock.vacuum.a101", // Q Revo Pro
"roborock.vacuum.a97", // S8 MaxV (Ultra)
"roborock.vacuum.a104", // Roborock Qrevo S
"roborock.vacuum.a135" // Qrevo Curve
].includes(robotModel),
isCustomWaterBoxDistanceSupported: !!(2147483648 & this.features),
isBackChargeAutoWashSupported: this.featuresStr && !!(4096 & parseInt("0x" + this.featuresStr.slice(-8))),
Expand All @@ -651,19 +663,22 @@ class deviceFeatures {
"roborock.vacuum.a87", // Qrevo MaxV
"roborock.vacuum.a101", // Q Revo Pro
"roborock.vacuum.a97", // S8 MaxV (Ultra)
"roborock.vacuum.a104", // Roborock Qrevo S
"roborock.vacuum.a135" // Qrevo Curve
].includes(robotModel),
// this isn't the correct way to use this. This code must be from a different robot
// isVoiceControlSupported: !!(parseInt(`0x${this.featuresStr || "0"}`.slice(-10, -9)) & 2),
isVoiceControlSupported: [
"roborock.vacuum.a27", // S7 MaxV (Ultra)
],
isElectronicWaterBoxSupported: [], // nothing for now. If this is needed, add the models here
isElectronicWaterBoxSupported: false, // nothing for now. If this is needed, add the models here
isCleanRouteFastModeSupported: this.featuresStr && !!(256 & parseInt("0x" + this.featuresStr.slice(-8))),
isVideoLiveCallSupported: [
"roborock.vacuum.a10", // S6 MaxV
"roborock.vacuum.a27", // S7 MaxV (Ultra)
"roborock.vacuum.a97", // S8 MaxV (Ultra)
"roborock.vacuum.a87", // Qrevo MaxV
"roborock.vacuum.a135", // Qrevo Curve
].includes(robotModel),
};
}
Expand Down Expand Up @@ -841,6 +856,43 @@ class deviceFeatures {
"set_map_flag",
"set_task_id",
],
// Roborock Qrevo S
"roborock.vacuum.a104": [
"setCleaningRecordsString",
"setConsumablesInt",
"set_in_warmup",
"set_charge_status",
"set_clean_percent",
"set_rss",
"set_dss",
"set_common_status",
"set_kct",
"set_switch_status",
"set_map_flag",
"set_cleaned_area",

],
// Roborock Qrevo Curve
"roborock.vacuum.a135": [
"setCleaningRecordsString",
"setConsumablesInt",
"set_monitor_status",
"set_in_warmup",
"set_clean_percent",
"set_extra_time",
"set_rss",
"set_common_status",
"set_kct",
"set_switch_status",
"set_last_clean_t",
"set_cleaning_info",
"set_exit_dock",
"set_charge_status",
"set_map_flag",
"set_cleaned_area",
"set_task_id",
"set_extra_time",
],
};

// process modelConfig
Expand Down
Loading

0 comments on commit 4ddd51b

Please sign in to comment.