Open roccolord opened 3 months ago
Ahh the prepare "action" rew splits on /
// Resolve "action" from URL
const parts = msg.req.originalUrl.split('/');
const action = parts.at(3);
msg.action = action;
And since I have endpoint in the url also the 3 should be 4.
I changed so the action was identified using const action = parts.at(-1);
instead. Hope it works for your type of installation, else let me know.
So just grab the latest Nodered code in danalock.json
.
Getting information about one/all locks are fine. I get name and serial and so on for my lock, but running any command on the lock (state,battery,lock,unlock) fails with:
Where "ful_entre" is the lock name and the url for running the command is: http://192.168.68.4:1880/endpoint/danalock/ful_entre/battery
I'm running this on a HA Green.
Any ideas?