No announcement yet.

Plug-in or Script

  • Filter
  • Time
  • Show
Clear All
new posts

  • Plug-in or Script

    Ok, I am trying to get started with extending my HS3. One of the first things I want to do is dimming lights in a non-linear way, i.e. have a quick drop and then fading them slowly. The amount of drop and how long the fading takes afterwards should be configurable (not in the code) and ideally adjustable for each light (or groups of lights).

    I am not quite sure how I would go after something like that, though. I believe only plug-ins allow users to change configurations. But I think the plug-in aren't really meant to control another device (instead they represent a real or virtual device).

    Considering this, it appears that I would have to create a plugin which creates a virtual "Dimmer Manager" device. In this device the user can configure the initial drop and the dimming time after the initial drop. If I want to allow different settings for each light then in the plugin I would create multiple "sub devices", one for each light (like DSC creates multiple sensors and Arduino creates multiple pins). Each of these subdevices has separate initial drop and dimming time plus. The whole process would be started by creating a regular HS event triggered by pressing a light switch and that event will then call my plugin for the appropriate (sub)-device. In the routine for the sub-device I can find out who triggered the event and then control the dimming (or should this be done by calling a script)?