Phidgets Plugin Discussion

Posted on
Mon Jan 21, 2013 1:23 am
gtreece offline
Posts: 171
Joined: Sep 26, 2011

Re: Phidgets Plugin Discussion

Thanks again for all your work on this.

Do you use this plugin yourself, with an SBC? I've noticed that the memory on my SBC gets chewed up over the course of several days, and it eventually stops sending data. I don't have any code or configurations on my SBC at all. It's essentially out of the box, plus the addition of the wifi, web cam and sensors. Just wondering if it's related to the way this plugin works with the web service, or if it's something with the base SBC install (or both possibly).

Posted on
Mon Jan 21, 2013 1:51 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

In fact, I just switched my Phidgets controller from a FreeBSD box to an SBC2. The Phidgets libs ran on FreeBSD but had memory leaks so I was automatically restarting the web service a couple of times per day. I got the SBC partially to offload my server and partially because I wanted to give the Phidgets a more stable environment. I have noticed there is still a little memory creep, but nothing like before. I also spoke with Phidgets support and they said that after a week or two the web service on the SBC has shown some instability. So, I just created a cron job to do a reboot the SBC every Sunday early am. So so far it seems to be working out well.

However, there is really nothing the plugin could do to exacerbate any web service issues, they are completely independent and, in any case, the plugin actually sits on top of the Phidgets low level Python drivers (which are bundled in the plugin) and they sit on the Phidgets Mac C-libs which manage all communications with the web service.

One thing you might check is the version of your web service app and the Phidgets libs. Mine are now: Phidget21 - Version 2.1.8 - Built Dec 18 2012 13:06:07

I bought my SBC through a small retailer in the US and when I received the unit the software was two releases out if date.

And to answer your first question. yes, I use the plugin extensively. It controls our front door access via an RFID reader as well as remotely using the Indigo-Touch app, manages the espresso machine and tracks temperature and humidity in my wine "cellar" and monitors pool pump activity, pool water temp and pool area air temp and humidity.

Posted on
Mon Jan 21, 2013 2:03 am
gtreece offline
Posts: 171
Joined: Sep 26, 2011

Re: Phidgets Plugin Discussion

I was thinking of going the route of a regular restart schedule with cron. Sounds like that might be the best option. It's not a problem while I'm developing my setup, but when I eventually move it all out to the garden, I'll want it to be as self-sufficient as possible.

Posted on
Mon Jan 21, 2013 5:15 am
loafbread offline
Posts: 137
Joined: May 25, 2009

Beta 0.4.5 didn't work for me

I tried updating to 0.4.5 and got these errors when trying to reload. I also tried restarting Indigo. I had to revert to a Time Machine copy of 0.4.0.

Reloading plugin "Phidgets 0.4.5"
Stopping plugin "Phidgets 0.4.5" (pid 66635)
Stopped plugin "Phidgets 0.4.5"
Starting plugin "Phidgets 0.4.5" (pid 66682)
Phidgets Error Error in plugin execution InitializeMain:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "plugin.py", line 31, in __init__
<type 'exceptions.KeyError'>: key pl1 not found in dict

Stopping plugin "Phidgets 0.4.5" (pid 66682)
Stopped plugin "Phidgets 0.4.5"

Posted on
Mon Jan 21, 2013 11:25 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Phidgets plugin 0.4.6 now available

Version 0.4.6 of the Phidgets plugin is now available. This release fixes an issue which prevented the plugin from starting after upgrading to version 0.4.5.

For more information and a download link, please see the new Phidgets Announcements forum.

Posted on
Sat Jan 26, 2013 5:40 am
loafbread offline
Posts: 137
Joined: May 25, 2009

Re: Phidgets Plugin Discussion

0.4.6 plugin gets an error when installing and reloading. It functions just fine for me but it throws this error when it starts. This is a great plugin, it has been working flawlessly. Much more reliable than the EZIO devices I replaced.

Stopped plugin "Phidgets 0.4.6"
Starting plugin "Phidgets 0.4.6" (pid 40482)
Started plugin "Phidgets 0.4.6"
Phidgets Error Error in plugin execution startup:

Traceback (most recent call last):
File "plugin.py", line 71, in startup
<type 'exceptions.KeyError'>: key pl0 not found in dict

Posted on
Sat Jan 26, 2013 10:57 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

Did you reconfigure the plugin? The error is caused because the plugin cannot find the setting for low-level debugging. If you just open the plugin config UI and then close it, that property will be created and set.

On the other hand, I had added code to trap that error and turn it into a warning and you should not be seeing the message you are getting. I'll check into that.

Posted on
Sun Jan 27, 2013 5:48 am
loafbread offline
Posts: 137
Joined: May 25, 2009

Re: Phidgets Plugin Discussion

That fixed it. I had not reconfigured the plugin. Sorry, I did not read the instructions properly.

Posted on
Sun Feb 17, 2013 5:39 pm
Otis offline
Posts: 210
Joined: Jan 24, 2006

Re: Phidgets Plugin Discussion

I'm trying to use a 1017 Phidgets board connected directly to a USB port in my mac Mini. I can turn all the relays on and off using the Phidgets preference pane in System Preferences, but I can't configure the board from Indigo. In the Configure Phidget Interface Kit pane, after I select 1017 as the model, enter the serial number, and select Local USB Port, nothing appears in the Serial Port drop down menu.

And, of course, when I try to access the 1017 in an indigo Action, nothing appears in the Select Phidget drop down menu.

Here is an excerpt from the debug log:

Started plugin "Phidgets 0.4.6"
Phidgets Plugin startup.
Phidgets Debug versionCheck() called
Phidgets url:http://yikes.com/plugins/Phidgets.html
Phidgets Your plugin version, v0.4.6, is current.
Phidgets Debug <<-- entering deviceStartComm: new device (95621458 - ifKit)
Phidgets Debug Added ifKit entry: serial:95621458, ifkitIs:367350
Phidgets Debug exiting deviceStartComm -->>
Phidgets Debug Found ifkit serial:95621458
Phidgets Plugin ifKit thread starting
Phidgets Plugin ifKit thread init finished for 95621458
Phidgets Plugin ifKit thread run() called
Phidgets Plugin ifKit thread run() finished error handler declaration
Phidgets Plugin ifKit thread run() finished sensor change handler declaration
Phidgets Plugin ifKit thread run() finished input change handler declaration
Phidgets Plugin ifKit thread run() finished input change handler declaration
Phidgets Plugin ifKit thread run() finished handler declarations
Phidgets Plugin Creating interfacekit for serial: 367350
Phidgets Plugin IfKit thread run() Created the IfKit object
Phidgets Plugin IfKit thread run() set all the handlers
Phidgets Debug Opening phidget object....
Phidgets Plugin IfKit thread run() opened the Phidget device

Phidgets Error IfKit Exception (Wait for Attach) from serial 367350, 13: Given timeout has been exceeded.
Phidgets Plugin IfKit thread run() phidget device attached

There is approximately an 8-second delay before the timeout error appears in the log.
. . .

When I try to create the device in Indigo:

UiValuesDict : (dict)
address : (string)
ifKitCommType : USB (string)
ifKitConfig : (string)
ifKitDigitalInputs : (string)
ifKitDigitalOutputs : (string)
ifKitIpAddress : (string)
ifKitIpPort : 5001 (string)
ifKitModel : 1017 (string)
ifKitSensorRate_0 : 16 (string)
ifKitSensorRate_1 : 16 (string)
. . .
ifKitSensorTrigger_7 : (string)
ifKitSensors : (string)
ifKitSerial : 367350 (string)
ifKitSerialPort : (string)

I'm guessing the Plugin knows the 1017 is there, but has somehow failed to attach it correctly.

The same thing happens when I try to install it on my Mac Pro. All software is current, both computers have Intel processors, and I have reloaded the plugin, restarted Indigo (client and server), and restarted the computer.

Any suggestions? Thanks in advance.

Posted on
Sun Feb 17, 2013 8:23 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

Otis... First thing I'd try is to turn on the web service in the phidgets preference pane. Then configure the Indigo device for IP network, 127.0.0.1 port 5001 and see how that goes. Also, make sure you reload the plugin after adding the interface kit device.

Posted on
Mon Feb 18, 2013 1:31 pm
Otis offline
Posts: 210
Joined: Jan 24, 2006

Re: Phidgets Plugin Discussion

Since most of the discussion on the Phidgets thread involves using the Plugin with the SBC, I just wanted to verify: Is the 1017 board supposed to work when plugged directly into the Mac's USB port? Is anyone else using it this way?

When I turned on web service as you suggested, with the 1017 plugged into the USB port, the Plugin still doesn't see it, and the Phidgets pane in System Preferences no longer sees it. Do I have to use an SBC with the Plugin?

Posted on
Mon Feb 18, 2013 1:31 pm
Otis offline
Posts: 210
Joined: Jan 24, 2006

Re: Phidgets Plugin Discussion

Since most of the discussion on the Phidgets thread involves using the Plugin with the SBC, I just wanted to verify: Is the 1017 board supposed to work when plugged directly into the Mac's USB port? Is anyone else using it this way?

When I turned on web service as you suggested, with the 1017 plugged into the USB port, the Plugin still doesn't see it, and the Phidgets pane in System Preferences no longer sees it. Do I have to use an SBC with the Plugin?

Posted on
Mon Feb 18, 2013 4:13 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

Otis wrote:
Since most of the discussion on the Phidgets thread involves using the Plugin with the SBC, I just wanted to verify: Is the 1017 board supposed to work when plugged directly into the Mac's USB port? Is anyone else using it this way?

When I turned on web service as you suggested, with the 1017 plugged into the USB port, the Plugin still doesn't see it, and the Phidgets pane in System Preferences no longer sees it. Do I have to use an SBC with the Plugin?

Yes, the 1017 0/0/8 Relay board can be directly connected to your Mac via USB and should work with the Phidgets plugin without an SBC. However, I have just found a small bug that would have prevented the 1017 outputs from being defined as individual devices. Please download a copy of v0.4.7 from dropbox. Then delete your existing 1017 device and add a new one. In the device creation dialog you should now see a button that says: Read ifKit Config. Click that, then save, close and reload the plugin. You can then create individual devices for each of the 1017 output relays.

Regarding the web service. It is possible to connect directly with the Phidget from the plugin using USB. However, since a USB connection is exclusive, you would not be able to see that Phidget with the Phidgets Preferences pane or any other application. Use of the Web Service allows the Phidgets to be shared and is recommended. Note that the direct USB connection has not been thoroughly tested. If you decide to use a USB connection and have problems, please post the issues to this forum. Thanks.

Posted on
Mon Feb 18, 2013 4:35 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Phidgets Plugin Discussion

Can the Phidgets device and plug-in be used if the USB is plugged into a hub? I am running out of USB ports on my Mac.

Posted on
Mon Feb 18, 2013 4:37 pm
Yves1922 offline
Posts: 14
Joined: Oct 26, 2011
Location: Plaisance, Québec

Re: Phidgets Plugin Discussion

Berkinet,
when I click on your dropbox, I get error 404

I created a drop box account as I never used this.

Page 7 of 39 1 ... 4, 5, 6, 7, 8, 9, 10 ... 39

Who is online

Users browsing this forum: No registered users and 2 guests