zinen / node-red-contrib-nibeuplink

1 stars 0 forks source link

Trigger for "Extra Hot Water" not accepted from myUplink #8

Open arminbrunner opened 1 week ago

arminbrunner commented 1 week ago

Getting informations from myUplink are working fine. Now I want to trigger "Extra Hot Water". In the myUplink swagger page this works perfectly with this curl statement: curl -X 'PATCH' 'https://api.myuplink.com/v2/devices/hp24-r-20240327-04-d1-6e-d1-7f-0f/zones/40008' -H 'accept: text/plain' -H 'Authorization: Bearer xxx -H 'Content-Type: application/json-patch+json' -d '{"mode": "on"}'

I try this with your Beta NodeRed Plugin with this msg as input: msg.deviceId = "hp24-r-20240327-04-d1-6e-d1-7f-0f"; msg.zoneId = "40008"; msg.payload = { "mode": "on"};

The answer from myUplink is: Request content from client not accepted by server.

I use the "PATCH /v2/devices/{deviceId}/zones/{zoneId}" Output. The write privilege is set.

Do you have an idea?

Regards Armin

arminbrunner commented 1 week ago

from the Log: the "PATCH /v2/devices/{deviceId}/zones/{zoneId}" Output is accessing PATCH /v2/devices/hp24-r-20240327-04-d1-6e-d1-7f-0f/points instead of PATCH /v2/devices/hp24-r-20240327-04-d1-6e-d1-7f-0f/zones/40008

There is a bug in the file myuplink.js on line 71 causing this.

and I see in the code no way how {zoneId} can be delivered. Can you introduce msg.zoneId for this?

Regards Armin