View unanswered posts | View active topics It is currently Sat May 18, 2013 10:05 pm



Reply to topic  [ 60 posts ]  Go to page: 1, 2, 3, 4  Next
 DigiTemp - 1 Wire Temperature Plugin 
Author Message
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post DigiTemp - 1 Wire Temperature Plugin
What is the DigiTemp Plugin
This plugin interfaces Indigo 5 to 1-wire temperature sensors. Currently only DS9097U and compatible adapters are supported. This plugin is essentially a wrapper around DigiTemp, a program written by Brian Lane, which does most of the dirty work.

What It Needs
- A DS9097U 1-wire adapter. Can be bought from Digi-Key here.
- A USB to Serial adapter for the DS9097U above.
- DS18B20 1-wire temperature sensors. Digi-Key link here. (Other sensors are supported, see DigiTemp's web page for details.)

Download the Plugin
DigiTemp_Plugin.zip - Version 1.0.1
See Change History below for details on what's been changed in each version.

Installation
1. Download the plugin from the link above, unzip it if your browser didn't do that for you already.
2. Double-click on the DigiTemp.indigoPlugin file, Indigo should launch and ask if you'd like it to install the plugin.
3. The plugin's config screen should pop up. Select the serial port your DS9097U is using.

Adding Sensors
It's easiest if you add sensors to your 1-wire network one at a time. If you add them all and then hit the Scan For Sensors button in the plugin's config, you'll get a big list of sensor ID's but won't know which is which as the DS18B20's don't have their serial numbers written on them. The easiest way to add them is to use the steps below.

1. Add a sensor to the 1-wire network.
2. Open the plugin's config.
3. Press the Scan For Sensors button. The sensor's ID should show up in the list after the scan.
4. Close the plugin's config.
5. Click on the New... button to add a new device to Indigo. Type: Plugin, Plugin: DigiTemp, Model: Temperature Sensor.
6. A dialog box will popup with the current list of sensor ID's. Select the new ID from the list.
7. Repeat steps 1 thru 6 for each sensor.

I'll write a more thorough HowTo with screenshots and pics of my 1-wire setup when I have some more time. This should be enough to get some users started.

Change History
Version 1.0.1 (Nov 28, 2012):
- Added the 32 bit version of digitemp back into the binary

Version 1.0.0 (Nov 15, 2012):
- Fix for compatibility with Indigo 6 beta.
- This version should now work on older PPC macs
- Fixed a bug where the plugin might crash after running a sensor scan for the first time.


Last edited by travisc on Wed Nov 28, 2012 3:47 pm, edited 3 times in total.



Fri Feb 10, 2012 9:15 am
Profile WWW
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6642
Location: Austin, Texas
Post Re: DigiTemp - 1 Wire Temperature Plugin
NICE! This along with your writeup should help many people who've been asking for temperature sensing options. Heck, I may have to invest as well since I liberally spread Cat5 throughout my house when I built it.

_________________
Jay (Indigo Support)
Image


Fri Feb 10, 2012 10:13 am
Profile WWW
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11679
Location: Texas
Post Re: DigiTemp - 1 Wire Temperature Plugin
Awesome plugin -- thanks a bunch for sharing it, Travis.

_________________
Image


Fri Feb 10, 2012 10:45 am
Profile WWW
User avatar

Joined: Aug 18, 2008
Posts: 104
Location: Alabama
Post Re: DigiTemp - 1 Wire Temperature Plugin
I get the following error (Indigo 5.0.4 on Snow Leopard using DS9097U and known-good serial/USB adapter):

Code: Select all
DigiTemp Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 68, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/DigiTemp.indigoPlugin/Contents/Server Plugin/DigiTemp.py", line 382, in startComm
<type 'exceptions.UnboundLocalError'>: local variable 'nextScanTime' referenced before assignment

  DigiTemp Error                  plugin runConcurrentThread function returned or failed; will attempt again in 10 seconds


Using a separate build of digilink, I am able to read the sensors attached to the DS9097U from the command line.

BTW, I restarted the Mini that it's running on and still get the same error...

Terry


Fri Feb 10, 2012 8:47 pm
Profile
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post Re: DigiTemp - 1 Wire Temperature Plugin
Hi Roussell,

When do you see that error? When the plugin starts, when you close the config dialog, when you hit the scan button?

EDIT: Actually, can you enable debugging in the plugin config, then restart the plugin. Send me everything in the log from the plugin start to where it chokes.


Fri Feb 10, 2012 9:05 pm
Profile WWW

Joined: May 27, 2007
Posts: 689
Location: NC
Post Re: DigiTemp - 1 Wire Temperature Plugin
ooooh Does it only support the temp sensors? I have a couple switches from hobby boards that I'd love to use.


Sat Feb 11, 2012 7:22 am
Profile
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post Re: DigiTemp - 1 Wire Temperature Plugin
ooooh Does it only support the temp sensors? I have a couple switches from hobby boards that I'd love to use.

Yes. It can only support the 1-wire devices that DigiTemp supports.


Sat Feb 11, 2012 8:56 am
Profile WWW
User avatar

Joined: Aug 18, 2008
Posts: 104
Location: Alabama
Post Re: DigiTemp - 1 Wire Temperature Plugin
travisc wrote:Hi Roussell,

When do you see that error? When the plugin starts, when you close the config dialog, when you hit the scan button?

EDIT: Actually, can you enable debugging in the plugin config, then restart the plugin. Send me everything in the log from the plugin start to where it chokes.


Sorry for missing your post. It happens on restart, or upon enabling the plugin if I remember correctly. I'll enable debugging and send the log tonight.

Terry


Tue Feb 14, 2012 2:10 pm
Profile
User avatar

Joined: Apr 26, 2011
Posts: 50
Location: United States
Post Re: DigiTemp - 1 Wire Temperature Plugin
travisc wrote:Currently only DS9097U and compatible adapters are supported.



What other compatible adapters are supported? I've got a LinkUSB that I would like to get working with your plugin. I read on this guys website (link below) that he got a LinkUSBi to work with digiTemp and the only difference between a LinkUSBi & a LinkUSB is a DS2401 ID chip is embedded in the LinkUSBi.

http://www.finnie.org/2010/03/07/extern ... ith-linux/

He also says on his site: "You'll want the digitemp package, which is pre-packaged in Debian and probably most other Linux distributions. Once it's installed, you'll need to know what program to use. Several are available for different DS masters, but in the LinkUSBi's case, you'll want digitemp_DS9097U."

So it seems like your plugin should work easily with a linkUSB am I right? Not sure if I'm wiring it up incorrectly, but the plugin doesn't seem to see my thermometers.


Fri Feb 17, 2012 9:37 am
Profile
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post Re: DigiTemp - 1 Wire Temperature Plugin
From that page it seems like the LinkUSB has an internal FTDI serial-usb chip, that's a good start. Does it show up in the serial port list in the DigiTemp plugin? You would need to have the FTDI serial drivers installed for it to show up, which you may already have if you are using an Insteon PLC.

The DigiTemp plugin is indeed using the DS9097U version of DigiTemp, so that shouldn't be the problem.

Turn on debugging and restart the plugin to see the detailed log. See if that sheds any light. Paste the log here if you still need help.

Travis


Fri Feb 17, 2012 9:56 am
Profile WWW

Joined: Feb 11, 2007
Posts: 66
Location: Ramsey, NJ
Post Re: DigiTemp - 1 Wire Temperature Plugin
Travis
Just installed your plugin and connected it to a Link USB from ibutton link and there temperature sensor.
The plugin found the Link USB and is reading the temperature from the first temperature sensor I connected.
Got it to write the temperature to a variable.
Hopefully I will add more sensors over the weekend and let you know how its working.

Thank for you time and effort in developing this plugin

Elwood


Fri Feb 17, 2012 5:33 pm
Profile
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post Re: DigiTemp - 1 Wire Temperature Plugin
@Elwood

Thanks for the update! Nice to hear it works with the LinkUSB.


Fri Feb 17, 2012 5:52 pm
Profile WWW
User avatar

Joined: Apr 26, 2011
Posts: 50
Location: United States
Post Re: DigiTemp - 1 Wire Temperature Plugin
travisc wrote:From that page it seems like the LinkUSB has an internal FTDI serial-usb chip, that's a good start. Does it show up in the serial port list in the DigiTemp plugin? You would need to have the FTDI serial drivers installed for it to show up, which you may already have if you are using an Insteon PLC.

The DigiTemp plugin is indeed using the DS9097U version of DigiTemp, so that shouldn't be the problem.

Turn on debugging and restart the plugin to see the detailed log. See if that sheds any light. Paste the log here if you still need help.

Travis



Sorry for the delayed reply. It didn't show up in the serial port list and there was actually nothing to select, but that was cause I didn't have the FTDI drivers installed. I installed the latest drivers and then there was two available things to select. I tried both of them, but it doesn't see my thermometer. Could it be my wiring is incorrect? Right now I've got my 1-wire thermometers wired up to an Arduino board and I know they work. I only connected the blue wire (Pin 4 on TIA/EIA 568B cable wiring scheme) from my LinkUSB to the 1-wire thermometer and it doesn't see it. Does your plugin require the other wires to be connected too?


Attachment:
File comment: LinkUSB Pin Out
LinkUSBPinOut.png
LinkUSBPinOut.png [ 48.02 KiB | Viewed 2152 times ]



I'm also getting the errors below in the event log. I've tried reload/disabling/re-enabling the plugin with no luck too.


Code: Select all
Traceback (most recent call last):
  File "plugin.py", line 68, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/DigiTemp.indigoPlugin/Contents/Server Plugin/DigiTemp.py", line 382, in startComm
<type 'exceptions.UnboundLocalError'>: local variable 'nextScanTime' referenced before assignment

  DigiTemp Error                  plugin runConcurrentThread function returned or failed; will attempt again in 10 seconds
  DigiTemp Error                  Error in plugin execution runConcurrentThread:


Tue Feb 21, 2012 6:21 am
Profile
User avatar

Joined: Sep 07, 2010
Posts: 228
Location: Toronto, Canada
Post Re: DigiTemp - 1 Wire Temperature Plugin
They call it a 1-wire interface but it actually needs two, Ground and 1-Wire data, for it to work. The 1-wire refers to how many signal wires are required for communication, the common ground requirement is assumed. It's a little mis-leading if you're not an electronics guru.

I'll need more log info than that, that just looks like the last error in the log which doesn't help me. Turn on debugging, reload the plugin, then send me everything from when the plugin starts to when it errors.


Tue Feb 21, 2012 8:34 am
Profile WWW

Joined: Feb 11, 2007
Posts: 66
Location: Ramsey, NJ
Post Re: DigiTemp - 1 Wire Temperature Plugin
MrJeffreyGee

My setup has been working fine. I have the LinkUSB connected to 2 iButtonLink T-Sense Temperature Sensor using the RJ45 jacks.
Plus 5 Dallas ds18s20 in a TO-92 package. However I am using the third wire for 5 volt power. The ds18s20 can work with 2 wires (pin 1&2)
as "Parasite Mode" but I think this requires adding a capasitor at the LinkUSB between pin 2 and 4.
Since I am running the sensors on cat5 cable I have the extra wires to pas the 5 volt power to the sensor.

Hook up pins from the LinkUSB to the ds18s20 as the following:

LinkUSB pin 1 and 5 to ds18s20 pin 1 (ground)

LinkUSB pin 2 to ds18s20 pin 3 (+5v power)

LinkUSB pin 4 to ds18s20 pin 2 (1-wire data)


Hope this helps

Elwood


Tue Feb 21, 2012 10:30 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 60 posts ]  Go to page: 1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.