We have moved at community.getvera.com

Author Topic: PLUGIN: MySelector  (Read 6010 times)

Offline jlutsky

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-1
PLUGIN: MySelector
« on: April 15, 2016, 12:16:03 pm »
PLUGIN: MySelector

Create a custom selector device. Configurable with up to 8 custom options per device. Selection change can be used as triggers for scenes. Can also target selection change with scenes. *Tested on UI7 Only

Install the MySelector plugin from the MiOS Marketplace: http://apps.mios.com/plugin.php?id=8661
Instructions: http://code.mios.com/trac/mios_myselector

Offline konradwalsh

  • Hero Member
  • *****
  • Posts: 566
  • Karma: +19/-6
Re: PLUGIN: MySelector
« Reply #1 on: April 16, 2016, 04:51:43 am »
Well done.. 

Sent from my ONE A2003 using Tapatalk


Offline tomgru

  • Hero Member
  • *****
  • Posts: 1403
  • Karma: +18/-6
Re: PLUGIN: MySelector
« Reply #2 on: April 16, 2016, 12:13:16 pm »
Sorry to be dense... but I looked at the instructions and can't figure out what to use this for? Can you give me a use case scenario?

Offline jlutsky

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-1
Re: PLUGIN: MySelector
« Reply #3 on: April 16, 2016, 01:45:54 pm »
It basically creates a device with custom options, that behaves similar to the 'My Modes' feature built into UI7. A single device (or variable container) with a list of pre-defined selections or states, where it makes sense that only one be selected at any given time.

For example, I use two devices in conjunction to switch media sources in my house depending on the room I'm in:

MyLocation: Den,Office,Bedroom
MyInput: DirecTV,DVD,Chromecast

MyLocation is updated as I move around the house. Then, when I change MyInput, depending on the MyLocation value, it changes an HDMI Matrix to switch inputs only in the room I'm in currently.

Feel like there could be many other uses that I haven't thought of yet. As far as I can tell, there is no easy way currently to create a custom device with more than just 2 states (On/Off).

Ultimately, I wrote this in hopes that ImperiHome could implement it in their app. I'd really like a single device with a drop-down list of available selections in their UI. Similar to the way 'My Modes' already shows up as an actuator in their app.
« Last Edit: April 16, 2016, 02:00:01 pm by jlutsky »

Offline Freddan101

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +12/-2
Re: PLUGIN: MySelector
« Reply #4 on: April 16, 2016, 02:03:15 pm »
Perfect! I hope IH will implement support for this plugin.

Offline jlutsky

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-1
Re: PLUGIN: MySelector
« Reply #5 on: April 16, 2016, 02:06:07 pm »
Drop them a message at support@imperihome.com and give them a nudge.  =)

Offline Jamr

  • Hero Member
  • *****
  • Posts: 847
  • Karma: +30/-8
Re: PLUGIN: MySelector
« Reply #6 on: June 03, 2016, 02:28:45 pm »
I just got the IH Beta (B411) with this supported.
This add on looks interesting as I am sure I can find some more ways to implement it. Thanks for creating it.
@jlutsky, Please explain how your location get updated?
 
I will get the add on and play with it. in the mean time.

Offline jlutsky

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-1
Re: PLUGIN: MySelector
« Reply #7 on: June 03, 2016, 05:20:12 pm »
Thanks @Jamr

Actually, my location isn't automatically updated.... yet.  =) That's something I want to figure out soon. I actually wrote the plugin specially so I could have an easy way to manually update my location via my phone, using the ImperiHome UI. I've got my phone on me most of the time, and also using android touch screens on the wall in each room. Now that I have a MySelector device available in the ImperiHome UI it's just an easy tape to tell my Vera which room I'm in.

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1985
  • Karma: +61/-193
Re: PLUGIN: MySelector
« Reply #8 on: June 04, 2016, 09:31:58 am »
Just to clarify to make sure I understand it... while this looks similar to the MultiSwitch plugin, where MultSwitch hold 1 to 8 states at a time, this will only hold 1 State at a time?


Offline Freddan101

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +12/-2
Re: PLUGIN: MySelector
« Reply #9 on: July 06, 2016, 02:03:38 am »
Yes, 1 state at a time. In for example ImperiHome you get a drop down box to choose from.

Offline konradwalsh

  • Hero Member
  • *****
  • Posts: 566
  • Karma: +19/-6
Re: PLUGIN: MySelector
« Reply #10 on: July 06, 2016, 08:29:43 am »


MyLocation is updated as I move around the house. Then, when I change MyInput, depending on the MyLocation value, it changes an HDMI Matrix to switch inputs only in the room I'm in currently.


what do you use to track you

Offline jlutsky

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-1
Re: PLUGIN: MySelector
« Reply #11 on: July 06, 2016, 02:38:44 pm »
I don't actually have a way to track my location automatically yet. Currently, I just have a MySelector device called 'MyLocation'. Has options for various rooms (Den,Bedroom,Office,Livingroom). I just manually switch rooms for now. Pretty quick with ImperiHome. Also, I do have a few other triggers that automatically update my room location. Like when I turn on a certain light in a certain room. Or when IR activity is detected in a certain room.

Offline OldManse

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
Re: PLUGIN: MySelector
« Reply #12 on: July 29, 2016, 12:14:52 pm »
@jlutsky

Great little plugin. I'm using it to change states throughout the day on my house heating - I have four states (Morning,Daytime,Evening,Night) which I currently change with a series of scenes i.e 7:00am set to Morning, 10:00am set to Daytime, etc.

What I would like to do is be able to toggle through the options, i.e. At (7:00,10:00,18:00,23:00) toggle to next option. I could do this this in code (and there are various ways of doing it) i.e.
   if (option == morning) then {option = daytime}
   else if (option == daytime) then {option = evening}
   else if (option == evening) then {option = night}
   else if (option == night) then {option = morning}
   end
but this would be hard coded - I would rather have the option of being able to add/delete/change the options and still be able to cycle through without having to re-code.

Is there anyway to increment through any number of options?

Offline jlutsky

  • Jr. Member
  • **
  • Posts: 64
  • Karma: +0/-1
Re: PLUGIN: MySelector
« Reply #13 on: July 29, 2016, 12:19:12 pm »
Interesting idea. It should be easy enough to build some kind of 'Next/Previous' option function into the plugin. I'm out of town for the next week, but could work on that when I return.

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: PLUGIN: MySelector
« Reply #14 on: July 29, 2016, 12:53:12 pm »
You could easily put all of the logic in a PLEG and use the "MySelector" to display the current state.
Although many used of PLEG have end up automating a lot of things, in that case "MultiString" plugins are more memory effiecient.

i.e.   you can do 6 variables in the same memory footprint as 1 "MySelector".