Phidgets Plugin

Posted on
Mon Jan 14, 2013 12:06 pm
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Phidgets Plugin

β 0.4.8 of the Phidgets plugin is now available on dropbox.

This release fixes a problem with the 1014 relay board that appeared in 0.3.2 and adds a few new features. See the release notes below for more information.

If you are upgrading from a release prior to 0.3.2 you should re-configure all your Phidget devices:
  1. Open the device
  2. Click Edit Device Settings...
    <optionally make any changes you wish>
  3. Click Save
  4. Close the device window.
  5. Reload the Phidgets plugin

Here are the release notes for the past few releases:
    v 0.2.5 Jan 10, 2013
      Added support for calibration/configuration info for sensors (1134, 1142 & 1143)
      Fixed bugs in the threading model that limited the plugin to 1 phidget per type.

    v 0.2.6 Jan 11, 2013
      Fixed bug in decimal display for ifkit attached sensors

    v 0.3.0 Jan 11, 2013
      Added 2 generic sensors: 0-5 volts and 0-1000 sensor value
      Fixed bug in which subsequent attempts to configure a sensor/di or do device only showed 2 ports.
      Fixed bug requiring redefinition of a sensor to set states
      Added values for Indigo DEVICE table 'address' column. Sensors = ifkit device name, others = IP Address.
      Added support for ambient temp sensor on 1048 - PhidgetTemperatureSensor 4-Input

    v 0.3.1 Jan 12, 2013
      Added address column support for USB connected devices
      Cleaned up test logging code (debug info logged as errors)

    v 0.3.2 Jan 12, 2013
      Fixed issue with RFID reader antenna not indicating state at start.
      Added code to update onboardLED at start
      Fixed a minor bug that caused a non-fatal error when creating a new sensor/DO/DO device
      Fixed problem where interface kits did not have an address assigned
      Fixed problem where standalone temp sensor did not indicate online
      Fixed issue with decimalPlace control in the Indigo GUI
      Fixed issue which confused input and output counts in ifkits

    v 0.4.0 Jan 15, 2013
      Added ability to set decimal precision (0 to 4 places) for sensors in the config UI
      Changed device ui to better control displayed data for ifkits w/o sensors
      Added ability to set thermocouple type and sensitivity for 1048 and 1051 Phidgets devices
      Revised logging to show device name after setup complete
      Added custom sensor type 0999c with user defined formula (see below)

The following issues still exist:
  • After adding a new interface kit or standalone Phidget you must reload the plugin
    (You do not need to restart after adding a sensor to an InterfaceKit)
  • You must reload the plugin after changing the logging level (plugin config))

For the new 0999c sensor type you may add your own custom formula. If no formula is entered the formula defaults to the reported sensor output: 0 - 1000. In the formula x must be used to represent the reading as reported by the interface kit. You may then apply any changes to that. Note that a formula of x is the same as no formula, the value reported by the interface kit is used with no changes. Here are a few examples:
  • x/3 [x ÷ 3]
  • (3.141*)**x [the area of a circle with radius = x]
  • x*2.20462 [convert a weight (x) in pounds, to kilograms]
  • -x [x expressed as a negative number]
  • int(x/5.5) [the integer part of x/5.5]
  • x>=500 [0 if x is less than 500, 1 if it is greater]
  • math.sin(x) [The sine of x]
  • etc. Have fun :wink:

Note that all python arithmetic operators (+, -, *, /, //. % and **) are supported. Many math functions (abs(), int() and others are also supported. And, you can also use any functions in the math module (math.sin(), math.cos, math.pi, etc.).

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.

Posted on
Sun Jan 20, 2013 6:49 pm
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Phidgets plugin 0.5.3 now available

β 0.5.3 of the Phidgets plugin is now available on dropbox.

This release is a significant re-write of the logging code. Support for the TextLCD displays has been improved. The Write TextLCD action now allows writing to multiple text lines in the same action. Indigo Device states and variable values may be included in all lines.

Here are the release notes since 0.5.0:
v 0.4.6 Jan 20, 2013
    Fixed bug in startup.

v 0.4.7 Feb 18, 2013
    Fixed bug in getting RFID LED on state
    Fixed error in 1130 sensor definition
    Added 1014 and 1017 to list of ifkits in Devices.xml

v 0.4.8 Feb 18, 2013
    Fixed bug in plugin.py CalcDeviceFunc - threw error if in debug mode.

v 0.5.0 Feb 23, 2013
    Moved thread initialization to deviceStartComm(). Devices now respect the
    Comm Enabled flag and automatically restart when edited.
    Added log level changes on the fly.
    General code cleanup.
    Initial TextLCD support with ability to include device and variable states in display message.

v 0.5.1 Feb 28, 2013
    Changing or restarting ifKit attached sensor, DI and DO devices now forces a read of the device value/state
    Stopping comm on a device now keeps it from updating
    Fixed a problem with conbined TextLCD/IfKits that prevented both from being defined as devices in Indigo.
    Added code to truncate messsages for the TextLCD to 20 characters. This will be changed later to be dynamicaly
    set for the screen size.
    Fixed Devices.XML bug which prevented the 1012 0/16/16 from being properly created.

v 0.5.3 March 2, 2013
    Note: 0.5.2 was an internal release
    Changed all log messages to use indigo.server.log and support 5 log levels
    fixed typo in interfacekit setup that caused incorrect sensor counts
    revised the write TextLCD action to allow writes to multiople text lines

The following issues exist:
  • Pulsed output actions (for Digital Output devices) equal to a multiple of 1000 will result in a pulse of zero. Use 999 instead.
  • Some sensor devices may throw a state error when first run. If this happens, just restart the plugin

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.

Posted on
Sun Aug 11, 2013 2:15 am
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Re: Phidgets plugin 0.5.6 now available

β 0.5.6 of the Phidgets plugin is now available on dropbox.

This release contains several minor changes. Support for the 3130 Humidity Sensor has been added and a bug caused by changes in the Indigo plugin interface has been corrected.

Here are the release notes since 0.5.3:
v 0.5.4 March 4, 2013 (Internal release)
    Fixed typo in actions.xml for action phDigitalOutOn
    Fixed bug in phDigitalOutOn caused by issue in IOM (device is not being passed.)

v 0.5.5 March 8, 2013 (Internal release
    Fixed typos on phidgets dictionary
    Added 3130 humidity sensor

v 0.5.6 August 11, 2013
    Made changes to address plugin interface changes made in Indigo v6b8

The following issues exist:
  • Pulsed output actions (for Digital Output devices) equal to a multiple of 1000 will result in a pulse of zero. Use 999 instead.
  • Some sensor devices may throw a state error when first run. If this happens, just restart the plugin

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.[/quote]

Posted on
Sun Oct 06, 2013 6:50 am
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Phidgets plugin 0.6.1 now available

β 0.6.1 of the Phidgets plugin is now available on dropbox.

This release contains some relatively minor bug fixes and support for a new Phidget - the 1054 Frequency Counter*.

This release also contains much improved error handling when InterfaceKits and other Standalone Phidgets are detached from the network. A detach event can happen in for many reasons: network problem, remote system failure, Phidgets webservice failure, Phidget USB connection disconnected, etc. If a Phidget becomes disconnected, the Indigo display for that device will turn red and a red error Icon will appear in the DEVICE table state column. An error will also be logged. When the Phidget is again attached, the error conditions will be cleared and a message will also be logged. For example:
ss.png
ss.png (17.59 KiB) Viewed 1023 times

NOTE:
    The state of pseudo Phidget devices (Analog sensors, digital inputs and digital outputs attached to an InterfaceKit) will track the state of the InterfaceKit to which they are attached. However, just removing or disconnecting an analog sensor or digital input/output from an InterfaceKit will not be reflected in Indigo. This is because the Phidgets software does not provide data about what, if anything, is connected to an Interface's ports.

I will be adding an Event Trigger to report detach events in an upcoming release.

Here are the release notes since 0.5.6:
v 0.5.7 August 14, 2013
    (Internal Release)
    Fixed typo/bug in ifkit.py interfaceKitInputChanged()

v 0.5.8 August 25, 2013
    (Internal Release)
    Changed default level for debug messages in tempsensor error handlers (from 0 to 1)

v 0.6.0 September 13, 2013
    (Internal Release)
    Added support for 1054 Frequency counter

v 0.6.1 October 08, 2013
    Modified code to report detach and attach events and set the Indigo display accordingly
    Correctly displays online/offline stated of pseudo devices when interface kit state changes
    Fixed bug in 1133 sound sensor calculation

The following issues exist:
  • Pulsed output actions (for Digital Output devices) equal to a multiple of 1000 will result in a pulse of zero. Use 999 instead.
  • Some sensor devices may throw a state error when first run. If this happens, just restart the plugin

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.

* Many thanks hamw for providing the Frequency Counter Phidget.

Posted on
Sun Oct 20, 2013 12:27 pm
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Phidgets plugin 0.6.2 now available

β 0.6.2 of the Phidgets plugin is now available on dropbox.

This release contains several bug fixes and the addition of two new Events to be used in Triggers. The attach and detach events will allow you to monitor the loss (and restoral) of Phidgets on your network.

Release notes for v0.6.2
v 0.6.2 October 20, 2013
    Complete revsion of the TextLCD device and options settings code.
    Added TextLCD Actions to control backlight and set brightness and contrast.
    Added events for attach and detach of standalone phidgets.
    Fixed a bug affecting 1054 frequency counter state column selection.
    Added initialize function for TextLCD after re-attachment.
    Moved Phidgets actions to the Device Actions menu in the Indigo Actions Dialog.

The following issues exist:
  • Pulsed output actions (for Digital Output devices) equal to a multiple of 1000 will result in a pulse of zero. Use 999 instead.
  • Some sensor devices may throw a state error when first run. If this happens, just restart the plugin
  • If the state column display state is changed for the 1054 it may, at times, fail to return to operation. If this happens just uncheck, and then re-check the Comm Enabled

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.

* Thanks to 4billl for feature ideas and testing/debugging help.

Posted on
Wed Oct 23, 2013 9:48 am
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Phidgets plugin 0.6.3 now available

β 0.6.3 of the Phidgets plugin is now available on dropbox.

This release mostly contains bug fixes and improvements to stability in the case of communications problems.

Release notes for v0.6.3
v 0.6.3 October 23, 2013
    Added device initialization to attach handler for 1054 Frequency Counter
    Fixed a bug in the ifkit reinitialize that kept some outputs from working
    Added support for TextLCD custom characters
    Added extra time for threads to close - reduce chance of double threads
    Fxed bug in 1051 temp sensor device config
    Added support for Fahrenhet conversion and decimal control for 1048 and 1051 temp sensor

The following issues exist:
  • Pulsed output actions (for Digital Output devices) equal to a multiple of 1000 will result in a pulse of zero. Use 999 instead.
  • Some sensor devices may throw a state error when first run. If this happens, just restart the plugin

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.

* Thanks to 4billl for feature ideas and testing/debugging help.[/quote]

Posted on
Mon Nov 04, 2013 10:45 am
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Phidgets plugin 0.6.4 now available

β 0.6.4 of the Phidgets plugin is now available on dropbox.

This release mostly contains 2 minor bug fixes and an additional option for the 1048 and 1051 Temperature Sensors.

Release notes for v0.6.4
v 0.6.4 November 4, 2013
    Fixed bug in debug statements in ifkit.py
    Added ablity to suppress 1048 and 1051 tempsensor error message 36871 (potential exceeded)
    Added exception handlers for cases where a device is deleted before it has been fully configured
The following issues exist:
  • Pulsed output actions (for Digital Output devices) equal to a multiple of 1000 will result in a pulse of zero. Use 999 instead.
  • Some sensor devices may throw a state error when first run. If this happens, just restart the plugin

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.

Thanks to gtreece for bug identification and feature ideas.

Posted on
Tue Dec 03, 2013 2:33 pm
berkinet offline
User avatar
Posts: 2407
Joined: Nov 18, 2008
Location: Mougins, France & Berkeley, CA, USA

Phidgets plugin 0.6.5 now available

β 0.6.5 of the Phidgets plugin is now available on dropbox.

This release contains 1 minor bug fix, adds support for the 1016 CircularTouch Sensor. and adds a new issue to the known issues list (See below.)

Release notes for v0.6.5
v 0.6.5 November 30, 2013
    Fixed problem in getDeviceDisplayStateId(): where new standalone devices threw an error on first configuration
    Added support for the 1016 Circular Touch Sensor

The following issues exist:
  • Pulsed output actions (for Digital Output devices) equal to a multiple of 1000 will result in a pulse of zero. Use 999 instead.
  • If a directly connected Phidget (InterfaceKit, etc.) becomes detached for an extended period, the plugin may not be able to automatically recover when the Phidget comes back online. If this should happen, just reload the plugin.

As usual, please post any issues, questions, problems, ideas and suggestions to the Phidgets Discussion forum.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest