Atlas EZO pH via USB

Hi all!
I'm a newbie about Node Red and Raspberry and I was working for an automated aquarium since at last 2 years. I'm an italian guy, so sorry for my bad english...

I was creating my own node red flow for controlling and monitoring my sweet water aquarium, specially for temperature and ph value. Relays was controlling by the sensors, for heater activation, CO2, waste water pump, lights and RO plant.

Since I was buying Atlas EZO pH sensor and its USB isolated carrier board, the only way that I've found for retrieve pH value was using a Pythonshell node calling ftdi.py file, supplied by Atlas Scientific, modified by me for retrieving only the pH values automatically by reading the right address of the ftdi EZO driver, with polling of 5 seconds.
My opinion is that kind of approach cause some kind of issues, since that after 2/3 days, the Raspberry become very slow, and the only way to resolve is a reboot.

So the question.
Is there a solution to place a kind of node like an I2C one with the right address for retrieve the pH value of a EZO pH mounted on USB isolated carrier board?

Thank you

Ed

If you know JavaScript or are you willing to give it a go, you could try installing ftdi node bindings an see if you can read values without involving Python?

Here is one such library

If you can make that work, them you could include a reference to the lib in settings.js and access it in a function node or, better still, make a node-red contrib node for everyone to use.

Thank you Steve-Mcl for replying me.
Since I'm not an expert about JavaScript and in general about programming, I found some difficulties.
By now I've installed, libftdi-dev, python-pip and pylibftdi, all about python stuff I think.

The Atlas pH probe responding to:
SUBSYSTEMS==”usb”, ATTRS{idVendor}==”0403”, ATTRS{idProduct}==”6015”,
GROUP=”dialout”, MODE=”0660”, SYMLINK+=”FTDISerial_Converter_$attr{serial}”

And putting the python command:
python -m pylibftdi.examples.list_devices

It respond to:
FTDI:FT230X Basic UART:DO01J25K

All kind of python stuff.

So installing your suggested library the first thing to do is to install the ftdi driver.
Is this correct?
Then I've to install ftdi by "npm install ftdi" command?
Do I have to create the node_modules folder for that purpose?

Thank you

now is a great time to learn :slight_smile:

Start simple.

  1. create a new folder e.g. ~/ftdi-test
  2. open a command window and change directory cd ~/ftdi-test
  3. init the directory npm init
  4. install the lib npm install ftdi
  5. use the sample code on their site, start testing...
    1. node(to start an interactive node session)
    2. start typing / trying code like in their examples
      or
    3. make a js file e.g. index.js
    4. write some code into the file
    5. run it node index.js

once you have success talking to the device, look into how you can install that in the .node-red folder and talk to the device from a function node.

Ok bro,
since I do the "npm install ftdi" command I get an error:

In file included from ../src/ftdi_device.cc:11:
../src/ftdi_device.h:7:10: fatal error: ftd2xx.h: No such file or directory
#include <ftd2xx.h>

So perhaps I must install the ftdi driver first of all.
But which, VCP, D2xx, D3xx?

Seems that gonna be much more complicated than I aspect :frowning:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.