Cynical Behaviors problem

Posted on
Sat Dec 31, 2022 5:04 pm
dduff617 offline
Posts: 661
Joined: Jul 05, 2006
Location: Massachusetts, USA

Cynical Behaviors problem

I'm seeing some problems with Cynical Behaviors plugin, specifically with devices of type KeypadLinc Button Device Control.

I make pretty heavy use of this type of device in my system and find them very convenient - it simplifies things and reduces the number of triggers that would otherwise be necessary.

I went to go create a new one (which I haven't done in a while) and I encountered what seems to be a bug or problem. I select "new device...", then select Type:Cynical Behaviors, Model:KeypadLinc Button Device Control (KBDC). I am immediately presented with a familiar pop-up dialog to select "Button Device", "Button", and "Target Device". However, there appears to be some kind of bug or problem in that the pull-down menus used to select button device and button are empty - just grey'd-out text saying "select an item". Target device pull-down menu seems to work as expected and shows many devices.

I went back to look at some of my existing KBDC devices (as I said, I have lots). These devices are functioning correctly (at least most of them are), however when I edit one of the devices, and then select "Edit Device Settings..." subdialog, the "Button Device" setting shows an empty menu (i.e. it does not correctly show the current setting, nor does it show any other keypadLincs in my system). The "button" setting does correctly show the set of available buttons. Target device also looks normal.

In summary: it appears to not be possible to create new KeypadLinc Button Device Control devices in my system. Existing devices continue to work, however it does not appear to be possible to edit (nor view) the "Button Device" property of these devices.

In the logs, it appears my failed attempts to create or edit devices are generating errors. Here is an example:
Cynical Behaviors Error in filter ButtonControllerFilter: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 67, in diagnostic_log
yield
File ".../Server Plugin/cyin/plug.py", line 618, in menufilter
menu = filter._evaluate()
File ".../Server Plugin/cyin/filter.py", line 77, in _evaluate
menu = self.evaluate()
File ".../Server Plugin/cyin/filter.py", line 105, in evaluate
return self.sort([item for item in self.generate()])
File ".../Server Plugin/cyin/filter.py", line 109, in sort
return sorted(values, key=lambda s: natural_sort(s[1]))
TypeError: '<' not supported between instances of 'str' and 'int'


Posted on
Fri Jan 20, 2023 11:25 am
dduff617 offline
Posts: 661
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: Cynical Behaviors problem

refreshing this thread, as i'm still having the issue reported above...

is the plugin still working for anyone else?

Posted on
Mon Jan 23, 2023 2:35 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Cynical Behaviors problem

nup. seems to be utterly useless now.

Posted on
Mon Jan 23, 2023 9:16 am
dduff617 offline
Posts: 661
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: Cynical Behaviors problem

ok, thanks for confirmation, agame.

Posted on
Mon May 29, 2023 1:59 pm
tim offline
Posts: 2
Joined: May 10, 2020

Re: Cynical Behaviors problem

I'm way too late to this party, but I ran into this myself for the first time the other day and thought I'd share my quick fix. I haven't put in the effort to fully understand the exception, but I assume it's due to some Python 3 difference with the sorted() method.

I don't care how my sensor list is sorted, so I just removed the filter by changing line 109 in cyin/filter.py from
Code: Select all
return sorted(values, key=lambda s: natural_sort(s[1]))
to
Code: Select all
return values
. The plugin is back to working perfectly for me now.

Posted on
Wed Jun 21, 2023 4:26 pm
dduff617 offline
Posts: 661
Joined: Jul 05, 2006
Location: Massachusetts, USA

Re: Cynical Behaviors problem

thanks for posting this, tim. this was a big help to me.

Posted on
Tue Oct 31, 2023 6:29 am
roquej offline
User avatar
Posts: 609
Joined: Jan 04, 2015
Location: South Florida, USA

Re: Cynical Behaviors problem

To me as well. thank you!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest