Repository navigation
feat: port pySwitchbot 3.8.3-3.15.1 - #366
Merged
Merged
Conversation
New in pySwitchbot 3.9.0-3.15.1:
- Art Frame 2 (3.10.0) and E Ink Photo Magnet (3.9.0): new WoArtFrame2 and
WoEInkPhotoMagnet classes (encrypted sequence devices). Product IDs
0011f1c0/0111f1c0 and 001295d0/011295d0, cloud model codes W1176000 and
W1218000, the image frame advertisement (battery, charging, 16-bit image
index, display flags), and the BLE commands: getFrameInfo (5702),
nextImage/prevImage (570f7a07 01/00), setImage/randomImage (570f7a02 +
16-bit id), getImageIds (paged bitmap, 570f7b07 + packet).
- Lock Pro battery bays and advertisement alarms (3.11.0):
WoSmartLockPro.getBatteryBays() (570f4f0409, Lock Pro only); the Lock Pro
advertisement now reports batteryCharging, powerAlarm, doorMagnetAlarm
and both battery compartment alarms; the Lock Pro WiFi gets its own
layout ('proWifi') with only the compartment and low temperature alarms.
- Meter Pro / Meter Pro CO2 (3.12.0-3.15.1): weather display
(get/setWeather, read-write-verify, write never retried), display zones
and icons, data update interval, date format, battery icon, temperature
unit, button functions, calibration, comfort level, temperature/humidity
alarm and alarm mode/volume on WoSensorTHPro; CO2 sampling, calibration,
USB power state, update intervals, CO2 alarm and level thresholds on
WoSensorTHProCO2, which now extends WoSensorTHPro. Inputs are validated
before sending, as in 3.15.1. Enums MeterPro* are exported.
- SwitchbotOperationError is now exported from the package.
Not applicable:
- 3.8.3 connected lock status (81352fa): node-switchbot reads lock state
only from advertisements (already ignoring unknown statuses since
fa754c8); it has no connected lock-status parser.
- 3.8.4 background task logging (d46452e): asyncio plumbing.
- 3.10.1 truncated light status replies (c777da0): node-switchbot's light
classes do not parse multi-command status replies.
Not ported: the Meter Pro time offset and datetime commands, which
predate 3.8 and were never ported.
The guide now says product-ID devices are mapped in PRODUCT_ID_MODEL_MAP
when adding a device class.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LzktUspaxcZ9Dh5WVEtf5W
SwitchBotAPI documents the Art Frame 2 as deviceType "AI Art Frame 2" with next and previous commands (OpenWonderLabs/SwitchBotAPI#526). Resolve it to WoArtFrame2, and let nextImage/prevImage fall back to those OpenAPI commands when BLE is unavailable or fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LzktUspaxcZ9Dh5WVEtf5W
donavanbecker
added a commit
that referenced
this pull request
Nov 20, 2026
…26) (#368) ## What changed SwitchBotAPI added device pages in OpenWonderLabs/SwitchBotAPI#520 and #526. This covers the ones that map onto existing classes: | OpenAPI deviceType | Resolves to | Why | | --- | --- | --- | | `Curtain4` (and `Curtain 4`) | `WoCurtain` | [curtain-4.md](https://github.com/OpenWonderLabs/SwitchBotAPI/blob/latest/devices/curtains-blinds/curtain-4.md): same `setPosition` `index,mode,position`, `turnOn`/`turnOff`, `pause` | | `Robot Vacuum Cleaner S30` | `WoVacuumS20` | [floor-cleaning-robot-s30.md](https://github.com/OpenWonderLabs/SwitchBotAPI/blob/latest/devices/robot-vacuum/floor-cleaning-robot-s30.md): same `startClean` with `waterLevel`, `dock` | | `Robot Vacuum Cleaner K11 Plus Pro` | `WoVacuumK11Plus` | [robot-vacuum-k11-pro.md](https://github.com/OpenWonderLabs/SwitchBotAPI/blob/latest/devices/robot-vacuum/robot-vacuum-k11-pro.md): same `startClean` shape, `dock` | `WoArtFrame` (`AI Art Frame`) gains `nextImage()` / `prevImage()`, sending the new OpenAPI `next` / `previous` commands ([ai-art-frame.md](https://github.com/OpenWonderLabs/SwitchBotAPI/blob/latest/devices/others/ai-art-frame.md)). `AI Art Frame 2` is handled in #366, which adds `WoArtFrame2`. Each is pinned in `test/devices/openapi-commands.test.ts`. Not mapped: `Vision Doorbell`, `Outdoor Pan/Tilt Cam 3K` and `Solar Pan/Tilt Cam 2K` (cameras: status only, or motion-detection toggles that no node-switchbot class models yet). ## Breaking changes None. ## For homebridge-switchbot Add `Curtain4`, `Robot Vacuum Cleaner S30` and `Robot Vacuum Cleaner K11 Plus Pro` to `DEVICE_TYPES` / normalization once this is published. ## Checks `npm run build`, `npm test` and `npm run lint` pass locally. --- _Generated by [Claude Code](https://claude.ai/code)_ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Ports pySwitchbot 3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.15.0 and 3.15.1. 3.8.3, 3.8.4 and 3.10.1 were checked and don't apply (see below).
WoArtFrame2andWoEInkPhotoMagnetclasses. Encrypted, so they needsetKey. Recognised over BLE by product ID (0011f1c0/0111f1c0,001295d0/011295d0); cloud codesW1176000/W1218000and the OpenAPI deviceTypeAI Art Frame 2resolve to the same classes. Status (battery, charging, 16-bit image index, display flags) comes from the advertisement. Methods:getFrameInfo,getImageIds,nextImage,prevImage,randomImage,setImage(index).nextImage/prevImagefall back to the OpenAPInext/previouscommands (ai-art-frame-2.md); the other frame commands are BLE-only.getBatteryBays(). Lock Pro advertisements now reportbatteryCharging,powerAlarm,doorMagnetAlarm,leftBatteryCompartmentAlarmandrightBatteryCompartmentAlarm; Lock Pro WiFi reports only the two compartment alarms (and low temperature).triggerCo2Sampling,startCo2Calibration,isUsbPowered, battery/USB update intervals,getCo2Alarm/setCo2AlarmandgetCo2LevelThresholds/setCo2LevelThresholds. Inputs are validated before sending, as in 3.15.1.WoSensorTHProCO2now extendsWoSensorTHPro. TheMeterPro*enums andSwitchbotOperationErrorare exported.PRODUCT_ID_MODEL_MAP.Tests use pySwitchbot's own fixtures (
test/devices/pyswitchbot-3.9-3.11.test.ts,test/devices/meter-pro-settings.test.ts), plustest/devices/openapi-commands.test.tsforAI Art Frame 2.Not applicable / not ported
WoArtFramestill extendsWoBulb; aligning it with pySwitchbot's Art Frame would change behaviour, so it is left alone (feat: support new OpenAPI device types from SwitchBotAPI (November 2026) #368 adds its OpenAPI next/previous).deleteImage/uploadImagefor the frames are not implemented.Breaking changes
None.
For homebridge-switchbot
New device types
Art Frame 2/AI Art Frame 2andE Ink Photo Magnet. They expose battery,batteryChargingandimageIndex, plus next/previous image commands. The Meter Pro and lock methods are optional extras. A follow-up PR there will come after this is published.Related docs: OpenWonderLabs/SwitchBotAPI-BLE#57.
Checks
npm run build,npm test(611 tests),npm run lintandnpm run lint-docspass locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01LzktUspaxcZ9Dh5WVEtf5W