Closed MichB2 closed 2 years ago
In fact call "getData()" and print the JSON structure ... in fact the colmmands follow exactly that structure
In a evice of mine it would be
setData('climateControl', 'operationMode', 'fanOnly')
In fact you need to provide at least two parameters plus value ... sometimes also a thuird parametr and then value
Next version will prevent the crash :-)
Great thank you very much it works :-)
Hello,
Sorry I have another question if I run the example file I get the values on all the devices how to say just update on of them ?
Thank you
I did not had time to really figure out how this could be done with the API (hence no time), so right now you can only reload the full device ... but effectively this also makes sense in some cases because e.g. when turning the device on several opther states also change their values like the temperature sensors
Ahhh ok stop ... dev.updateData() is your friend ... I thought you mean to update just one datapoint
i have 4 devices Living room Kids 1 Kids 2 Bedroom
my question is how to identify the device which is in the living room and just send the new parameters only to this device. Is that possible?
devices is an array of device objects. each represent one device with getId() and updateData() which then only is done on this device
Thank you for your help I am novice in programming .... i tried to find out but i don t know how to do :-( can you show me an example please?
XYou run example.js.... right?? it is exactly in there that way variable "dev" is the device object ... "dev.updateData()" will update it
yes i run example.js dev.updateData() update all units not just one of them
No, this can't be ... ok IF you put a dev.UupdateData() in that loop over all devices then yes it will be that way because all are updated after each other.
So in fact you get an array with devices back as getCloudDevices(). So if you only want to have one you need to find this device, e.g.
const myDevice = devices.find(dev => return dev.getId() === 'the-deviceid-you-need');
myDevice.updateData();
Hi
i would like to use daikin-controller-cloud with ip-symcon i installed your devlopment on a linux sytem:
with you example file i can remotly change some of the parameters.
This seems to work fine now i tried on my own add some commands like this
but i get an error message TypeError: Cannot read properties of undefined (reading 'fanOnly') at DaikinCloudDevice.setData (/opt/Daikin/node_modules/daikin-controller-cloud/lib/device.js:212:52) at main (/opt/Daikin/node_modules/daikin-controller-cloud/example/example.js:89:24) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async /opt/Daikin/node_modules/daikin-controller-cloud/example/example.js:105:5
do i something wrong or is it normal that this dont work
Thank you very much in advanced.
regards