DrHauss / node-red-contrib_BRP069C4

Module for Node-Red to Control ACs via Daikin Cloud
MIT License
3 stars 1 forks source link

dataPoint schedule #17

Closed DIY-Blub closed 1 year ago

DIY-Blub commented 1 year ago

Hello, I have created a schedule via the Daikin Onecta app and would like to turn this schedule on/off via Node-Red. According to the output I only need to set the schedule/modes/any/enabled value to true.

Theoretically, this should work: msg.topic = "set"; msg.payload = {}; msg.payload.ssid = "DaikinAP12345"; msg.payload.managementPoint = "climateControl"; msg.payload.dataPoint = "schedule"; msg.payload.dataPointPath = "/modes/any/enabled"; msg.payload.value = true; return msg;

But generates an error "Error: Communication failed 422"

Simple commands like turn the device on/off work, where is my thinking error here?

Greetings from Austria

DrHauss commented 1 year ago

I have not used schedules until now but I tried to reproduce.

This is not a bug within node-red-contrib_BRP069C4. This Node Red Node uses the library Daikin Controller Cloud from here which communicates with the Daikin Cloud and send the HTTP error 422. Since the issue is the same within other tools using this library (like iobroker) please raise a ticket there.

DrHauss commented 1 year ago

@DIY-Blub Here is also a more informational output when running Daikin Controller Cloud with DEBUG level.:

Mar 29 10:28:12 raspberrypi Node-RED[29715]: <-- BODY {"value":false,"path":"/modes/any/enabled"} Mar 29 10:28:12 raspberrypi Node-RED[29715]: --> 422 FROM PATCH https://api.prod.unicloud.edc.dknadmin.be/v1/gateway-devices/XXXX/management-points/climateControl/characteristics/schedule Mar 29 10:28:12 raspberrypi Node-RED[29715]: --> HEADERS {

**Mar 29 10:28:12 raspberrypi Node-RED[29715]: --> BODY {"code":"INVALID_REQUEST","message":"[schedule] characteristic has its own endpoint. PUT /gateway-devices/{gatewayDeviceId}/management-points/{embeddedId}/schedule. Refer to API manual for detailed information."}** Mar 29 10:28:12 raspberrypi Node-RED[29715]: 29 Mar 10:28:12 - [error] [Daikin-Cloud-Controller:472df65b815d75d5] Error: Communication failed 422 Maybe you log the communication of your onecta app when enabling the schedule and check how onecta is doing that.