MLServer New Features

Topics related to MLServer 4
User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Re: MLServer New Features

Postby DaveB » Sat Jul 05, 2014 3:38 pm

Sounds great. Now I need to figure out what to do with all of that extra stuff. The Pandora app is one of thebest I have used with tthe recent additional capability.
Thanks!

Dave Bruner
:shock:

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Re: MLServer New Features

Postby Krumpy » Sun Jul 06, 2014 10:39 pm

Wow - each background macro in its own thread. No were talking!!!


Any more thoughts on this:

1.) Can we get a timer function such as every xx minutes or seconds? Please. This would be for screensavers and such.

2.) Would it make sense to tie the task scheduler and automation rules together? Then we could write similar event processing like HomeSeer has. Some examples below - I am sure that there are many more examples or use cases:

When time is 00:05 then

When date is 4/25/14 and time is 08:00 then

Whenever time is every 30 minutes then

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLServer New Features

Postby CinemarDave » Tue Jul 29, 2014 3:52 pm

Version 4.0.5323.24775 - 07/29/2014

Today's update
1) Adds a new "System Timers" window and native "Timers" server command to the UI. The new Timer functions are a direct replacement for the legacy MLTimer plugin. See the attached.

There is no practical limit to the number of system timers that can get defined (the system may get a little sluggish after 4000 or so).

Each system timer runs asynchronously in its own thread.

The same command set is supported as the legacy MLTimer.

Timers|SetTimer~Timer#~Style~Interval~Units~Macro~Enable
Timers|Enable~Timer#
Timers|Disable~Timer#
Timers|Toggle~Timer#
Timers|Delete~Timer#

The only UI changes you will have to make is to substitute MLTimer| with Timers| in your scenes.
You do not have the required permissions to view the files attached to this post.

RZajcew
Intermediate
Intermediate
Posts: 257
Joined: Mon Jul 21, 2008 6:31 pm
Contact:

Re: MLServer New Features

Postby RZajcew » Tue Jul 29, 2014 9:41 pm

Re the new Timers feature.

It would have been nice to be able to specify the timer by timer name in addition to specifying the timer by number. This is a bit more friendly from the perspective of trying to write portable scripts/commands (this was something that was provided by MLSchedule).

- Roman

RZajcew
Intermediate
Intermediate
Posts: 257
Joined: Mon Jul 21, 2008 6:31 pm
Contact:

Re: MLServer New Features

Postby RZajcew » Wed Jul 30, 2014 12:18 am

Again re the new Timers feature...

I converted over from MLSchedule rather than MLTimer, so perhaps I am missing some detail. But...

Using the Timers UI, I created Timer #8. I did not set it up to start with MLServer startup. And I set the time to 10 seconds. And I tried this with both Repeat set on and off.

I issue the command Timers|Enable~8. And I do not see the timer fire off.

In Verbose mode, the only thing I see in the log is:

7/29/2014 10:05:03 PM MLProcess Primary [1] (3) [Timers|Enable~8] from [MyClient1]

- Roman

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLServer New Features

Postby CinemarDave » Wed Jul 30, 2014 11:15 am

Sorry I'm so used to drivers taking the first parameter as the ID I reversed the parameters on the enable and disable. That will get fixed today and I'll also allow calling timers by name too.

RZajcew
Intermediate
Intermediate
Posts: 257
Joined: Mon Jul 21, 2008 6:31 pm
Contact:

Re: MLServer New Features

Postby RZajcew » Wed Jul 30, 2014 6:19 pm

CinemarDave wrote:Sorry I'm so used to drivers taking the first parameter as the ID I reversed the parameters on the enable and disable. That will get fixed today and I'll also allow calling timers by name too.


Thank you. I have a question though.

