zinen / node-red-contrib-nibeuplink

1 stars 0 forks source link

Not all functions are listed in node options #4

Closed hannuterasloihde closed 11 months ago

hannuterasloihde commented 11 months ago

I can only see the three functions as in the image.

image

How can I access the rest of them that are listed in the readme?

hannuterasloihde commented 11 months ago

I was a bit hasty and read the readme incorrectly. Only the ones with the YES mentioned are implemented. Would it be possible to implement the following (or why not all of them):

GET api/v1/systems/{systemId}/parameters | READSYSTEM PUT api/v1/systems/{systemId}/parameters | WRITESYSTEM

zinen commented 11 months ago

Each line of code must be tested and confirmed. I wont do that if no one uses it. Try installing this development branch. I can't test PUT request my self properly but you might be able. npm install https://github.com/zinen/node-red-contrib-nibeuplink.git#dev I rely on your feedback if this is working or not for the parameters GET and PUT request.

hannuterasloihde commented 11 months ago

I had a quick try.

The getParameters returns me an empty list, I don't know whether this should be returning me something.

image

The setParameters gives me an error. I sent the following json as payload: msg.payload= { "settings": { "hot_water_boost": "1" } }

image
zinen commented 11 months ago

I found an error in the PUT one. You must give it a msg.payload to get anything back. I also found some errors with the GET one. I updated the code. Please install again with the link above. Should be version 0.3.1d now.

As pr the API: GET request input msg.payload must be an object with an array like {"parameterIds":["hot_water_boost"]} PUT request input msg.payload must be an object with an object like {"settings":{"hot_water_boost": "1"}}

hannuterasloihde commented 11 months ago

Both are now working. Thank you very much.

Looking at the other available functions, I don't have much use for them.

hannuterasloihde commented 11 months ago

Just noticed that there are two different status functions. Only one of them is currently implemented. Could you also add the function to get the overall status of them system: GET api/v1/systems/{systemId}/status/system

zinen commented 11 months ago

Found out that I needed some other API call so I added all of them in there. Please install and test again. If all is good for you then I'll bump this package to version 1.0.0 as it seems finished now to me.

hannuterasloihde commented 11 months ago

I now tested all available functions and they work.

zinen commented 11 months ago

Perfect. Released new version 1.0.0 now.