Posting API calls with hub security enabled

I have Hub Security enabled so I can't use RM to do a post (like reboot, for example)...I installed the Rebooter app which is great because it handles the login and session cookie, but I don't want to reboot on a schedule.

I'm using bptworld's hub watchdog app, so ideally I want to have that kick off a rule or turn on a switch when it detects the hub moving slowly.

I tried modifying Rebooter to subscribe to a switch so it would do the POSTs (login and then /hub/reboot) but I can't get it working.

Does anyone have any simpler ideas (other than using another machine to run a script) or an example of an app that subscribes to a switch and posts something when it turns on/off (and also logs in and handles the cookie)?

As an alternative - use @adamkempenich's Rootin' Tootin' Self-Rebootin'. It will only reboot your hub when there's a need to ....

Will try that thank you !

1 Like

I could maybe be convinced (if a few people would find it useful) to add OAuth to RTSR and a reboot endpoint that could be called via IFTTT and/or RM. I've been making changes to RTSR lately anyway.

i'd be interested to know if you did, but at least for me, RTSR solved my problem by allowing the hub to reboot itself on conditions other than a schedule

@codahq ok i take that back...RTSR did not solve my problem because it seems to have died before my hub completely loses network connectivity and needs a reboot. But adding a reboot endpoint wouldn't help either if that scenario happened since it wouldn't be online to receive the post.

Looks like I'll have to go back to my router SSH'ing into the switch and power cycling the PoE port (hub's powered using a splitter).

1 Like