Cynical Cache plugin error message

Posted on
Tue Jan 20, 2015 1:42 am
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Cynical Cache plugin error message

Hello,

I'm using the Cynical Cache plugin which seems to be working on and off. I occasionally get the following issue, but once I reload the plugin it works fine. I'm mostly running it from a trigger.

Thanks,
Pete

Cynical Caché Error in standard_switch: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 46, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 56, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/irdev.py", line 203, in standard_switch
self.gcdev.engage(active)
File ".../Server Plugin/ir/gcache/gcdev.py", line 242, in engage
self.command("setstate", "1" if active else "0")
File ".../Server Plugin/ir/gcache/gcdev.py", line 70, in command
self.hostdev.command(','.join([cmd, self.address] + map(str, args)))
File ".../Server Plugin/ir/gcache/gcnet.py", line 119, in command
self.hostdev.write(cmd + '\r')
AttributeError: 'NoneType' object has no attribute 'write'

Posted on
Sun Apr 26, 2015 12:51 pm
jmdraper offline
Posts: 103
Joined: Sep 11, 2014
Location: Surrey, UK

Re: Cynical Cache plugin error message

Looks like I am getting the same error. This used to happen once in a while. Now it happens almost every time I use the plugin so I end up having to manually reload the plugin several times a day which is not the most practical!

Any help very gratefully received. Here are the error lines from my log:

Cynical Caché Error in sendIR: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 46, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 56, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/irdev.py", line 111, in sendIR
self.gcdev.emit(symbol, action.count)
File ".../Server Plugin/ir/gcache/gcdev.py", line 110, in emit
task.transmit() # start transmission
File ".../Server Plugin/ir/gcache/gcdev.py", line 38, in transmit
self.seq = self.dev._transmit(self.ir, self.repeat)
File ".../Server Plugin/ir/gcache/gcdev.py", line 137, in _transmit
"%d,%d,%d,%d,%s" % (seq, ir.carrier, count, offset, ','.join(map(xlate, pulses))))
File ".../Server Plugin/ir/gcache/gcdev.py", line 70, in command
self.hostdev.command(','.join([cmd, self.address] + map(str, args)))
File ".../Server Plugin/ir/gcache/gcnet.py", line 119, in command
self.hostdev.write(cmd + '\r')
AttributeError: 'NoneType' object has no attribute 'write'

Posted on
Sun Apr 26, 2015 1:18 pm
tatrog offline
Posts: 39
Joined: Nov 16, 2013

Re: Cynical Cache plugin error message

Having the same problem. I have placed a restart plugin script in each trigger. I only use this plugin to open and close my IR curtains but if it ever becomes stable I would love to expand the use.


Sent from my iPad using Tapatalk

Posted on
Sun Apr 26, 2015 1:22 pm
jmdraper offline
Posts: 103
Joined: Sep 11, 2014
Location: Surrey, UK

Re: Cynical Cache plugin error message

Aha - I was looking for a way to script restart of the plugin. Could you help me out with to to script a plugin restart please? That would at least provide a more usable work-around.

Many thanks,
Jon

Posted on
Sun Apr 26, 2015 1:40 pm
jmdraper offline
Posts: 103
Joined: Sep 11, 2014
Location: Surrey, UK

Re: Cynical Cache plugin error message

Think I managed to solve my own problem with a bit of googling and detective / guesswork (I am not particularly knowledgeable about Indigo plugins, Python or indeed programming on the Mac). This seems to work (in case anyone else finds it useful):

gcPluginId = "org.cynic.indigo.gcnet"
gcPlugin = indigo.server.getPlugin(gcPluginId)

gcPlugin.restart()

Posted on
Sun Apr 26, 2015 2:38 pm
tatrog offline
Posts: 39
Joined: Nov 16, 2013

Re: Cynical Cache plugin error message

Create an action group. Type Execute Script (Script and File Actions) and place the below as embedded Python.

ID = "org.cynic.indigo.gcnet"
ID = indigo.server.getPlugin (ID)
ID.restart(waitUntilDone=True)

GT

Posted on
Thu May 28, 2015 12:11 am
tatrog offline
Posts: 39
Joined: Nov 16, 2013

Re: Cynical Cache plugin error message

Can you tell me if you are using more than one IR device. When I had only one itach this worked well. When I added more I found the same fault. Trying to isolate the issue. Thanks


Sent from my iPad using Tapatalk

Posted on
Thu May 28, 2015 12:18 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Cynical Cache plugin error message

This reply serves no purpose other than to add the word iTach to this thread so it shows up in future search results for that search term.

Posted on
Thu May 28, 2015 6:10 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Cynical Cache plugin error message

jmdraper wrote:
File ".../Server Plugin/ir/gcache/gcnet.py", line 119, in command
self.hostdev.write(cmd + '\r')
AttributeError: 'NoneType' object has no attribute 'write'

This is trying to send a command 'cmd' to the iTach/GC-100 device represented by 'self.hostdev' but self.hostdev at this point in the code is null or otherwise not what it should be.

In other words, the plugin no longer has an open connection to the iTach/GC-100.

The device has either disappeared from the network temporarily, or the sending or receiving of commands has in someway contained invalid data that's caused the connection to crash.

Restarting the plugin is causing it to re-open a connection to each defined iTach/GC-100 device ready to communicate.

Jon - can you turn on debugging in the Plugins > Cynical Cache > Configure dialog, then reload the plugin, then slowly send a few IR commands, and copy (or attach) the log back here?

Posted on
Thu May 28, 2015 12:21 pm
Perry The Cynic offline
Posts: 840
Joined: Apr 07, 2008

Re: Cynical Cache plugin error message

[Sorry for the slow response; I didn't get the magic "hey, look there" email for some reason. Well, I just got a manual one. :-)]

It looks like your network connection is breaking up, and you end up in a race between re-establishing it and sending a command. In addition to turning on the debug checkbox in the Cynical Cache settings, type into the debug modules field the string
ir.gcache.gcnet
That'll tell us more about the timing of events. Post (or email me) the Indigo log between the last reload of the plug-in and the time of failure.

Turning on the "keep alive" checkbox may help somewhat, depending on circumstances.

I might be able to eliminate the crash, but if your network connection breaks a lot, you'll still end up missing some IR commands. You may want to investigate your network or your iTach. (I've had one GC-100 go bad in exactly this way, so far - dropping off the network more and more frequently until I finally gave up and replaced it.)

Cheers
-- perry

Posted on
Thu May 28, 2015 12:22 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Cynical Cache plugin error message

Ah, good to see you're still alive! :-)

Posted on
Thu May 28, 2015 12:33 pm
Perry The Cynic offline
Posts: 840
Joined: Apr 07, 2008

Re: Cynical Cache plugin error message

howartp wrote:
Ah, good to see you're still alive! :-)

Barely. :-)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests