Phidgets Plugin Discussion

Posted on
Sat Jul 06, 2019 6:30 am
jlenigas offline
Posts: 7
Joined: Sep 28, 2017

Re: Phidgets Plugin Discussion

Hi,

Is anyone using multiple SBC's? I have added a SBC4 with 2x 0/16/16 cards and it works perfectly well. I can successfully add a second SBC4 (with 2 x 0/16/16 cards) and the devices go online. When I try and add a digital input or output on the new devices the configure screen that has the 'Click to Continue' button that should bring up the IO list does nothing with the following error log :

1295241498
Phidgets Plugin Index:phDiIfKitId, devid:123739009
Phidgets Plugin Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 1120, in ifKitSetIOSize
ValueError: invalid literal for int() with base 10: ''

Phidgets Plugin Entering getIfKitIOList
Phidgets Plugin ValuesDict:typeId=phDiIfKit, targetId=1295241498
UiValuesDict : (dict)
address : (string)
buttonFlagDi : true (bool)
configButton2 : (string)
phDiIfKitId : 123739009 (string)
phDiIfKitInput : (string)
phDiIfKitModel : phDiIfKit (string)
phDiIfKitSerial : (string)

Phidgets Plugin Dictionary exists
Phidgets Plugin Error Error in plugin execution GetUiDynamicList:

Traceback (most recent call last):
File "plugin.py", line 958, in getIfKitIOList
NameError: global name 'dev' is not defined

Am I doing something wrong?

Oh and I have cloned the Phidget SD card that works and put it in the new phidget and updated parameters. So firmware and libs are identical to the device that works.

Thanks in advance.

John

Posted on
Sat Jul 06, 2019 6:45 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

jlenigas wrote:
...Is anyone using multiple SBC's? I have added a SBC4 with 2x 0/16/16 cards and it works perfectly well. I can successfully add a second SBC4 (with 2 x 0/16/16 cards) and the devices go online. When I try and add a digital input or output on the new devices the configure screen that has the 'Click to Continue' button that should bring up the IO list does nothing with the following error log :...

Three major points...
  1. The plugin only works with the Phidget21 libraries. It will not work with devices that require the Phidget22 libraries. This was covered in a July 2017 post to the Phidgets plugin announcement forum and has also been covered in this support thread.
  2. An SBC is not, per-se, a Phidget. It its no more than a Single Board Computer running debian linux and the Phidget libraries. In that respect it is the equivalent of any CPU running the Phidgets libraries. What the plugin actually talks to is the Phidget devices that are made available through the Phidget libraries. Since an SBC also includes a built-in interfaceKit, the plugin can talk to any devices connected to the interfaceKit.
  3. Essentially a repeat of #1, the plugin will not work with the new ports on an SBC4 - they do not support the Phidget21 libraries. To use an SBC4 (or any similar single board computer, a Raspberry-Pi for example) you would need to attach a USB Phidget or interfaceKit that is supported by the Phidget21 libraries AND install those libraries on the SBC.

Posted on
Sat Jul 06, 2019 6:47 am
jlenigas offline
Posts: 7
Joined: Sep 28, 2017

Re: Phidgets Plugin Discussion

So as it is with technical things, the moment I post on the forum, I solve my own problem.

If you do use multiple SCBs make sure you make the Pidget21 Webservice Server ID Unique for each device on the network.

John

Posted on
Sat Jul 06, 2019 6:48 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

jlenigas wrote:
So as it is with technical things, the moment I post on the forum, I solve my own problem.

If you do use multiple SCBs make sure you make the Pidget21 Webservice Server ID Unique for each device on the network.

John

That will also work :wink:

Posted on
Sat Jul 06, 2019 5:46 pm
jlenigas offline
Posts: 7
Joined: Sep 28, 2017

Re: Phidgets Plugin Discussion

Hey birkinet,

Now i've added a third SBC I'm back to the same problem!

Again the SBC SD is a clone and the Phidgets21 Webservice name is unique.

Any idea what is going on?

John.

Posted on
Sat Jul 06, 2019 6:06 pm
jlenigas offline
Posts: 7
Joined: Sep 28, 2017

Re: Phidgets Plugin Discussion

Hey birkinet (and anyone else that may know whats up here),

I've just tried plugging the 0/16/16 directly into the usb port as well and have exactly the same issue. I've got to get this upgrade done on this home urgently so any assistance would be greatly appreciated.

John

Posted on
Sun Jul 07, 2019 8:46 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

jlenigas wrote:
Hey birkinet,

Now i've added a third SBC I'm back to the same problem!

Again the SBC SD is a clone and the Phidgets21 Webservice name is unique.

Any idea what is going on?...
As I noted previously, the SBC is not directly involved in the plugin connection to your 0/16/16. All the SBC does is provide the Phidgets Web-Service which, in-turn, connects the 0/16/16 (and any other local Phidgets), to the outside world. You can have as many servers running the Web-Service on your network as you choose. Note also, the name you assign to the Web-Service is not used by the plugin, it is only useful in the Phidgets control panel so you can identify the different SBCs and Phidgets on your network.

Thus, when creating an interfaceKit (or other stand-alone Phidget) device in Indigo you need to provide: the IP Address, port number (5001 by default) of the system running the Web-Service - your SBC4 in this case; a password - if one was configured AND the unique serial number of the Phidget (I.e. your 0/16/16). Each Indigo Phidget standalone device (I.e. not Digital IO and Analog Inputs on an interfaceKit) MUST have a unique serial number which you will find printed somewhere on your phidget or in the Phidgets control panel (Bonjour tab, right hand column).

