Comments (9)
Will test those 2 in the morning!
I set motorstate to 10 and 100 I think, but can't say I'm 100% sure.
Will set up some tests to check!
from dirigera.
That is all correct, as well as the list low, medium, high, on and off. I didnt see any change with on, but it also doesnt throw any errors. I turned the fan off using fanMode off, then tried to turn it back on with fanMode: on and that did not turn it back to the setting it was before. Id have to do fanMode: high to get it back to the high state which it was before turning it off
from dirigera.
The motorState for low is 10, medium is 30 and high is 50.
Ill enclose the output of client.airPurifiers.get for my device, incase that helps you at all
{
id: '5dba0600-d190-4d28-868d-fb70837b4973_1',
type: 'airPurifier',
deviceType: 'airPurifier',
createdAt: '2024-02-01T10:19:24.000Z',
isReachable: true,
lastSeen: '2024-02-02T21:18:06.000Z',
attributes: {
customName: 'Air purifier',
firmwareVersion: '1.1.001',
hardwareVersion: '1',
manufacturer: 'IKEA of Sweden',
model: 'STARKVIND Air purifier',
productCode: 'E2007',
serialNumber: '84BA20FFFEE29787',
fanMode: 'low',
fanModeSequence: 'lowMediumHighAuto',
motorRuntime: 0,
motorState: 10,
filterAlarmStatus: false,
filterElapsedTime: 1850,
filterLifetime: 259200,
childLock: false,
statusLight: false,
currentPM25: 9,
identifyPeriod: 0,
identifyStarted: '2000-01-01T00:00:00.000Z',
permittingJoin: false,
otaPolicy: 'autoUpdate',
otaProgress: 0,
otaScheduleEnd: '00:00',
otaScheduleStart: '00:00',
otaState: 'readyToCheck',
otaStatus: 'upToDate'
},
capabilities: {
canSend: [],
canReceive: [
'customName',
'fanMode',
'fanModeSequence',
'motorState',
'childLock',
'statusLight'
]
},
room: {
id: '135aedd3-a385-466a-a5f4-b2d13bfb2e46',
name: 'Bedroom',
color: 'ikea_yellow_no_24',
icon: 'rooms_bed'
},
deviceSet: [],
remoteLinks: [],
isHidden: false
}
from dirigera.
Awesome, thank you very much for testing everything! I'm going to update the relevant types and docs, and publish a new version of the library soon.
from dirigera.
New typings are available in version 0.15.3
🎉 I'm closing this one.
By the way, if you happen to own a motion sensor or roller blinds with remote controls, then a similar testing with those would be a great contribution to the library!
from dirigera.
Hey there! 🙂
There are a couple of device categories which I don't own, including the air purifiers, so I've not tested this part of the library. Which means that there's a good chance that something's off within the library this time. 😄
I'd highly appreciate if you could test the setFanMode
and the setChildLock
functions as well and report back if you face any issues.
Circling back to the setMotorState
problem, I've found a couple of dumps in other repositories which indicate that the input value should be between 0 and 50. Have you tested the function within that range as well?
from dirigera.
So yes, the max speed is 50 for the motorState
setChildLock and setFanMode seem to work perfectly, no errors at all!
from dirigera.
And the second i press send on that it errors with
HTTPError [DirigeraError]: {"error":"Error","message":"\"attributes\" does not match any of the allowed types"}
at Request.<anonymous> (file:///C:/Users/kiter/Desktop/ikea/node_modules/got/dist/source/as-promise/index.js:86:42)
at Object.onceWrapper (node:events:633:26)
at Request.emit (node:events:530:35)
at Request._onResponseBase (file:///C:/Users/kiter/Desktop/ikea/node_modules/got/dist/source/core/index.js:603:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Request._onResponse (file:///C:/Users/kiter/Desktop/ikea/node_modules/got/dist/source/core/index.js:645:13) {
input: undefined,
code: 'ERR_NON_2XX_3XX_RESPONSE',
In the error it also shows
body: '[{"attributes":{"fanMode":"manual"}}]',
So just manual doesnt work for setFanMode
from dirigera.
Just to make sure I understand:
- Turning on the child lock with
.setChildLock({ id: "...", childLock: true })
works ✅ - Turning off the child lock with
.setChildLock({ id: "...", childLock: false })
works ✅ - Setting the motor speed with
.setMotorState({ id: "...", motorState: <number> })
works, as long as number is between 0 and 50 ✅ - Setting the motor speed to 100 with
.setMotorState({ id: "...", motorState: 100 })
fails 🚫, so I need to update the documentation with the acceptable range for themotorState
attribute .setFanMode({ id: "...", fanMode: "auto" })
works ✅.setFanMode({ id: "...", fanMode: "off" })
works ✅.setFanMode({ id: "...", fanMode: "manual" })
fails 🚫, so there's something wrong here
Can you check if all of the above is correct? 🙂
If everything's correct, then could you also test if the following fanMode
values work?
- low
- medium
- high
- on
TypeScript may scream at you because these aren't allowed in the current typings, so just throw a // @ts-ignore
above the line for the sake of testing.
from dirigera.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dirigera.