Phidgets Plugin Discussion

Posted on
Fri Mar 01, 2013 4:04 pm
loafbread offline
Posts: 137
Joined: May 25, 2009

Re: Phidgets Plugin Discussion

That fixed it. Thanks for the quick service.

Posted on
Fri Mar 01, 2013 4:14 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

Thanks for the update. That fix, plus a number of internal changes will be in release 0.5.2.

Posted on
Sat Mar 02, 2013 7:51 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Phidgets plugin v0.5.3 now available

Version 0.5.3 of the Phidgets plugin is now available. This release fixes issues affecting creation of 1012 interfaceKit devices. It also adds improved TextLCD support and several internal changes for speed and efficiency.

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

Posted on
Sun Mar 03, 2013 4:57 pm
jsrivet offline
User avatar
Posts: 13
Joined: May 23, 2010
Location: Joliette, Québec, Canada

Re: Phidgets Plugin Discussion

-I have a problem with my RFID, when I want to set the outputs to ON I receive an error in the log:

Phidgets Error Error in plugin execution ExecuteAction:
Traceback (most recent call last):
File "plugin.py", line 492, in phidgetOutputControl
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'name'

My plugin version 0.5.3

-I want to know if it is possible to add the outputs of RFID in the "devices" such as the 1012
-I want to know how to view the log output input change on 1012 in normal mode

thank you

Posted on
Sun Mar 03, 2013 5:26 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

Unfortunately, I do not have my RFID reader here at the moment, so I'll need to guess a bit.

First, you should be able to control the outputs in an action. For the Type: select Phidgets Acticon and then Control a Phidget Digital Output on a Standalone Phidget. Then click Edit Action Settings... and choose the phidget, output and action. There is a type, the second line that says Output Number should say Action.

If that is what you are doing, then we need to look further. Set the debug level to Debug and try setting the output and post the results.

Too answer your other two questions. At this time the RFID reader's inputs cannot be used to create indigo devices. However, you can create a pseudo device (Meta Device or Device Collection plugins) and have the pseudo device control separate actions to turn the RFID outputs on and off.

In Normal logging mode input changes are not logged. Individual input/output changes are only available at level Debug. I am thinking of re-writing the logging code to add a level between Normal and Verbose to log input/output changes.

Posted on
Sun Mar 03, 2013 6:06 pm
jsrivet offline
User avatar
Posts: 13
Joined: May 23, 2010
Location: Joliette, Québec, Canada

Re: Phidgets Plugin Discussion

I changed the plugin.py, a line 492 and line 494 [dev.id] to my device id [1448472029] and outputs works. Surely [dev.id] was not defined, but I do not know how to fix it.

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

Re: Phidgets Plugin Discussion

Thanks for the report and the troubleshooting info. I was able to reproduce the problem without having an RFID reader and I think I have it fixed. However, without the reader I cannot test to be sure the fix works. Please download beta 0.5.4 from dropbox and let me know if it works. BTW, I also fixed the typo in the Action dialog.

Posted on
Mon Mar 11, 2013 7:54 am
Otis offline
Posts: 210
Joined: Jan 24, 2006

Re: Phidgets Plugin Discussion

First, a quick update on the kernel panics that I mentioned on another thread: when I removed the Phidgets drivers, the Phidgets plugin, and disabled the EasyDAQ plugin, the kernel panics all stopped. Might there be a conflict? I'm keeping an eye on it.

I'm running OS X 10.6.8, Indigo 6.0.0.b5, Phidgets Plugin 0.5.4, and the current Phidgets drivers and SBC software.

Now, the current problem: I did get my 1017 working successfully connected directly to a USB port, although it would disconnect periodically at the end of a 15-foot active USB cable.

So, I finally bought a Phidgets SBC2 and re-installed the Phidgets drivers and updated the SBC2 to current software. I now have the SBC2 connected to my network, and two 1017 modules connected to the SBC2.

I'm guessing I don't have to define the SBC2 itself in Indigo— it operates transparently. Right?