For the "Repeat" checkbox. I have a (every 10 seconds) timer with the "Repeat" checkbox set to blank. Yet when I enable the timer, the timer continues to fire every 10 seconds. I would have expected (in this case) the timer to only fire once. Is this expected behavior? I can work around this (of course) by disabling the timer in the command section. [And if this is the expected behavior, then I'm not sure what "Repeat" is meant for]

And another thing... Given that timers can now be specified by name, perhaps for SetTimer you could allow Timer# to be specified as -1 and thus let the server pick a unique number? For ease of writing "portable" macros/scripts.

Thanks,
Roman

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLServer New Features

Postby CinemarDave » Wed Jul 30, 2014 6:28 pm

Repeat is working for me here. I'll look at it again to see if there is some way to break it.

tmcgowan
Senior Member
Senior Member
Posts: 201
Joined: Fri Nov 25, 2005 1:27 pm
Location: Grosse Ile, MI
Contact:

Re: MLServer New Features

Postby tmcgowan » Wed Jul 30, 2014 9:29 pm

Dave,

Do you ever sleep? I have never seen so much devotion to customer service as you have!

Best regards,

Todd

monteourdog
Senior Member
Senior Member
Posts: 174
Joined: Sat May 20, 2006 5:03 am
Location: Vancouver
Contact:

Re: MLServer New Features

Postby monteourdog » Wed Jul 30, 2014 11:51 pm

I mostly create timers live via touch screen or in a script - so for me, setting a timer from an MLServer command is important. I currently use MLSchedule for that exact reason.

So after reading about the new timer native to MLServer, I was excited to try. From the command builder, I sent:

Timers|SetTimer~1~OneTime~3~Minutes~Macro|SetVariable|mytimer_fire~yes!SetVariable|mytimer_macro~yes~Enable
and
Timers|SetTimer~1~OneTime~3~Minutes~Macro|SetVariable|mytimer_fire~yes!SetVariable|mytimer_macro~yes

What was stored in the Timer (both cases) was:
Macro|
SetVariable|mytimer_fire

Obviously, the next "~" was supposed to set the optional Enable command but in the case of a SetVar command, this resulted in an "error". As I am sure you are aware, MLSchedule solves this by using 3 "~" instead of 1. But, there is already a Enable/Disable option...and if using "SetTime" it really only does one thing and set a timer...perhaps the last parameter is not needed so the command would be without the "~Enable"?

Also, I ran this timer as "OneTime" - once fired, should it not remove itself from the list? Or perhaps numbered timers remain - named timers are removed (or visa versa)

My 2-cents!

rileydog
Expert
Expert
Posts: 667
Joined: Wed Jun 02, 2004 12:25 am
Location: Kalamazoo, Michigan
Contact:

Re: MLServer New Features

Postby rileydog » Thu Jul 31, 2014 9:07 am

I am having a problem with the timers - I just installed the latest version and added my first timer - the timer number is -1 and cannot be changed (see screen shot). I try to save my new timer and I get an error in the log that I am sure is because the timer ID is -1 (see screen shot). Thanks
You do not have the required permissions to view the files attached to this post.

RZajcew
Intermediate
Intermediate
Posts: 257
Joined: Mon Jul 21, 2008 6:31 pm
Contact:

Re: MLServer New Features

Postby RZajcew » Thu Jul 31, 2014 9:27 am

rileydog wrote:I am having a problem with the timers - I just installed the latest version and added my first timer - the timer number is -1 and cannot be changed (see screen shot). I try to save my new timer and I get an error in the log that I am sure is because the timer ID is -1 (see screen shot). Thanks


The -1 is "by design", I believe. It is an indication that MLServer is going to pick the Timer# automatically. I guess it's debatable whether selecting the TImer# in the UI is required -- I haven't found a use case for it myself.

The error you are seeing is because the interval is "0 seconds". That is, you are asking the timer to fire continuously. This number must be >0.

- Roman

rileydog
Expert
Expert
Posts: 667
Joined: Wed Jun 02, 2004 12:25 am
Location: Kalamazoo, Michigan
Contact:

Re: MLServer New Features

Postby rileydog » Thu Jul 31, 2014 9:45 am

Thanks for the reply - I should have clarified that - I do enter all the fields (including interval > 0) and no matter what, I still get that error and the timer isn't saved... I restarted ML Server and still have the issue...

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLServer New Features

Postby CinemarDave » Thu Jul 31, 2014 10:51 am

The time number is the primary key in the data table so that is why I do not let you change it. It will automatically select the next highest number in the list. I'm revisiting all of this logic again. Everything works fine for me here so I need to start by deleting the timer table and see where that takes me.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLServer New Features

Postby CinemarDave » Thu Jul 31, 2014 11:07 am

I just uploaded a new MLServer. I deleted the timers table so that MLServer would recreate it just like it did on your PCs. I cannot make anything fail here but I did change the code so that it is impossible to set an interval of <= 0.


Return to “MLServer 4”

Who is online

Users browsing this forum: No registered users and 1 guest