My first script momentry swicth
25 February, 2012 - 21:18
Hi
I want to create 2 scripts one that simulates a momentry switch for example when a bsc command to turn hah relay 1 on the script would then wait 500 millisecond and turn hah relay 1 off making it a momenty switch.
Script 2 take a bsc input and then turn another end point on for example hah input 1 turns on the script would read this and turn on hah relay 2 on, hah input 1 turns off the script would then turn hah relay 2 off.
Can someone point me in the right direction, I have looked a the LUA page on here but I am not sure where to star I am used to vb asp but this does not see anything like these.
Thanks
John
John.
Check out the demo scripts already on your HAH. I am sure the examples include scripts to do exactly what you need.
See bindrelaysapplet.lua and relay1autooffapplet.lua
If your still struggling I am sure all of us in here will give you the requested code but as these scripts are so basic I think it would be beneficial for your learning to give these a go yourself.
Scripts in the following folder: /etc_ro_fs/plugboard/samples. Let us know how you get on. Garry