I can control the 1017's relays and the SBC's internal 1018 from the Phidgets preference pane. But when I try to define either of the two 1017s, or the 1018, in Indigo, the devices appear not to be attached to the SBC. The "State" displays in Indigo's Home window as "online" for all three devices.

I defined the boards as Phidget Interface kits. In the Configure Phidget Interface Kit panes, I set the connection as IP Network, the IP address as 127.0.0.1, and the Port as 5001.


If I click on Read IfKit Config, the following is displayed for about 10 seconds: Waiting for button reply …
and in the log:

Phidgets No existing ifkit found. Creating new ifkit
Phidgets Opening ifkit....
Error (client) timeout waiting for plugin response from com.perceptiveautomation.indigoplugin.Phidgets for request UiAction
Error (client) received unexpected packet response UiAction (waiting for GetUiDynamicList)
Phidgets Error Phidget Exception b 13: Given timeout has been exceeded.
Phidgets Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 963, in readIfKitConfig
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Phidgets.indigoPlugin/Contents/Server Plugin/Phidgets/Devices/InterfaceKit.py", line 179, in getSensorCount
<class 'Phidgets.PhidgetException.PhidgetException'>:


This error does not occur if the 1017 is plugged into a USB port, but does for both the 1017 and the 1018 plugged into the SBC.


I'm guessing the following error messages are caused by the above; they're included here in case they might be helpful.

If I ignore the above error and "Edit" the Phidget device, and click on Edit Device Settings, after a few seconds the following is displayed at the end of the log:

version : 0
Phidgets Found ifkit device: Phidget1 - speaker control
Phidgets ifKit Thread starting for: Phidget1 - speaker control
Phidgets ifKit Thread init finished for: Phidget1 - speaker control
Phidgets ifKit Thread run() called
Phidgets ifKit ifKit thread run() finished error handler declaration
Phidgets ifKit ifKit thread run() finished sensor change handler declaration
Phidgets ifKit ifKit thread run() finished input change handler declaration
Phidgets ifKit ifKit thread run() finished input change handler declaration
Phidgets ifKit ifKit thread run() finished handler declarations
Phidgets ifKit Start attach for device: Phidget1 - speaker control
Phidgets ifKit Creating interfacekit for serial: 367350
Phidgets ifKit IfKit thread run() Created the IfKit object
Phidgets ifKit IfKit thread run() set all the handlers
Phidgets Debug Opening phidget object....
Phidgets ifKit IfKit thread run() opened the Phidget device
Phidgets Added ifKit: Phidget1 - speaker control
Phidgets Created ifKit thread: serial:1719644183, phidget Is:367350
Phidgets exiting deviceStartComm -->>
Phidgets Error IfKit Exception (Wait for Attach) from serial 367350, 13: Given timeout has been exceeded.
Phidgets ifKit IfKit thread run() phidget device attached


The if I try to define a relay as a device, the following excerpts appear in the log (clicking on Edit Device Settings and Save).(I think this verifies that the device is not attached):

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

And sometimes the following:

Phidgets Entering didDeviceCommPropertyChange for device: Phidget2 R0 Damper1 test (1524413457 - phDoIfKit)
Phidgets Digital Input on dev num: 1324554797
Phidgets ifKit Entered readDigitalOutput for device Phidget2 - damper control , index 3
Phidgets Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 800, in deviceUpdated
File "plugin.py", line 326, in didDeviceCommPropertyChange
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Phidgets.indigoPlugin/Contents/Server Plugin/ifkit.py", line 224, in readDigitalOutput
<type 'exceptions.UnboundLocalError'>: local variable 'inValue' referenced before assignment




When I reload the Phidgets Plugin, the following is displayed:

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

(One 1017 was not plugged in during that reload)

I get the same messages regardless of whether or not the 1017s are plugged into the SBC.

Am I missing a step to connect the InterfaceKits to the SBC board??

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

Re: Phidgets Plugin Discussion

When defining the 1017 based devices, you need to use the IP Address of the SBC. You may also define the InterfaceKit on the SBC if you will be using the analog or digital I/O. You will not define the SBC itself since it is essentially invisible to the plugin. The Phidgets web service running on the SBC is what makes all the devices, including the builtin interfaceKit, visible.

Another way to look at the SBC is as a computer, maybe even a Mac, with three phidgets devices plugged into it and running the phidgets web service to share those devices with the outside world.

Posted on
Mon Mar 11, 2013 8:22 am
Otis offline
Posts: 210
Joined: Jan 24, 2006

Re: Phidgets Plugin Discussion

Thanks. That did it.

Posted on
Wed Mar 27, 2013 8:16 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Phidgets Plugin Discussion

Got my Phidgets stuff and the Valbia water valve. Holy Cow it works! The valve opens and closes and reports its state, controllable from the iPhone. Thank you Berkinet!

BTW do you have donation page?

Posted on
Wed Mar 27, 2013 10:12 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

hamw wrote:
Got my Phidgets stuff and the Valbia water valve. Holy Cow it works! The valve opens and closes and reports its state, controllable from the iPhone. Thank you Berkinet!

BTW do you have donation page?

Glad to hear it. Could you write up a short description of how you wired it up as a guide for others with similar projects.

Donations. :idea: Sure, send them to your local food bank.

Posted on
Sat May 11, 2013 7:21 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Phidgets Plugin Discussion

Well, following several delays, mostly due to a stuck main water supply valve at the street and the usual overwork, I have finally finished installing the valve, and it works, with feedback. I will post the install over on the other thread discussing the Valbia valve.

On the Phidgets front, however, I also have the Phidgets pulse frequency counter to use with the pulse water meter. I looked in the plugin and there does not seem to be a pulse counter enabled. Mine is a standalone device, plugged into a separate USB port. Can I use one of the rotary devices or another to enable logging of water use and leak detection? Or do we need to do something with the pulse frequency counter itself?

Posted on
Sun May 12, 2013 2:37 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

hamw wrote:
On the Phidgets front, however, I also have the Phidgets pulse frequency counter to use with the pulse water meter. I looked in the plugin and there does not seem to be a pulse counter enabled. Mine is a standalone device, plugged into a separate USB port. Can I use one of the rotary devices or another to enable logging of water use and leak detection? Or do we need to do something with the pulse frequency counter itself?

I need to add support for the 1054 Frequency Counter, and that might take a while. In the meantime, one of the encoder analog modules might work (see my post on this topic). You might also try connecting the pulse switch to an analog input and counting the closures in Indigo.

Posted on
Sun May 12, 2013 8:42 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Phidgets Plugin Discussion

I wrote up the install here. Overall it went pretty smoothly.

Following Berkinet's advice I used one of the digital inputs on the 8/8/8 board to count the pulses, and it works! As the meter spins the little dial rotates under the sensor and sends a pulse to the Phidgets board. The pulse is incremented with a trigger into a variable. So, no frequency counter required (yaay! total project cost is now $75 bucks cheaper!!).

There are a couple of things I'd like to do:

1. Total up historical water usage on a current day, prior day, current week, prior week, current month, and all months prior for one year (and maybe two or three?).

2. Use the pulse info to determine if there is a leak. It seems like water intensive things could create false calls, for instance running a bath or washing a car. I'm thinking that using the occupancy sensors (SPR, FMF, alarm status) during the day to determine if someone is home and suppressing a trigger would account for most of these events - I don't think my wife will allow motion detectors in the bathrooms! Then, monitoring strictly for any flow when everyone is away, and at night when everyone is asleep might pick up slow leaks.

I think both of these could be done with Applescript and some triggers. I am OK with AS but am not sure how to get time dependent things like current day, prior day, current month, prior month etc into a script. But, this reporting is very similar to what the RFXcom plugin's Rain Sensor already does. If anyone has suggestions how to write such a script I'd be very appreciative.

Page 9 of 39 1 ... 6, 7, 8, 9, 10, 11, 12 ... 39

Who is online

Users browsing this forum: No registered users and 33 guests