Hi everyone, reading the forum ( iAqualink for Pool Equipment strike again - #5 by Tico) I managed to collect all the data from the eXO chlorinator, but I can't understand how to send the commands to turn off, turn on, set the boost etc...
can you help me please?
The command should be this:
curl -X POST -H "Host:prod.zodiac-io.com" -H "accept:application/json" -H "authorization:"$Authorization"" -H "content-type:application/json; charset=UTF-8" -H "content-length:62" -H "accept-encoding:gzip" -H "user-agent:okhttp/3.12.0" -d '{"state":{"desired":{"equipment":{"swc_0":{"production":1}}}}}' "https://prod.zodiac-io.com/devices/v1/xxxxxxxx/shadow"
Thank you!
@Tico
Hasn't anyone succeeded?
Thank you.
Seeing how that post had pretty much everything you need, surely you just needed to add another HTTP Request node set to POST
and set the payload!
e.g...
const bearer = global.get("IDToken");
// setup the payload.
// Here it is hard coded but you can pass the payload data into the function from another node
msg.payload = {
state: {
desired: {
equipment: {
swc_0: {
production: 1
}
}
}
}
}
msg.method = "post";
msg.headers = {};
msg.headers['Host'] = 'prod.zodiac-io.com';
msg.headers['accept'] = 'application/json';
msg.headers['authorization'] = bearer;
msg.headers['accept-encoding'] = 'gzip';
msg.headers['user-agent'] = 'okhttp/3.12.0';
msg.url = 'https://prod.zodiac-io.com/devices/v1/yourDeviceIDhere/shadow';
return msg;
A thousand thanks!
I made a mistake when entering the IDToken!
Now works!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.