Add support for LTF-F422S-KEU
Hey,
i dont manage to capture the packages. But I can share the device.
https://levoit.com/collections/tower-fans/products/levoit-classic-42-inch-smart-tower-fan
Best regards!
API
setSwitch
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
powerSwitch: 1 | 0 (boolean as int)
switchIdx: 0
},
method: 'setSwitch',
source: 'APP'
}
getTowerFanStatus
/cloud/v2/deviceManaged/bypassV2 -> {
method: 'getTowerFanStatus',
source: 'APP'
}
setOscillationSwitch
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
oscillationSwitch: 1 | 0 (boolean as int)
},
method: 'setOscillationSwitch',
source: 'APP'
}
setTowerFanMode
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
workMode: 'advancedSleep' | 'auto' | 'turbo' | 'normal'
},
method: 'setTowerFanMode',
source: 'APP'
}
setLevel
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
manualSpeedLevel: 1-12,
levelType: 'wind',
levelIdx: 0
},
method: 'setLevel',
source: 'APP'
}
setDisplay
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
screenSwitch: 1 | 0 (boolean as int)
},
method: 'setDisplay',
source: 'APP'
}
setMuteSwitch
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
muteSwitch: 1 | 0 (boolean as int)
},
method: 'setMuteSwitch',
source: 'APP'
}
setDisplayingType
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
displayingType: 1 | 0 (boolean as int)
},
method: 'setDisplayingType',
source: 'APP'
}
setSleepPreference
/cloud/v2/deviceManaged/bypassV2 -> {
data: {
sleepPreferenceType: string,
oscillationSwitch: 1 | 0,
initFanSpeedLevel: 0-12,
fallAsleepRemain: 1 | 0,
autoChangeFanLevelSwitch: 1 | 0
},
method: 'setSleepPreference',
source: 'APP'
}
Models
'LTF-F422S-KEU', 'LTF-F422S-WUSR', 'LTF-F422_WJP', 'LTF-F422S-WUS'
Everything is working for me except setSleepPreference, which I have not tested since I don't need it in my TypeScript app.
Thank you, @webdjoe, for this repo; it helped me a lot to develop my own app for Homey Pro. My backend is heavily inspired by this repo.
All the API endpoints and payloads were extracted from the APK for Android.
Best regards!
@webdjoe I think this can be closed, do you know when you plan to make the next release?
I'm working on some docs, I'll get it out this weekend.
This has been released, thank you for contributing!
Hi! Is there actually a way to set the oscillation switch? I noticed the API was called out in this ticket but I'm not seeing the functionality in the sdk. The displayJSON() does dump the oscillation info.
{
"traceId": "xxxx",
"code": 0,
"msg": "request success",
"module": null,
"stacktrace": null,
"result": {
"traceId": "xxxx",
"code": 0,
"result": {
"powerSwitch": 1,
"workMode": "normal",
"manualSpeedLevel": 7,
"fanSpeedLevel": 7,
"screenState": 1,
"screenSwitch": 1,
"oscillationSwitch": 1,
"oscillationState": 1,
"muteSwitch": 1,
"muteState": 1,
"timerRemain": 0,
"temperature": 656,
"humidity": 25,
"thermalComfort": 57,
"errorCode": 0,
"sleepPreference": {
"sleepPreferenceType": "default",
"oscillationSwitch": 0,
"initFanSpeedLevel": 0,
"fallAsleepRemain": 0,
"autoChangeFanLevelSwitch": 0
},
"scheduleCount": 10,
"displayingType": 0
}
}
}