Tellstick Pause Plugin (1 Viewer)

jardoo

Portal Member
April 16, 2007
8
0
Home Country
Sweden Sweden
I was wondering if you could implement a time filter? So you can configure lets say, to only turn off lamps between 20:00-24:00? that would be a great function :)
 

MrMad

Portal Pro
May 18, 2005
191
53
Göteborg
Home Country
Sweden Sweden
vuego:
Thank you for the logs. I have made a new dll for you to test. I hope I have corrected the error, and not introduced any new ones.

maqe:
The reason only one device is handled is because the Tellstick can only send signals with about a 0.5 second delay. This is a limitation in the hardware. Therefore I only support one device to be used when pausing. You can set the device to use in the configuration program. If your devices are of the same type, you could change them to use the same unit code. But of course you will not be able to handle them separately then.

jardoo:
Time settings is a good idea, I will look into it.

vuego:
I'll think about the SunTracker feature...
 

maqe

Portal Member
July 5, 2008
15
0
Home Country
Sweden Sweden
It would be nice if only the lamps was switched on if it was enabled before you started the movie. I have been using this tiny program with mythtv and it kept track of the status of all my lamps so it only turned it on if the previous state was on. Maybe its doable?
 

MrMad

Portal Pro
May 18, 2005
191
53
Göteborg
Home Country
Sweden Sweden
maqe:
I have added an option for this, try this new file.
You have to check the "When stopping/pausing, return to same level as before playing" checkbox in configuration window before it will work.
And of course it will only know what you last level was if you set it from within MediaPortal before starting your video.
 

maqe

Portal Member
July 5, 2008
15
0
Home Country
Sweden Sweden
maqe:
I have added an option for this, try this new file.
You have to check the "When stopping/pausing, return to same level as before playing" checkbox in configuration window before it will work.
And of course it will only know what you last level was if you set it from within MediaPortal before starting your video.

Ah cool, you are quick :) ... seems to work like a charm. Thanks
 

MrMad

Portal Pro
May 18, 2005
191
53
Göteborg
Home Country
Sweden Sweden
New Beta

Added an option to just use the pause behavior when the sun is down (Vuego's request).
Is this good enough for you too Jardoo, or do you still need the time handling?

It was good fun to read a bit about astronomy, not very easy calculations though.
I currently calculate the sun rise and set as when the sun center is 0.583 degrees below the horizon, as this apperantely is the standard for Swedish national calendars. Might add some more options later if needed.

This is very beta, have not tested it myself yet (will have to wait until 21:43 to check if I was correct for this day :eek:)
Anyway, try it if you like.
 

vuego

Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,641
    764
    Göteborg
    Home Country
    Sweden Sweden
    Nice one MrMad!

    I'm not sure about the degrees below the horizon but I've entered the same latitude and longitude as I did in krambriw's SunTracker and got slightly different results.
    Tellstick Pause: Sun up 04:54 Sun down 21:42
    SunTracker: Sun up 04:46 Sun down: 21:51
    Start.se: Sun up 04:42 Sun down 21:54

    I have no idea which one is correct but it doesn't really matter much since we could add an offset. Some people live by the ocean and some behind a mountain and they'd probably like to add ±30 minutes or so.
    :D
     

    MrMad

    Portal Pro
    May 18, 2005
    191
    53
    Göteborg
    Home Country
    Sweden Sweden
    Start.se gives me 04:40 to 21:54 (no idea how they are calculating :) )

    These are some standards I have found:
    -0.583° Swedish calendar (center of sun at horizon) gives me 04:47 to 21:48
    -0.833° International standard (upper limb at horizon) gives me 04:52 to 21:43
    -6° Civil twilight (can no longer read outside) gives me 03:44 to 22:51
    -12° Nautical twilight (can not navigate by horizon at sea) gives me... ooops think i found a bug in my plugin when sun goes down after 23:59...
    -15° Amateur astronomical twilight (can see most stars)
    -18° Astronomical twilight (totally dark)

    Basically, I should probably allow an offset in degrees below the horizon.
    Setting an offset in minutes would not make much sense, since 30 minutes in the summer is quite different from 30 minutes in the winter (unless you live near the equator :D)
     

    vuego

    Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,641
    764
    Göteborg
    Home Country
    Sweden Sweden
    I know it's very beta but I didn't get it to work

    2008-07-21 23:43:54.337284 [Debug][MPMain]: Tellstick Pause(process): Stopped Video
    2008-07-21 23:43:54.338261 [Debug][MPMain]: Tellstick Pause(process): Not setting level since sun is up

    Did it work for you MrMad?
     

    Users who are viewing this thread

    Top Bottom