Fetching a token every hour

Hello @Maxi1134,
As I told you on my private response, I no longer use the app-daemon version I built, I just use a flow I built on node-red. I know that, after how much I insisted that appdaemon was a better approach it sounds a bit weird that I ended using node-red. The reason is because I started from scratch and setting up node-red was easier for my than appdaemon.

You will not have any until you run the app at least once, because is the app who creates it.

In any case, I will be sharing my rest command later, I don’t have access RN to my home-assistant. If you

Hi there,

After a lot of weed and reading, I managed to reverse-engineer it!

This is the code that I used, in case anyone else is trying to reproduce this:

ptz_reolink:
    url: http://192.168.0.210/cgi-bin/api.cgi?cmd=PtzCtrl&token={{token}}
    method: POST       
    payload: '[{"cmd":"PtzCtrl","action":0,"param":{"channel":0,"op":"ToPos","speed":32,"id":{{ptz_id}}}}]'

Thanks for the help!
And if anyone needs help, do not hesitate to ask me!

Could you post the nodered flow here? It looks amazing.

Sorry, don’t have it anymore… I moved away from Synology to Agent dvr and I deleted this.

That’s a real shame! It works really well for me, except for the fact that it takes an initial hour before the token is retrieved!