I'm trying to get a timer to automatically restart, as per the wiki example, however it wont. Below is the simple test lua script that I'm using :-
-- Update the LCD every minute with the current time
function init()
-- After 10 seconds the 't1' timer will expire and call the 'doclock' function.
start_timer("t1",10,"doclock")
end
function doclock()
print("Starting LCD timer!")
-- Reset the timer so it calls 'doclock' again in 10 seconds.
start_timer("t1",10,"doclock")
end
Member for
17 yearsUsed to be good ...
Hi Karl,
However ... lots of stuff changed in 255. This might now be broken (and there aren't many folks scripting in Lua).
There is a lot of work going on to convert the Lua scripting to use the new xaplib2. If you can hold out for this, I'm sure that you'll find scripting things a) easier to do, b) much more flexible and powerful and c) faster.
Brett & I are on the alpha codestream for this. Reckon that it would be better to push ahead on this than spend time fixing/re-testing what will soon be legacy.
What do you reckon?
Derek.
Member for
16 years 10 monthsPlugboard next generation
Well this is a bit of dilemma I'm working on new plugboard engine although I have lots of samples working its just not ready for mainstream release. So do I spend time investigating and fixing something that is about to be deprecated or do you wait until I can release the next generation engine?
I've written up the documentation for the API as it stands, in a private wiki area, however everything is subject to change as I'm still working on it. So releasing it now would lock in its current state something; I'm not ready for.
Alternatively I could make this DEV release available however it would come with the caveat that anything could change without notice. I haven't even checked my changes into the source control system yet.
Also this engine is not compatible with existing scripts, although its not hard to whip them into their new form, I haven't spending any time testing my backward compatibility calls.
What I will say is that the new plugboard will blow your socks off.
So I'll leave the decision up to you? Want to live on the bleeding edge or have a bug?
Brett
Member for
16 years 5 monthsLife's for Living...
What an offer, but I think you know the answer to that question. I'm fortunate enough to have two HAH's, one strictly DEV, and that's where I found this problem.
I certainly don't want you to push anything out before it's ready, you know I'm keen to promote and support you guys, and I agree that releasing too soon can cause more issues and distract you from developing the new plugboard. I'd also add, that if there are no other reported issues in a live environment, then it's not worth trying to fix this for me.
If you think that I can be of help with the new code then you know how to get hold of me, I'll always be happy to help.
Karl
Member for
16 years 5 monthsIf HAH were a bunje jump...
I'd be asking you to strap me up ready to jump off!
In other words I'd say let's drop the old and go for the new...we can work out all the kinks on the way...
I only have about 8 scripts and they're all a bit wimpy anyway(still working on my Lua training) so it's no biggie for me if the thing breaks.
I'm happy to throw myself down as a beta tester...will report back any issues with no expectation of quick fix.
Being a luddite I often do things in a way which you techies wouldn't, this can often highlight issues.
Over to you Brett!
Member for
15 years 10 monthsDid the timers get fixed in the LUA plugboard?
Hi Guys,
I am trying to update my weather script to run of a timer that resets it's self.
I have found that the timers are not resetting as per this thread, I was surprised because I thought it was fixed in the lua plugboard?
I tried to work around the problem by triggering off a hbeat message but this did not work either (register_class). Any ideas for a work around?
Cheers
Dan
Member for
16 years 10 monthsLUA engine
As you mentioned the "register_class" function this is deprecated so I can only assume you are using the 'old' engine.
Unfortunately I don't maintain the "old" plugboard engine and the new one hasn't been released. I think its probably best if I just release it and deal with the bugs it throws up as its does provide a much better framework.
I'm just goint to bite the bullet and push it out - there is never going to be a good time.
Brett
Member for
15 years 10 monthsHi Brett, Thanks for the
Hi Brett,
Thanks for the info.
Is the new engine still lua? I like lua as I have used it before. ;-)
Moving to the new version is not issue here as I have nothing running off my box properly yet.
Cheers
Dan
Member for
15 years 10 monthsHi Brett,I actually just
Hi Brett,
I actually just updated to the latest beta 279.2. The plugboard looks like it has the facility for global functions which is a real improvement. Super
Thanks
Dan
Member for
16 years 10 monthsThat beta
That beta is the new LUA plugboard - I only pushed this new beta about 4 hrs ago.
The documentation that I've written so far http://www.dbzoo.com/livebox/hah_plugboard_v2
There are updated samples in your /etc_ro_fs/plugboard/samples directory.
Brett