Phidgets Plugin Discussion

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

Re: Phidgets Plugin Discussion

Otis wrote:
...Now, I am using Trendnet Powerline AV Adapters to bring my network out to the water feature. They are simple to use —... ...Another output turns on our deer sprinklers at night... ...Very cool! Many, if not all, of the available sensors appear to be supported by the plugin...

otis, thanks for the report. Your experiences pretty much map mine as far as the reliability and range of solutions Phidgets offer.

I do have a few comments: I have been using a Netgear Ethernet over A/C adapter for a situation similar to yours. In general it works well. However, I have noticed that occasionally the SBC-2 at the far end will just disappear and need to be physically re-started. I have not been able to isolate the cause of the problem but I think it is caused by a signal loss from the EoA/C units.

Do you irrigate your deer :-) I use my sprinklers to try to scare them away. :?

The plugin should support all Phidget Analog sensors that plug directly into an InterfaceKit. If not, let me know. They are easy to add. BTW, there are 3 general purpose pseudo sensors: the 999a, 999b and 999c. Respectively, their output is: voltage level, 0-5 vdc; an integer, 0-1000; or the result of a user defined formula based on a 0-1000 input value. In fact, the last one, the 999c, can pretty much duplicate the custom function encoded in the sensor specific devices (see the sensor documentation for the appropriate formulas). I am also quite willing to add support for additional standalone Phidgets if someone will send me one to test with.

And, finally, a CAVEAT: The Phidgets plugin is still very much beta. As I get more experience with the Phidgets, especially issues in my own installation, I continue to find areas for improvements. Right now, I think the weakest area is detection, notification and recovery of lost communications with a Phidget. I will be working on that this fall and winter.

Posted on
Mon Sep 30, 2013 5:31 pm
gtreece offline
Posts: 171
Joined: Sep 26, 2011

Re: Phidgets Plugin Discussion

I'm going to add my own experience here, using an SBC2 and berkinet's plugin. I have my SBC2 running in my greenhouse, powered by a solar/battery setup. From day 1, I have had issues like berkinet just reported, where the SBC2 will just drop off of communications, and require a physical reset/restart. At first I blamed it on the wifi adapter I was using with it, but after running an ethernet line out to it, it still happens. It might go a week without issue, or it might drop off a couple times a day. I can't ping it from a terminal session or log into it's web interface. cron jobs on it don't seem to fire either. When I check it, the lights on the ethernet port are lit/blinking as though it's communicating normally. It does not seem to be related to environmental conditions either. So, scratching my head on that one still.

Apart from that, I have various temperature/humidity/light sensors hooked up, and am using dual relay boards to control water valves purchased off the shelf from Lowes for watering the garden and cooling the greenhouse. (berkinet was very helpful in figuring out the water valve setup, which required a 24VDC power source to trigger the valve).

I also have several of the veggetronix soil temp and moisture probes hooked up in the garden outside the greenhouse, to help me know when to turn on the soaker hoses to water. I have a thermocouple positioned above a ventless heater, which allows me to know when the heater is running, and I just started working out measuring that, so that I can track how many minutes per day it runs, and how much the outside temperature and wind factor into how much it runs.

All-in-all, very happy with what the phidgets bring to the HA table, but need to figure out the stability issue with the SBC2.

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

Phidgets plugin v0.6.1 now available

Version beta 0.6.1 of the Phidgets plugin is now available. This release fixes several minor bugs, adds support for the 1054 Frequency Counter and has much improved communications error management.

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

Posted on
Sun Oct 13, 2013 9:29 pm
4billl offline
Posts: 50
Joined: Jan 30, 2013
Location: Dripping Springs TX

Re: Phidgets Plugin Discussion

Is there any way to control the Phidgets LCD - i.e. change brightness?
I am using the Phidgets TextLCD Adapter with a 4x40 display.
I can manually change brightness & contrast via System Preferences, but would like to dim the display via Indigo programming.

Posted on
Mon Oct 14, 2013 3:05 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

4billl wrote:
Is there any way to control the Phidgets LCD - i.e. change brightness?
I am using the Phidgets TextLCD Adapter with a 4x40 display.
I can manually change brightness & contrast via System Preferences, but would like to dim the display via Indigo programming.

The plugin contains support for the Phidgets text displays. However, the code has only been tested on a 1203 8/8/8 w/2x20 display, because that is all I have. The plugin should support any display, but there could easily be bugs, especially since displays like yours have the separate 1204 driver board. I will contact you directly so we can work out the problems.

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

Phidgets plugin v0.6.2 now available

Version beta 0.6.2 of the Phidgets plugin is now available. This release fixes several bug and adds event support support for for Phidget Attach and Detach events.

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

Posted on
Tue Oct 22, 2013 12:12 am
gtreece offline
Posts: 171
Joined: Sep 26, 2011

Re: Phidgets Plugin Discussion

Thanks, Berkinet.

I will add that I'm suspecting the lockup problems I've been experiencing may be power related. I improved the solar power setup some, and it's been running better.

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

Phidgets plugin v0.6.3 now available

Version beta 0.6.3 of the Phidgets plugin is now available. This release fixes several bugs and adds stability improvements.

For more information and a download link, please see the announcement for more information.

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

Re: Phidgets Plugin Discussion

gtreece wrote:
...I'm suspecting the lockup problems I've been experiencing may be power related. I improved the solar power setup some, and it's been running better.

I was having occasional problems with a 1072 SBC2. After replacing an Ethernet-over-Powerline link with cat5 the frequency of problems was reduced, but still continued. I finally added a cron job to reboot nightly and that seems to have fixed things. Note that the latest version of the plugin (0.6.3) should handle the reboot gracefully and automatically re-attach the SBC as soon as it becomes available.

I have not had similar problems with the 1073 SBC3.

Posted on
Wed Oct 23, 2013 10:39 pm
gtreece offline
Posts: 171
Joined: Sep 26, 2011

Re: Phidgets Plugin Discussion

Yeah, I don't think it's power now either, although it has definitely been better lately. At one point I had a cron job set up, but I found that if it went into that funk, the cron job did not fire either. I might order in an SBC3. Since the SBC is increasing it's responsibility to control the environment in my greenhouse, I need it to be as stable as possible.

A few questions/observations:
1) Does your plugin have a provision for the 4 temperature sensor not having a thermocouple hooked up to one or more inputs? I had 3 thermocouples hooked up, and repeatedly got an error about the 4th not being within defined range. I don't think it stopped anything, but maybe a feature in the tempsensor setup would be to catch that rather than show an error.

2) Often, if I restart the SBC, even after a reload of the plugin, it didn't seem to be picking up data from the SBC. If I went to the SBC web interface, and stopped/started the webservice, then the plugin immediately started picking up data again. Seems like reloading the plugin should have done it. I just loaded 0.6.3 tonight, so I'll try to watch and see if the behavior is different now, if you think it will handle SBC reboots better.

3) The Indigopluginhost process that shows as the Phidget21 process, is always the business indigopluginhost process on my machine. Tonight, I just happened to notice that it also had racked up a bit of memory. I handn't ever noticed it before, but after updating to 0.6.1, my machine would get to a point after a few days where I couldn't connect the Indigo 6 client to the Indigo Server. The Server was still running and doing it's thing. Maybe just a coincidence, but I mention it in case there's a memory or CPU issue in there somewhere.

Posted on
Thu Oct 24, 2013 3:22 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

gtreece wrote:
Yeah, I don't think it's power now either... ...I might order in an SBC3.

Maybe you can talk them into an exchange :?:

then gtreece wrote:
Does your plugin have a provision for the 4 temperature sensor not having a thermocouple hooked up to one or more inputs?... ...a feature in the tempsensor setup would be to catch that rather than show an error.

Funny you mention that. I was considering such an option. My 1048 only has inputs on 0 & 1. Yet it always shows errors on 3, never on 2. I'll see about getting this into the next release.

and then gtreece wrote:
Often, if I restart the SBC, even after a reload of the plugin, it didn't seem to be picking up data from the SBC... ...I just loaded 0.6.3 tonight, so I'll try to watch and see if the behavior is different now, if you think it will handle SBC reboots better.

v0.6.3 should definitely handle reboots better. (I have attached my log entry from this morning's reboot below- note the thermocouple error).

and finally gtreece wrote:
The Indigopluginhost process that shows as the Phidget21 process, is always the business indigopluginhost process on my machine. Tonight, I just happened to notice that it also had racked up a bit of memory. I handn't ever noticed it before, but after updating to 0.6.1, my machine would get to a point after a few days where I couldn't connect the Indigo 6 client to the Indigo Server. The Server was still running and doing it's thing. Maybe just a coincidence, but I mention it in case there's a memory or CPU issue in there somewhere.

Thanks for the note. The plugin can consume a number of threads if you have a lot of real (I.e. not analog and digital I/O) devices. I have 7 directly connected Phidgets and a total of 31 Phidget devices, two of which generate constant updates, and I am not seeing the problem you describe. Let me know if you continue to experience the problem.


Phidgets log extract from SBC reboot. Note that the 8/8/8 attached sensors ind I/O are called out separately from the InterfaceKit they are attached to.

    Oct 24, 2013, 01:01:02
    Phidgets Plugin ifKit Error InterfaceKit "Piscine InterfaceKit" has been detached
    Phidgets Plugin ifKit Error InferfaceKit "Piscine InterfaceKit" has been detached and connected device "Outdoor Light Level" is no longer available
    Phidgets Plugin ifKit Error InferfaceKit "Piscine InterfaceKit" has been detached and connected device "Pool area Humidity" is no longer available
    Phidgets Plugin ifKit Error InferfaceKit "Piscine InterfaceKit" has been detached and connected device "Pool Lights (Monitor)" is no longer available
    Phidgets Plugin ifKit Error InferfaceKit "Piscine InterfaceKit" has been detached and connected device "Pool Pump Current Monitor" is no longer available
    Phidgets Plugin ifKit Error InferfaceKit "Piscine InterfaceKit" has been detached and connected device "Pool Pump Power Monitor" is no longer available
    Phidgets Plugin TempSensor ErrorTempSensor 4-Input Temp Sensor has been detached

    Oct 24, 2013, 01:01:34
    Phidgets Plugin TempSensor TempSensor 4-Input Temp Sensor is now attached
    Phidgets Plugin Error TempSensor 283587: Phidget Error 36871: Thermocouple 3 reported a potential of 83.4528mV which is above the maximum of 77.4104mV.
    Phidgets Plugin ifKit InferfaceKit "Piscine InterfaceKit" is now attached
    Phidgets Plugin ifKit InferfaceKit "Piscine InterfaceKit" is attached and connected device "Outdoor Light Level" is now available
    Phidgets Plugin ifKit InferfaceKit "Piscine InterfaceKit" is attached and connected device "Pool area Humidity" is now available
    Phidgets Plugin ifKit InferfaceKit "Piscine InterfaceKit" is attached and connected device "Pool Lights (Monitor)" is now available
    Phidgets Plugin ifKit InferfaceKit "Piscine InterfaceKit" is attached and connected device "Pool Pump Current Monitor" is now available
    Phidgets Plugin ifKit InferfaceKit "Piscine InterfaceKit" is attached and connected device "Pool Pump Power Monitor" is now available

Posted on
Thu Oct 24, 2013 11:13 am
gtreece offline
Posts: 171
Joined: Sep 26, 2011

Re: Phidgets Plugin Discussion

The thermocouple error I get is exactly as yours, and always on #3, just as yours is.

As for the CPU behavior I noted, early indications are that it's tied directly to the sensitivity setting I use on analog inputs. I have a couple analog devices hooked up, and an 1125 combined temp and humidity. With the default sensitivity of 10, the granularity on the 1125 temperature is not good enough, so I've been setting it lower. Sensitivity set to 1, creates a non-stop stream of log messages based on triggers I have set up on sensor value changes, and that directly correlates to to the CPU use the plugin process uses.

Granted, I'm running it on an 8 core machine, and it's not enough to bog the machine down, but it was enough for me to notice it in the CPU graph.

I have also noticed that if I change a sensor device setup (like changing the decimal precision, for instance), I get errors in the log. it seems to make the change, because after a reload of the plugin, the change is reflected. I'll attach a picture from my log.

phidgetserror.png
phidgetserror.png (162.77 KiB) Viewed 5317 times


Another sensor I'm working on is not giving me expected results. I have an analog temperature sensor that documentation shows returns a value from 0-3 volts. I have it set up as a generic 0-5 volt sensor type. Using the vendor supplied formula for converting the voltage to temperature, I'm getting a temperature that is too low. So my question really is, if I'm using a sensor that only returns up to 3V, do I need to set that up as custom, or should it read accurately when set up as a 0-5V sensor?

I have several of the sensors, and have tried two of them. The results I get are identical between the two. So it seems that either the documentation for the sensor is not right, or I'm not setting it up right in the phidgets plugin.

Posted on
Thu Oct 24, 2013 12:16 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

gtreece wrote:
...As for the CPU behavior I noted, early indications are that it's tied directly to the sensitivity setting I use on analog inputs. I have a couple analog devices hooked up, and an 1125 combined temp and humidity. With the default sensitivity of 10, the granularity on the 1125 temperature is not good enough, so I've been setting it lower. Sensitivity set to 1, creates a non-stop stream of log messages based on triggers I have set up on sensor value changes, and that directly correlates to to the CPU use the plugin process uses.

Granted, I'm running it on an 8 core machine, and it's not enough to bog the machine down, but it was enough for me to notice it in the CPU graph.

Each point of sensitivity (0-1000) translates to approximately 0.2ºC. I do not know if the local ambient temp actually changes that quickly, or if the sensor itself is slightly unstable. If 0.4ºC is too granular for your needs, well then, you know what you are doing :wink:

gtreece wrote:
I have also noticed that if I change a sensor device setup (like changing the decimal precision, for instance), I get errors in the log. it seems to make the change, because after a reload of the plugin, the change is reflected.

You are running in debug mode, right? I found a problem with the debug statements. It is fixed now and will be in the next release. But, you are right, the actual change was properly recorded.

gtreece wrote:
Another sensor I'm working on is not giving me expected results. I have an analog temperature sensor that documentation shows returns a value from 0-3 volts. I have it set up as a generic 0-5 volt sensor type. Using the vendor supplied formula for converting the voltage to temperature, I'm getting a temperature that is too low. So my question really is, if I'm using a sensor that only returns up to 3V, do I need to set that up as custom, or should it read accurately when set up as a 0-5V sensor?

Since the max voltage your sensor will output is 3 volts. The InterfaceKit will theoretically max out at 3/5 of its scale, or 600 - though you may wish to check in the Phidgets preference pane to see what the actual high value is. So, you need to define the sensor as a 999c and enter a formula to scale the 0 and 600 value against your sensor's temperature range. For some examples, see the bottom of this post in the Phidgets Announcement thread. Note that in the examples, the plugin will substitute the actual sensor value (0-1000) for x. If you can post some details, or a link, to the sensor in question, I can provide a formula to try.

Posted on
Thu Oct 24, 2013 12:44 pm
gtreece offline
Posts: 171
Joined: Sep 26, 2011

Re: Phidgets Plugin Discussion

I'm still tweaking my setup. Sensitivity of 10 is not granular enough at the moment, but I think 5 will be.

The sensor I'm working with at the moment that I'm not getting expected results from yet is this one:
http://www.vegetronix.com/Products/THERM200/

Posted on
Thu Oct 24, 2013 2:09 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

gtreece wrote:
...The sensor I'm working with at the moment that I'm not getting expected results from yet is this one:
http://www.vegetronix.com/Products/THERM200/

Ok, so from that page, we get 0V = -40ºC and 3V = 85ºC. When we consider the InterfaceKit output values, we know that 0V = 0 and 3V = 600. If we take the low to high temp range (125º) and divide that by 600, we find that each 1 point change in InterfaceKit output value is equal to 0.20833333ºC. We also know that the scale starts at -40º. So, the formula is:

    (x*0.20833333)-40

If you want Fahrenheit, then...
    (((9.0/5.0)*((x*0.20833333)-40)))+32.0

Of course, we do not know if the highest reading on the sensor really is 85º and we also do not know if the actual max voltage output is exactly 3.0V. Maybe it is 3.01, etc.

I'd suggest starting with the formula as noted. Then test against an accurate thermometer and adjust the formula as necessary. Please post your results. I am sure there are others who have similar projects.

Here is a screenshot showing how the formula is entered in the configuration dialog.
ss.png
ss.png (58.64 KiB) Viewed 5297 times

Page 14 of 39 1 ... 11, 12, 13, 14, 15, 16, 17 ... 39

Who is online

Users browsing this forum: No registered users and 1 guest