eggzlot Posted August 23, 2019 Share Posted August 23, 2019 Is there a way to run a Lua script for a drive upon reboot automatically? My 2n Helios doorstation needs a Lua script ran to talk to C4. So anytime I reboot my c4 (manually or I lose power) I need to remember to launch Composer HE and execute the script. Is there a way to do this automatically? If not, maybe I should just have C4 send me a text every time it boot ups and the subject line would be a reminder to do the Lua script in HE? Quote Link to comment Share on other sites More sharing options...
-defunct- Posted August 23, 2019 Share Posted August 23, 2019 Build it into the driver? Or request the dev to add it? Is it a script specific to your system? Quote Link to comment Share on other sites More sharing options...
eggzlot Posted August 23, 2019 Author Share Posted August 23, 2019 59 minutes ago, Dunamivora said: Build it into the driver? Or request the dev to add it? Is it a script specific to your system? no - it is for the 2n Helios VideoKit. I believe its a C4 driver and its a known bug that you need to run the Lua upon reboot. Log into the project with Composer Pro. Click on the 2N doorstation driver, then click on Lua. Paste the line below in the Lua Command window then click Execute. helios_ip_eventlogstart() Contact/relay programming should begin working almost immediately. Refer to KB 2315 for full instructions to set up a 2N doorstation to work in a Control4 system Quote Link to comment Share on other sites More sharing options...
-defunct- Posted August 23, 2019 Share Posted August 23, 2019 Oh, now that is stupid. If it's a known requirement it should have been put directly into the driver. Driver's have events where they can run scripts during different parts of the project load/boot up process. There is no way that I know of to run a lua script automatically on a driver without it being called by the driver's own lua code for those specific events. Since there is a KB on the issue, you may be stuck with an email or text reminder unless you change to a better supported door station. eggzlot 1 Quote Link to comment Share on other sites More sharing options...
eggzlot Posted August 23, 2019 Author Share Posted August 23, 2019 1 minute ago, Dunamivora said: Oh, now that is stupid. If it's a known requirement it should have been put directly into the driver. Driver's have events where they can run scripts during different parts of the project load/boot up process. There is no way that I know of to run a lua script automatically on a driver without it being called by the driver's own lua code for those specific events. Since there is a KB on the issue, you may be stuck with an email or text reminder unless you change to a better supported door station. ok thanks. Maybe I'll ask my dealer to nudge tech support or something to write that line into the code as you mention. For now I'll just send myself a text reminder Quote Link to comment Share on other sites More sharing options...
ILoveControl Posted August 23, 2019 Share Posted August 23, 2019 4 hours ago, eggzlot said: Is there a way to run a Lua script for a drive upon reboot automatically? My 2n Helios doorstation needs a Lua script ran to talk to C4. So anytime I reboot my c4 (manually or I lose power) I need to remember to launch Composer HE and execute the script. Is there a way to do this automatically? If not, maybe I should just have C4 send me a text every time it boot ups and the subject line would be a reminder to do the Lua script in HE? Completely not supported and I will probably get roasted for this, why not ssh into the controller and add a script to the controller to do exactly that? Quote Link to comment Share on other sites More sharing options...
eggzlot Posted August 23, 2019 Author Share Posted August 23, 2019 4 minutes ago, ILoveControl said: Completely not supported and I will probably get roasted for this, why not ssh into the controller and add a script to the controller to do exactly that? because you lost me at SSH above my technical pay grade :-) mujtaba.khokhar and South Africa C4 user 2 Quote Link to comment Share on other sites More sharing options...
RyanE Posted August 23, 2019 Share Posted August 23, 2019 3 hours ago, ILoveControl said: Completely not supported and I will probably get roasted for this, why not ssh into the controller and add a script to the controller to do exactly that? The Lua script needs to be run *within the driver*, not as a command-line on the controller, so this wouldn't do it. The proper way is to get the driver fixed. RyanE eggzlot and msgreenf 2 Quote Link to comment Share on other sites More sharing options...
eggzlot Posted August 23, 2019 Author Share Posted August 23, 2019 20 minutes ago, RyanE said: The Lua script needs to be run *within the driver*, not as a command-line on the controller, so this wouldn't do it. The proper way is to get the driver fixed. RyanE I believe it’s a c4 driver? Have dealer ask support? I mean the KB article points it out so if c4 is the author I guess they are aware? msgreenf 1 Quote Link to comment Share on other sites More sharing options...
msgreenf Posted August 23, 2019 Share Posted August 23, 2019 And like Ryan said you can't write another driver to do it. You are running commands that are only in that driver not in c4Sent from my Pixel 3a XL using Tapatalk eggzlot 1 Quote Link to comment Share on other sites More sharing options...
ILoveC4 Posted August 25, 2019 Share Posted August 25, 2019 On 8/23/2019 at 10:20 AM, eggzlot said: ok thanks. Maybe I'll ask my dealer to nudge tech support or something to write that line into the code as you mention. For now I'll just send myself a text reminder Isn’t 2N the company that makes the official C4 doorstation? Quote Link to comment Share on other sites More sharing options...
eggzlot Posted August 25, 2019 Author Share Posted August 25, 2019 7 hours ago, ILoveC4 said: Isn’t 2N the company that makes the official C4 doorstation? Yes it is Quote Link to comment Share on other sites More sharing options...
ILoveC4 Posted August 25, 2019 Share Posted August 25, 2019 13 minutes ago, eggzlot said: Yes it is For some reason that makes this even more ridiculous to me. xc420 1 Quote Link to comment Share on other sites More sharing options...
eggzlot Posted August 25, 2019 Author Share Posted August 25, 2019 54 minutes ago, ILoveC4 said: For some reason that makes this even more ridiculous to me. I agree especially if not needed for the ds2. I’d have to assume the firmware is 80% the same and the big differences may just be the UI rebranded for C4. That is why I thought I’d ask Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.