Posted on
Sun Jul 07, 2019 3:55 pm
jlenigas offline
Posts: 7
Joined: Sep 28, 2017

Re: Phidgets Plugin Discussion

Hi Beriknet,

Many thanks for the reply. Much appreciated.

I think I have done all that you have mentioned there. I will double check today.

I understand the role of the SBC, what I am not clear on is how can I tell what lbs are loaded to the 0/16/16 and ensure that the 21 libs are on that device. Or am i misunderstanding this?

Many thanks again,

John

Posted on
Mon Jul 08, 2019 1:20 am
jlenigas offline
Posts: 7
Joined: Sep 28, 2017

Re: Phidgets Plugin Discussion

Hi Berkinet,

I've found a work around for this.

It seems if I duplicate a working SBC / 0/16/16 device and then update settings for the new device it all works fine. Trying to create a new SBC / 0/16/16 device won't display the IO number list when adding a discreet IO point.

Anyway I hope you read this before you read all the other questions I have.

John

Posted on
Mon Jul 08, 2019 1:55 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

jlenigas wrote:
... if I duplicate a working SBC / 0/16/16 device and then update settings for the new device it all works fine....

I do not have an SBC4 so I cannot give exact i striations. But, from looking at the SBC4 user manual, and my own experience with the SBC3 web interface, I think you need to do the following In the web interface:
  1. Click System in the top (main) menu bar.
  2. Click Packages in the sub-menu bar.
  3. (This is the part I am not sure of for the SBC4) select enable or install Phidget21 libraries.
  4. Click Refresh Available Packages. (It will take a few minutes to refresh the packages.)
  5. Click on Upgrade All Packages.
  6. Click Phidgets in the top (main) menu bar.
  7. Click phidget21 Webservice in the sub-menu bar.
  8. Enable the webservice
  9. Click Save.
  10. Start the webservice

To answer your earlier question... No libraries are loaded to the 0/16/16 interfaceKit. The board firmware communicates to the Phidgets software (21 or 22 on the host CPU.

BTW, if you are not doing so, you should be using the Phidgets Control Panel in System Preferences (not the newer Phidget Control Panel app)to verify which Phidgets are on your network. If a board is not appearing properly in there control panel, it will not work in the plugin.

Posted on
Wed Aug 28, 2019 12:31 pm
landry offline
Posts: 59
Joined: Jul 30, 2017

Re: Phidgets Plugin Discussion

Hi Berkinet

For you info and heads up:
Regarding the discussion of the Current DC p/n 1122
N page 31-32. I was using my own formula since your value was wrong.
After reinvestigating it recently during my Indigo upgrade 7.3 I noticed when I get the state dictionary with a python script :


dev = indigo.devices[834271710]
indigo.server.log("states dict is: " + str(dev.states))

the current sensor showed to states with diferent values for the current

Script states dict is: States : (dict)
acAmps : 21.15 (real)
dcAmps : 0.23 (real)
lastUpdate : 2019-08-28 12:24:15 (string)
state : 21.15 (real)

I now realized your plug in was using “state: value which equaled the Acamps. Simply calling up the “dcdamps” state no formula was necessary in my python script that fill a variable the amperage value:

dev = indigo.devices[834271710]
indigo.server.log("states dict is: " + str(dev.states))
analoginput = float(dev.states["dcAmps"])
myvar=analoginput
myvar=(round(myvar, 3))
indigo.variable.updateValue(801431812, value=unicode(myvar))


I noticed a similar problem with frequency sensor. Your plug in shows the “frequency.ul: value which is a string which was difficult to do math with in a formula ( string segments hade to be used) By simply getting the “frequency: value I was able to write a python script for calculating wind speed.

Script states dict is: States : (dict)
count : 0 (integer)
frequency : 0.00 (real)
frequency.ui : 0.0 Hz (string)
lastUpdate : 2019-08-28 13:52:42 (string)
onOffState : online (string)


state : 1 (integer)
time : 992 (real)
time.ui : 992.0 ms (string)

All in all yo ur plug ins the best plug in is the best!!

Posted on
Mon Sep 23, 2019 3:36 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Phidgets Plugin Discussion

landry wrote:
...For you info and heads up...

I just realized I never responded to your post. So, thank you very much for the information and hopefully this will be of use to other users as well.

Posted on
Mon Sep 23, 2019 3:41 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Phidgets22 support

Update on Phidgets22 support.

I am currently working with my son on a Phidgets22 plugin. This will be a separate plugin and will only work with the Phidgets22 network server. At this stage we have the basic protocol implemented and are now working on how to best expose the Phidgets devices as Indigo devices. It seems likely we will be able to completely hide interfaceKits and VINT hubs so you will only have to configure a Phidget device or a port (DI, DO or AI). This process will be easier than in the current plugin since the new plugin will support device/port discovery.

Stay tuned.

Posted on
Mon Sep 23, 2019 6:48 am
loafbread offline
Posts: 137
Joined: May 25, 2009

Re: Phidgets Plugin Discussion

Thank you Berkinet and son. Thank you.

Posted on
Mon Sep 23, 2019 10:49 am
landry offline
Posts: 59
Joined: Jul 30, 2017

Re: Phidgets Plugin Discussion

Welcome Berkinet Son!!! And you too Berkinet.

I have been waiting for VNT hub support ...I assume there is no way to do this until this update is released?

Thanks for all your work on the incredible plug in!!!

Page 33 of 39 1 ... 30, 31, 32, 33, 34, 35, 36 ... 39

Who is online

Users browsing this forum: No registered users and 8 guests