12-17-2024 11:57 AM
Hello!
There has been a request for a reboot macro/button to be installed on the touch panels in our conference rooms. These reboot buttons will be used by employees as a last resort. I know that there is a way to reboot from the service page, but I don't want that to be public information or allow unrestricted access to that menu. Does anyone have any experience with this?? I would love some assistance!
Solved! Go to Solution.
12-18-2024 02:04 AM - edited 12-18-2024 03:04 AM
Maybe something simple as this could work for you?
import xapi from 'xapi';
const xapi = require('xapi');
function onGuiRestart(event) {
if (event.PanelId == 'device_restart') {
boot();
}
}
function boot() {
xapi.Command.SystemUnit.Boot();
console.log('Executing triggered reboot... (Reboot macro)');
}
xapi.event.on('UserInterface Extensions Panel Clicked', onGuiRestart);
Do note I have not tested it on any device, so use it with that in mind. Also you'd might want to evolve the macro to ask for a confirmation before the reboot is done, just so that it doesn't restart immediately when someone presses the UI button.
12-19-2024 06:39 AM
Glad to hear that. Please take the time to mark this as solved by selecting the appropriate answer as the solution.
12-17-2024 12:23 PM
I have a macro that restarts our VC systems daily on a schedule. Likely it can be adopted to work with a trigger button. It’s after hours where I live. I’ll get it tomorrow and share it with you.
12-17-2024 12:43 PM
This is macro we’re using. https://github.com/CiscoDevNet/roomdevices-macros-samples/tree/master/Daily%20Reboot
12-17-2024 01:37 PM
Would you be able to share the reasoning or the logic why anyone would want to reboot their VC daily?
Thanks for sharing.
12-17-2024 01:52 PM
There are quite frequent issues with the endpoints after a software update and instead of trying to figure out when the software update has occurred we took the somewhat easy way out and restarts the devices daily at 3.00 am local time and only if the device isn’t in an active call. If it is it will be delayed for an hour and then the check is done again in until the device is restarted.
12-17-2024 02:19 PM
Thanks for the feedback, @Roger Kallberg.
Daily reboot is going to be the new direction for wireless access points too.
12-18-2024 02:04 AM - edited 12-18-2024 03:04 AM
Maybe something simple as this could work for you?
import xapi from 'xapi';
const xapi = require('xapi');
function onGuiRestart(event) {
if (event.PanelId == 'device_restart') {
boot();
}
}
function boot() {
xapi.Command.SystemUnit.Boot();
console.log('Executing triggered reboot... (Reboot macro)');
}
xapi.event.on('UserInterface Extensions Panel Clicked', onGuiRestart);
Do note I have not tested it on any device, so use it with that in mind. Also you'd might want to evolve the macro to ask for a confirmation before the reboot is done, just so that it doesn't restart immediately when someone presses the UI button.
12-19-2024 05:48 AM
This was exactly what I was looking for. Thank you for your assistance!
12-19-2024 06:39 AM
Glad to hear that. Please take the time to mark this as solved by selecting the appropriate answer as the solution.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide