![]() |
Script reboot failing - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Script reboot failing (/showthread.php?tid=5457) |
Script reboot failing - fbrun@domizy - 10.06.2024 Hi, I'm trying to reboot a wiser for KNX with a script. Using this "os.execute('reboot')", the server doesn't reboot. I also tested this "os.execute(reboot)" but i have the same result. Respectfully, BRUN Félix. RE: Script reboot failing - Daniel - 10.06.2024 In General configuration there is Block unsafe functions in scripts: Make sure to disable it. RE: Script reboot failing - fbrun@domizy - 10.06.2024 (10.06.2024, 10:05)Daniel Wrote: In General configuration there is Block unsafe functions in scripts: Thanks Daniel ! RE: Script reboot failing - JMM - 24.06.2025 Hi, I have the same problem as fbrun@domizy to reboot LM5, I don't understand Daniel's answer BR RE: Script reboot failing - Daniel - 24.06.2025 Utilities-> General configuration... RE: Script reboot failing - JMM - 24.06.2025 Thanks Daniel, it's OK Is it also possible to reset the USB port by script, I have a Uart rs232 which from time to time blocks and I am obliged to unplug and replug RE: Script reboot failing - Daniel - 24.06.2025 What is the device you have problem with? RE: Script reboot failing - JMM - 24.06.2025 It's : FTDI - FT232R USB UART RE: Script reboot failing - Daniel - 24.06.2025 Did you check if just reboot helps? I think it will need power down anyway. RE: Script reboot failing - JMM - 24.06.2025 Yes reboot helps, I read the frame of a Linky electric meter every minute, some day at 8:00 a.m. the meter sends the tariff change and the ft232 blocks so either reboot or disconnect reconnect It's not from the script!! RE: Script reboot failing - JMM - 24.06.2025 Code: -- Script USB Reset Final pour LM5 OpenRB ![]() RE: Script reboot failing - admin - 25.06.2025 You can power cycle USB port like this: Code: io.writefile('/dev/usbctrl', 'low') Make sure that serial port is not open in a script when doing the power cycle. Otherwise the port name might change and script won't work. RE: Script reboot failing - JMM - 26.06.2025 Thanks Daniel, but is not work RE: Script reboot failing - JMM - 04.07.2025 Hello, Is there a way from a Lua script (or system command via os.execute()) to completely cut and restore the 5V power supply to a USB port on the LM5? BR RE: Script reboot failing - Erwin van der Zwart - 04.07.2025 Could be “block unsafe scripts” in general configuration io.writefile could be blocked, not sure if that is also on LM.. RE: Script reboot failing - Daniel - 04.07.2025 (04.07.2025, 12:42)Erwin van der Zwart Wrote: Could be “block unsafe scripts” in general configuration io.writefile could be blocked, not sure if that is also on LM.. No it's not. RE: Script reboot failing - admin - 07.07.2025 What is your LM hardware version (printed on the sticker on the side of the housing)? Create an event script mapped to a binary object to control USB power power: Code: state = event.getvalue() and 'high' or 'low' Check System config > Status > System log, you should see that USB converter is disconnected when the port is powered down. Similar to this: Code: Jul 7 11:17:03 LogicMachine kern.info kernel: [11838588.128976] cp210x 1-1:1.0: device disconnected |