Dimmer Extender discussion

Plug-ins, scripts, and other software to improve your home automation experience.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Dimmer Extender discussion

Post by nsheldon »

Feel free to post any comments questions or requests in this thread.
User avatar
davvi
Posts: 110
Joined: Tue Sep 27, 2011 8:06 pm
Location: Austin, TX
Contact:

Re: Dimmer Extender discussion

Post by davvi »

Thank you for creating this!

When trying to configure set brightness with ramp rate though, I'm getting an error: "NSSize: {72, 72}". The event log displays this: "dialogForActionId() caught exception: NSInvalidArgumentException -- -[NSRegion copyWithZone:]: unrecognized selector sent to instance 0xd46c1a0"

Also, if I click Save again after getting the error, Indigo quits.

The dimmer I'm trying to control is a SwitchLinc Dimmer with Firmware 40 (i2 engine)

Any ideas?
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Dimmer Extender discussion

Post by nsheldon »

Hi davvi.

Thanks for the report. I'm guessing you're using Indigo 6 b1. Those errors seem to be related to Cocoa UI methods (not used in the plugin). I've seen a similar error before in another of my plugins with Indigo 6 but it disappeared and I was unable to nail down exactly what caused it. It appears to possibly be a bug in the Indigo 6 UI, perhaps combined with the plugin not returning something that the Indigo client is expecting. I'll look into it and see if I can't figure it out.
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Dimmer Extender discussion

Post by matt (support) »

If either one of you can get steps for us to reproduce this one, then let us know and we'll look into it on the Indigo client side. Thanks.
Image
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Dimmer Extender discussion

Post by nsheldon »

I'm able to reproduce the Indigo 6 b1 client crashing when attempting to save the action. It crashes while displaying "Validating..." at the bottom of the action dialog, which I assume indicates that it is executing the "validateActionConfigUi" method in the plugin. I'll send a more detailed reproduction procedure to Indigo Support shortly.
User avatar
davvi
Posts: 110
Joined: Tue Sep 27, 2011 8:06 pm
Location: Austin, TX
Contact:

Re: Dimmer Extender discussion

Post by davvi »

Thanks for the ultra-quick response. Here are additional notes.

I initially got the error when I was editing an Action that is supposed to take place after a Trigger. So the steps would be:

Actions > Type > Device Actions > Dimmer Extender Controls > Set Brightness with Ramp Rate

I selected the device I want to dim, then click Edit Action Settings.

The first time I did this I entered these settings:

Brightness Source: Enter Value
Brightness: 30
Use Ramp Rate Variable: Deselected
Ramp Rate: 0.3 sec
Delay:
Retries: 3

I tried different settings and different dimmers and kept getting the same results ("PAXCheckBox" message or Indigo quitting).

I also tried creating an Action Group rather than a Trigger Action, and still got the errors.

Same thing after reloading the plugin.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Dimmer Extender discussion

Post by jay (support) »

I found the problem. In the plugin, you're setting showAlertText to None. The code wasn't expecting a null string for the alert text. I'll fix it in the next beta release, but you can fix the problem in your plugin by not setting showAlertText unless you actually have text to show... ;)
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Dimmer Extender discussion

Post by jay (support) »

As an aside, your action validation method will never actually complete successfully because you're always setting showAlertText in the errorsDict - which means it will always be non empty. At the end of the method, you check to see if the errorsDict is empty and only if it is do you return true.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Dimmer Extender discussion

Post by nsheldon »

Thanks for the pointer Jay. I'll fix the validation method in the plugin. I figured it was related to the error checking code.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Dimmer Extender discussion

Post by nsheldon »

Update 1.0.1 Posted

Download 1.0.1 which fixes the bug that causes the Indigo 6 beta 1 client to crash on action dialog validation.
User avatar
davvi
Posts: 110
Joined: Tue Sep 27, 2011 8:06 pm
Location: Austin, TX
Contact:

Re: Dimmer Extender discussion

Post by davvi »

The speed with which this was figured out and fixed is further proof that this is one of the best forums out there...
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Dimmer Extender discussion

Post by jay (support) »

Thanks - although I have to say that at the moment we're hyper-sensitive to problems since we just released the beta. ;)
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
davvi
Posts: 110
Joined: Tue Sep 27, 2011 8:06 pm
Location: Austin, TX
Contact:

Re: Dimmer Extender discussion

Post by davvi »

This plugin is extremely helpful for any lights that turn on automatically which should happen quickly (so you're not standing in a dark hallway while the lights are brightening), but then fade out gradually when there is no longer anyone there (so the light change isn't sudden and attention-grabbing). Thank you for the great work.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: Dimmer Extender discussion

Post by nsheldon »

davvi wrote:This plugin is extremely helpful for any lights that turn on automatically which should happen quickly (so you're not standing in a dark hallway while the lights are brightening), but then fade out gradually when there is no longer anyone there (so the light change isn't sudden and attention-grabbing). Thank you for the great work.
Thank! That's actually exactly how I use it as we'll. :-D
DU Lou
Posts: 279
Joined: Thu Mar 08, 2012 7:18 pm
Location: Florida

Re: Dimmer Extender discussion

Post by DU Lou »

Thank for the great contribution. I am having fun setting up some dramatic Actions and Triggers with this plugin. I did notice that the selectable ramp rates offered are less then the default ramp rates that can be selected from the device itself. Is that by design or just a limitation of the plugin?

Thanks again,
~Lou
Post Reply

Return to “Nathan Sheldon Software”