[ANSWERED]make action not visible in action menu

Posted on
Mon Nov 10, 2014 5:43 pm
kw123 offline
User avatar
Posts: 8335
Joined: May 12, 2013
Location: Dallas, TX

[ANSWERED]make action not visible in action menu

I have actions that should simply be called from other plugins, how do I hide them in the actions menu

I tried hidden="yes"
<Action id="showDeviceStates" hidden="yes" > <=====
<Name>--- only for python Script---</Name>
<CallbackMethod>showDeviceStatesCALLBACKaction</CallbackMethod>
</Action>

but that has no impact.

Thx

Karl
Last edited by kw123 on Mon Nov 10, 2014 6:29 pm, edited 2 times in total.

Posted on
Mon Nov 10, 2014 5:58 pm
jay (support) offline
Site Admin
User avatar
Posts: 18201
Joined: Mar 19, 2008
Location: Austin, Texas

Re: make action not visible in action menu

Uncheck the "Remote Display" checkbox when viewing the Action Groups list.

[EDIT] I see what you mean. That's not possible, actions always show up in the Actions menu. Can you describe the use-case where this is useful?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 10, 2014 6:03 pm
kw123 offline
User avatar
Posts: 8335
Joined: May 12, 2013
Location: Dallas, TX

Re: make action not visible in action menu

I guess I have not stated that clearly.
In the attached screenshot of the selection menu I like to suppress the listing BEFORE they get created. The lines with --- only for python script ---
Attachments
Screen Shot 2014-11-10 at 5.59.48 PM.png
Screen Shot 2014-11-10 at 5.59.48 PM.png (75.19 KiB) Viewed 3848 times

Posted on
Mon Nov 10, 2014 6:30 pm
kw123 offline
User avatar
Posts: 8335
Joined: May 12, 2013
Location: Dallas, TX

Re: [ANSWERED]make action not visible in action menu

I like to enable communication to the plugin from other plugins. Actions is the only way I know how to do that.

these calls will deliver several parameters that define behavior of the plugin.

Posted on
Mon Nov 10, 2014 7:26 pm
jay (support) offline
Site Admin
User avatar
Posts: 18201
Joined: Mar 19, 2008
Location: Austin, Texas

Re: [ANSWERED]make action not visible in action menu

As I said in my edit, it's not currently possible.

I still don't understand the use case for this feature request. Can you give an example?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Nov 10, 2014 8:15 pm
kw123 offline
User avatar
Posts: 8335
Joined: May 12, 2013
Location: Dallas, TX

Re: [ANSWERED]make action not visible in action menu

OK here an example of an action:

Code: Select all
plot1={
  "deviceNameOfPlot"     : u'poolPlot'
 ,"PlotType"             : u'dataFromTimeSeries'  ### dataFromTimeSeries  dataFromFile  dataFromVariable
 ,"XYvPolar"             : u'xy'  ### xy plot or polar plot
 ,"Grid"                 : u'0'                 ### options:  0=no 1=dashedBack 2=solidBack 3=thickSolidBack -1=thinFront -2... -3...
 ,"PlotFileOrVariName"   : u''       ### Name of variable of filename if PlotType = dataFromFile or dataFromVariable 
 ,"TitleText"            : u'Pool'     ### text that goes on the top of the plot
 ,"ExtraText"            : u''     ### Extra text
 ,"ExtraTextXPos"        : u'0.0'     ### x-pos of extra text
 ,"ExtraTextYPos"        : u'0.0'     ### y-pos of extra text
 ,"ExtraTextRotate"      : u'0.0'     ### rotate extra text counter clockwise 0..360 
 ,"ExtraTextFrontBack"   : u'front'     ### put extra text in "front" or "back" ground 
 ,"ExtraTextSize"        : u'8'     ### put extra text Size in points 
 ,"ExtraTextColorRGB"    : u'#000000'     ### extra text color #RRGGBB format 
 ,"TextSize"             : u'8'                       ### font size 
 ,"TextMATFont"          : u'sans-serif'             ### if MATPLOT font name:  sans-serif  serif  cursive  fantasy  monospace
 ,"TextFont"             : u''         ### if GNUPLOT name of font from  /Library/Fonts/  eg Arial Unicode.ttf
 ,"TextColor"            : u'#FF0000'              ## #FFFFFF ... #000000 or 255,255,255 format for RGB color intensities
 ,"LeftScaleRange"       : u'0:2000'             ### min:max
 ,"LeftScaleTics"        : u''                ### eg 10,20,30,100
 ,"LeftLog"              : u'linear'          # linear or log
 ,"LeftScaleDecPoints"   : u'0'                  ### number of 00 after .
 ,"LeftLabel"            : u'Power [Watt]'          ### text on left Y axis
 ,"RightScaleRange"      : u'70:110'
 ,"RightScaleTics"       : u'70,75,80,85,90,95'
 ,"RightLog"             : u'linear'
 ,"RightLabel"           : u'Temperature  [Fº]            .'
 ,"RightScaleDecPoints"  : u'0'
 ,"XScaleRange"          : u''
 ,"XScaleTics"           : u''
 ,"XLog"                 : u'linear'
 ,"XLabel"               : u'x-axis Text'
 ,"XScaleDecPoints"      : u'0'
 ,"XScaleFormat"         : u''           ### python / c .. format string for x axis
 ,"resxy0"               : u'850,350'            ### x,y  number of dots in x and y  for plotsize 1
 ,"resxy1"               : u''            ### x,y  number of dots in x and y  for plotsize 2
 ,"MinuteBinNoOfDays"    : u'3'         # number of days for MINUTE size bins 0-14
 ,"HourBinNoOfDays"      : u'8'         ### number of days for HOUR size bins 0-39
 ,"DayBinNoOfDays"       : u'90'      ### number of days for DAY size bins 0-390
 ,"Background"           : u'#FFFFFF'          ### #FFFFFF ... #000000 or 255,255,255 format for RGB color intentities
 ,"TransparentBlocks"    : u'1.0'          ###  for histogram, set 0= fully transparent ... 1 = not transparent
 ,"TransparentBackground": u''           ### 1.0 = not transparent, 0.0 = transparent, No color is used for background; Default=1.0
 ,"logLevel"             : u''          ###  values: ""=of if debug mode on , 0 = error 1 = regular logging
 }
plug.executeAction("createOrModifyPlot", props =plot1)


withe these actions another python script can set parameters of the plots. But it does not make sense to use this in an interactive fashion, that is done in devices.xml

Posted on
Tue Nov 11, 2014 8:48 am
kw123 offline
User avatar
Posts: 8335
Joined: May 12, 2013
Location: Dallas, TX

Re: [ANSWERED]make action not visible in action menu

or may be the real question is:

"how do I expose a method in my plugin to other python scripts/ plugins w/o going through actions."

The answer might be simple for a python expert..
Have looked at other plugins, but have not found an example


thanks

Karl

Posted on
Tue Nov 11, 2014 9:12 am
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]make action not visible in action menu

Hi Karl,

You are using the only Indigo native technique to externally expose functionality in your plugin. There are other options (socket communication, etc.), but they aren't trivial to implement or invoke. On our wish list is to add additional plugin functionality so that plugins can expose external APIs to other plugins/scripts. I believe that is what you are really after. Using Actions is a workaround, but as you noticed Actions will always show in the UI. But longer term we will be providing some additional mechanisms that are better suited for the type of communication you want.

Image

Posted on
Tue Nov 11, 2014 7:21 pm
kw123 offline
User avatar
Posts: 8335
Joined: May 12, 2013
Location: Dallas, TX

Re: [ANSWERED]make action not visible in action menu

Thanks. That ok. I can wait.


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest