Page 1 of 1

VINT HUB5000_0 and TMP1101_1 detected but not

Posted: Thu Jun 01, 2023 12:31 pm
by thunderbooty
Hello, I am using 2 VINT HUB5000_0 (only one has a temp sensor attached currently) connected via ethernet. Problem is that my python code is not finding them even though the Phidget Control Panel does. I am using the example code too. Im at my wits end, am I missing something ridiculously small or...?

Code: Select all

from Phidget22.Phidget import *
from Phidget22.Devices.Log import *
from Phidget22.LogLevel import *
from Phidget22.Devices.TemperatureSensor import *
import time

#Declare any event handlers here. These will be called every time the associated event occurs.

def onTemperatureChange(self, temperature):
	print("Temperature: " + str(temperature))

def main():
	Log.enable(LogLevel.PHIDGET_LOG_INFO, "phidgetlog.log")
	#Create your Phidget channels
	temperatureSensor4 = TemperatureSensor()

	#Set addressing parameters to specify which channel to open (if any)
	temperatureSensor4.setDeviceSerialNumber(668200)
	temperatureSensor4.setHubPort(0)
	#temperatureSensor4.setIsHubPortDevice(True)
	temperatureSensor4.setChannel(4)

	#Assign any event handlers you need before calling open so that no events are missed.
	temperatureSensor4.setOnTemperatureChangeHandler(onTemperatureChange)

	#Open your Phidgets and wait for attachment
	try:
	    temperatureSensor4.openWaitForAttachment(10000)
	except PhidgetException as e:
		print("Failed to open: " + e.details)
	#Do stuff with your Phidgets here or in your event handlers.

	time.sleep(5)

	#Close your Phidgets once the program is done.
	temperatureSensor4.close()

main()
The error I get is:
"Phidget22.PhidgetException.PhidgetException: PhidgetException 0x03 (Timed Out)"
"Failed to open: No Phidgets were detected at all. Make sure your device is attached."

Re: VINT HUB5000_0 and TMP1101_1 detected but not

Posted: Mon Jun 05, 2023 1:40 pm
by Patrick
Hi,

HUB5000 is a network Phidget, so you'll need to select 'Remote (Network)' in the code sample generator.

-Patrick

Re: VINT HUB5000_0 and TMP1101_1 detected but not

Posted: Wed Jun 07, 2023 9:21 am
by thunderbooty
Oh wow that worked thanks! :oops: I was under the impression that that was for when the wireless was being used.