New(?) error on startup...

Posted on
Sat Apr 17, 2021 1:16 pm
dclonts offline
Posts: 49
Joined: Nov 05, 2006

New(?) error on startup...

getting the following in Cynical Behaviors on startup...

Cynical Behaviors Error error:
File ".../Server Plugin/cyin/plug.py", line 284, in deviceStartComm
iom.start_object(io, io.deviceTypeId)
File ".../Server Plugin/cyin/iom.py", line 183, in start_object
iom.start()
File ".../Server Plugin/kpl.py", line 70, in start
self.setLed()
File ".../Server Plugin/kpl.py", line 93, in setLed
if self.device.canSetLed(self.button):
File ".../Server Plugin/cyin/stddevice.py", line 91, in canSetLed
return ledno <= len(self.ledConfig) and self.ledConfig[ledno-1]
File ".../Server Plugin/cyin/stddevice.py", line 141, in ledConfig
config = self.buttonConfiguration()
File ".../Server Plugin/cyin/stddevice.py", line 131, in buttonConfiguration
reply = self.sendRaw([0x1F, 0x00], waitUntilAck=True)
File ".../Server Plugin/cyin/stddevice.py", line 70, in sendRaw
suppressLogging=suppressLogging and not cyin.DEBUG)
InterfaceError: interface INSTEON is not connected or enabled


May be unrelated, but the Update LEDs does not seem to update KPL leds to match the corresponding device states...

David Clonts

Posted on
Sun Apr 18, 2021 4:30 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: New(?) error on startup...

Do you get the error if you choose the Plugins->Cynical Behaviors->Reload menu item? The problem might just be that the plugin is loading before Indigo has completed connecting to the Insteon PowerLinc.

Image

Posted on
Mon Apr 26, 2021 12:19 pm
dclonts offline
Posts: 49
Joined: Nov 05, 2006

Re: New(?) error on startup...

Ha! brilliant.

So how do I delay startup of the plugin?

David Clonts

Posted on
Mon Apr 26, 2021 4:28 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: New(?) error on startup...

I would also love to know how to delay a plug-in startup (if possible)….

_______
Norm

Posted on
Mon Apr 26, 2021 4:57 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

New(?) error on startup...

That has been discussed before.

Conclusion in principle :
Has to be done within in the plugin.

Indigo does not offer a start/stop plugin command. Only a reload.

you could though have a script that reloads the plugin a minute after indigo starts.
You would still get the error messages the first time the plugin loads.


Sent from my iPhone using Tapatalk

Posted on
Mon Apr 26, 2021 5:11 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: New(?) error on startup...

So could I go in and add a step in the first few lines of the plug-in to count to 5000 or more (in a loop) before it continues or will that slow down everything Indigo is doing?

_______
Norm

Posted on
Mon Apr 26, 2021 5:18 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: New(?) error on startup...

add:

in

Code: Select all
.   def startup(self):
        self.sleep(60.)


make sure you have the right indent (4 spaces vs 1 tab )

Karl

Posted on
Mon Apr 26, 2021 5:35 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: New(?) error on startup...

Thanks Karl - I’ll try tomorrow :-)

_______
Norm

Posted on
Mon Apr 26, 2021 5:39 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: New(?) error on startup...

Hmm, thought it was dirt on my screen but it is a period or dot as the first character - is that supposed to be in there?

_______
Norm

Posted on
Mon Apr 26, 2021 5:54 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: New(?) error on startup...

No dot
Sorry


Sent from my iPhone using Tapatalk

Posted on
Mon Apr 26, 2021 6:45 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: New(?) error on startup...

Code: Select all
   def startup(self):
      self.sleep(60.)

Code: Select all
    def startup(self):
        self.sleep(60.)


first one w tabs, the second w 4 spaces they look identical, but mixing tabs and space will make the plugin not run.

Karl

Posted on
Wed Apr 28, 2021 9:21 am
dclonts offline
Posts: 49
Joined: Nov 05, 2006

Re: New(?) error on startup...

Wont this blow up the plugin with a timeout? Thought you couldn't do long sleeps in a plugin...

David Clonts

Posted on
Wed Apr 28, 2021 10:06 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: New(?) error on startup...

I believe the time out is only for script executed within Indigo, NOT for external scripts and not for plugins. they can sleep as long as you like

I tried 20000 seconds in a plugin and no complains


Karl

Posted on
Wed Apr 28, 2021 10:43 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: New(?) error on startup...

Wanted to try this but not smart enough to be sure what file I should put it in - is the first file a plug-in runs always called plugin.py

Should I put it in as the very first item before the import time line?

Thanks for any further help :-)

_______
Norm

Posted on
Wed Apr 28, 2021 10:46 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

New(?) error on startup...

Replace
def startup():

In plugin.py

With the posted lines

def startup():
self.sleep(60.)

With the proper indents.


Sent from my iPhone using Tapatalk

Who is online

Users browsing this forum: No registered users and 1 guest