User Tools

Site Tools


plugins:03_units

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
plugins:03_units [2019/01/20 15:06] – [deviceTypes] James Sentmanplugins:03_units [2019/01/20 15:18] – added dimmable, dimmableType, receiveOnly and ignore clicks default info James Sentman
Line 71: Line 71:
   
 The user can always enter anything into the address field that they wish, choosing from the menu is a shortcut for simple devices and not a requirement that the entire address space be included in it to choose from.  The user can always enter anything into the address field that they wish, choosing from the menu is a shortcut for simple devices and not a requirement that the entire address space be included in it to choose from. 
 +
 +===dimmable===
 +OPTIONAL: (boolean) Set to true if this unit type should default to dimmable when the user is creating new units.
 +<code>
 +“dimmable”:true
 +</code>
 +
 +===dimmableType===
 +OPTIONAL: (string) a string describing the dimming behavior when the ON command is sent. The valid choices are “simple”, “smart” and “simulated”. Most modern units should be set to “simulated” This only applies to units with the dimmable flag set to true. 
 +
 +  * simulated: in this case the last value the unit visited will be remembered by XTension and sent as a set value command instead of an On command. This is the normal behavior for most modern devices as you want them to return to the level they were last at when they are commanded On. A unit set to simulate will never receive an On command, but only setValue commands with the last On level already set from the XTension database.
 +  * smart: legacy type for “smart” x10 devices. This will send a simple On command and assume the device itself knows what level to go to. This seems like it would be the choice for modern devices as most do remember their own last on level but it isn’t the best choice as the value in the XTension database may not match what the device does.
 +  * simple: XTension will just send a simple On to the device when commanded on and the database will show a level of 100% after sending the on. This is a legacy setting for “dumb” devices that always go to full on when sent an On command.
 +
 +<code>
 +“dimmableType”:”simulated”
 +</code>
 +
 +===receiveOnly===
 +OPTIONAL: (boolean) If the unit can only receive values but should not get commands when the values are changed in XTension this flag should be set to true. For things like analog inputs or temperature sensors that can only receive values and for whom it makes no sense to try to send a new value to.
 +
 +<code>
 +“receiveOnly”:true
 +</code>
 +
 +===ignoreClicks===
 +OPTIONAL: (boolean) serves the dual purpose of making it harder to accidentally click on a control in the interface and changing the look of that interface. When set to false or absent a unit will provide by default a toggle control on a unit list. When set to true the paddle of that and all other control toggles will be absent so that you can’t click on it and the toggle background will instead just show the current value. Clicks on the toggle control will not cause any commands to be sent immediately but will instead bring up the detailed controls dialog. From there, or from scripts or events or other ways to control a unit the commands will be sent normally. 
 +
 +This should also be set to true for most receiveOnly units as you do not normally wish to provide a simple interface for controlling something when it cannot be controlled.
 +
 +<code>
 +“ignoreClicks”:true
 +</code>
  
 ===menuHandlers=== ===menuHandlers===