Phidget22 Node-RED Module Released

Supporting Browser-based Javascript and Node.js
lingvo
Phidgetly
Posts: 15
Joined: Fri Jul 16, 2021 8:43 am
Contact:

Re: Phidget22 Node-RED Module Released

Post by lingvo »

mparadis wrote:The Phidgets node-red package is fully implemented, so it does support the HUB5000 and ADP1000.
Thanks. One more point - https://www.npmjs.com/package/node-red- ... -phidget22 suggests that one needs to start an instance of the Phidget Network Server on the same or other platform to start using Node-Red package.

But it is not clear if it is required for HUB5000. Does it have build in Phidget Network Server? I could not find this in description.
User avatar
Patrick
Lead Developer
Posts: 3403
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Phidget22 Node-RED Module Released

Post by Patrick »

HUB5000 runs the network server on-board, so you don't need to run it yourself.

-Patrick
lingvo
Phidgetly
Posts: 15
Joined: Fri Jul 16, 2021 8:43 am
Contact:

Re: Phidget22 Node-RED Module Released

Post by lingvo »

Patrick wrote:HUB5000 runs the network server on-board, so you don't need to run it yourself.

-Patrick
Perhaps worth mentioning as advantage in HUB5000 description?
lingvo
Phidgetly
Posts: 15
Joined: Fri Jul 16, 2021 8:43 am
Contact:

Re: Phidget22 Node-RED Module Released

Post by lingvo »

Hi

I need some help with setting up ADP1000 in Node-Red in ORP measurement mode. I have a setup where ADP1000 is connected to HUB5000 on Port 1. I have a REDOX/ORP Sensor connected to ADP1000.

I have following flow:
flow.png
The parameters of VoltageInput Node are:
Voltage_params.png
The parameters of Inject Node are:
Inject.png
Inject.png (8.51 KiB) Viewed 13197 times
The problem is that when ORP sensor is in buffer solution, it reports 310mV, which is measurable. But as soon as I put it into distilled water, the voltage starts to increase and if it becomes more than 400mV the node reports: {"code":4105,"description":"Saturation Detected."}

If I try to change the voltage range using inject node, the VoltageInput node reports: "setVoltageRange success", but it still outputs saturation message.

What is wrong here? Phidget Control Panel also shows strange logs and no voltage measurement:
pidget.png
The flow is below:

Code: Select all

[{"id":"6f15d8df99d79a71","type":"debug","z":"c7f33efba55bf539","name":"ORP","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":900,"wires":[]},{"id":"1cc327685fa583ef","type":"phidget22-voltageinput","z":"c7f33efba55bf539","channel":0,"deviceSerialNumber":-1,"isHubPortDevice":false,"hubPort":"1","debug":true,"dataInterval":"5000","voltageChangeTrigger":0,"sensorType":"0","powerSupply":1,"voltageRange":"7","x":460,"y":900,"wires":[["6f15d8df99d79a71"]]},{"id":"76124db4e060d476","type":"inject","z":"c7f33efba55bf539","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"setVoltageRange","payload":"{\"voltageRange\":7}","payloadType":"json","x":210,"y":900,"wires":[["1cc327685fa583ef"]]}]
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Phidget22 Node-RED Module Released

Post by mparadis »

What kind of ORP probe are you using? Do you have a datasheet for it? If it's happening in the control panel as well then it's probably not a Node-RED problem.
lingvo
Phidgetly
Posts: 15
Joined: Fri Jul 16, 2021 8:43 am
Contact:

Re: Phidget22 Node-RED Module Released

Post by lingvo »

I'm using this Platinum ORP Electrode: https://www.gemke-shop.de/dosiertechnik ... sonde?c=50

It is a standard 12mm Probe with BNC connector and +-2000mv measuring range.
As I said it is quite clearly visible that if ADP1000 input voltage goes above 400mV it starts to report saturation, but I can't switch it to 2V Range.

I also tried to change Voltage Sange setting in Phidgets control panel to 2V, but that doesn't seem to work - I still get Saturation detected error in the log. Sometimes I'm able to see the voltage above 400mv in Phidgets control panel - but this is a kind of random process.

I can connect a variable DC voltage source of +-2V amplitude to ADP1000 for example, if that helps to debug the issue. Is it safe for the module?
lingvo
Phidgetly
Posts: 15
Joined: Fri Jul 16, 2021 8:43 am
Contact:

Re: Phidget22 Node-RED Module Released

Post by lingvo »

Hello.
One more problem - is it possible to use IP address instead of server name in Connect node? Server name is not always working :(
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Phidget22 Node-RED Module Released

Post by mparadis »

You can just type the IP address in the server name box and it'll accept it. If it's not working (or only working some of the time) it's probably a separate issue. I seem to recall occasionally having some trouble connecting when I wrote this module, especially when reloading and restarting the flow. I was never able to get it to happen consistently and it always went away so I never tracked down that particular issue.

As for the ADP1000, you can test it with a +/-2V source to try and debug the issue. One thing worth noting is that it'll send the saturation error as soon as it rises above 2V, so if your probe is specified at 2V +/- some margin of error, then you may still get saturation errors.
lingvo
Phidgetly
Posts: 15
Joined: Fri Jul 16, 2021 8:43 am
Contact:

Re: Phidget22 Node-RED Module Released

Post by lingvo »

The problem with ADP1000 2V range selection has gone somehow by itself. I couldn't track when it started to work.

But typing IP address in Server name was a first thing I tried to do and it didn't work. Thus is the question. I will give it another try.

But anyway Node-Red module looks a bit buggy. It continuously throws some errors from time to time.

I would be interested if Phidgets could support some simple network access interface, like REST API or MQTT - then I could do client side by myself.
For example is it possible to get latest measurement by GET/POST request to some URL?
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Phidget22 Node-RED Module Released

Post by mparadis »

Here's how I connect via IP address:

Image

If you are getting error messages in Node-Red feel free to report them to me here or at mparadis @ phidgets . com - it's not an officially supported plugin but I've been trying to keep it up to date and welcome feedback.

As for the HTTP requests, it's not something we have built-in but I'm sure you could write a small program or script that runs and gathers data from the Phidgets and posts it online in a format that it can be grabbed using a GET request.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests