# Questions about Raspberry pi ezo sensor flow.(atlas scientific sensor)

**URL:** https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091
**Category:** General
**Created:** [22 May 2020 15:36 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091 "2020-05-22T15:36:46Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [22 May 2020 15:36 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/1 "2020-05-22T15:36:46Z")

</div>

I have even succeeded in loading the current python code from nod red to deebug.  
I can do this by entering a command in the Raspberry Pi cmd command window.  
However, I am not sure what to do next in node red.  
As you can see, I have to give a command, but I don't know what function to add after the exec function.

 ![2020-05-23-003544_1824x984_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/210efd163f57e211fbf931642aaca2f57ef1ae95.png) [flows (2).json](https://discourse.nodered.org/uploads/short-url/CJ7ZMeLVMnfLmMYxTxsm10Lyol.json) (759 Bytes)

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [22 May 2020 15:49 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/2 "2020-05-22T15:49:38Z")

</div>

Juno, Welcome to the forum!

What is the sensor you are using? can you provide a link to it?

So you have an `exec` node running a pyton progran and it has returned a reply. It looks like it returned the `help` message for the program. You will have to know what the program expects in order to get something back.

Depending on the sensor, you might be able to use an existing node,. Have you searched the flow tab to see if there is anything you can use?  
 ![Screen Shot 2020-05-22 at 11.48.50 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e8db27d07ba34995541683e466dc6a7a059dca5.png)  
You might check some of the I2C nodes.

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [22 May 2020 16:51 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/3 "2020-05-22T16:51:51Z")

</div>

I am using a temperature sensor. And I did a search, but it's only in i2c mode, so I leave a post. I'm using Python code provided by Atlas Scientific

This link sample code

> **[Atlas-Scientific/Raspberry-Pi-sample-code](https://github.com/Atlas-Scientific/Raspberry-Pi-sample-code)**
>
> Contribute to Atlas-Scientific/Raspberry-Pi-sample-code development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [22 May 2020 17:10 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/4 "2020-05-22T17:10:12Z")

</div>

After a quick look, that did not tell me what the sensor is. There are many temperature sensors, which do you have?

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [22 May 2020 17:37 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/5 "2020-05-22T17:37:14Z")

</div>

It is an ezo rtd sensor. The problem is with the python file. However, it is only possible by entering Python commands. It's easy in the cmd window in Raspberry Pi, but it's difficult in node red, so I leave a post.

This sensor spec

> **[EZO™ RTD Temperature Circuit | Atlas Scientific](https://www.atlas-scientific.com/circuits/ezo-rtd-temperature-circuit/)**
>
> The Atlas Scientific EZO-RTD Circuit makes taking high accuracy readings from a platinum RTD probes easy.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [22 May 2020 18:43 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/6 "2020-05-22T18:43:46Z")

</div>

So how are you wiring it to the Pi?

If looks like if you are wiring it as an I2C device, you should be able to use the [node-red-contrib-i2c](https://flows.nodered.org/node/node-red-contrib-i2c) node instead of the `exec` node running the python code. Have you given it a try?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [22 May 2020 18:46 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/7 "2020-05-22T18:46:43Z")

</div>

Rather than exec maybe use the node-red-node-daemon node. It is similar to exec but allows commands to be sent to a long running process. So the node starts your program but then you can send extra commands to control it if that is the way the python alllows.

---

<div class="post-metadata">

### Author: ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)
#### Post date: [22 May 2020 18:55 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/8 "2020-05-22T18:55:16Z")

</div>

I haven’t read the documentation of the EZO RTD in a couple weeks, but it can either be connected through UART or through I2C. So that’s what you should check first, which is yours currently set up for. If indeed i2c, you can follow the options given above. If UART, start with the RTD manual.

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [23 May 2020 04:51 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/9 "2020-05-23T04:51:42Z")

</div>

Yes I already checked. The problem is that the i2c scan is in atlas scientific ASCII code.  
So I'm going to proceed with Python code.  
When you run a separate command that executes a Python file, debug tries to check it.

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [23 May 2020 04:53 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/10 "2020-05-23T04:53:28Z")

</div>

I did as you said. But strangely, when I run it as a daemon, the python file does not run.  
For exec, it comes directly from the deebug window.  
I don't know what the difference is, but the test result turned out to be disabled.

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [23 May 2020 04:54 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/11 "2020-05-23T04:54:22Z")

</div>

I have already switched from uart to i2c mode.  
I have already checked in the command window.  
Thank you for caring me.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [23 May 2020 06:31 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/12 "2020-05-23T06:31:25Z")

</div>

As a test, can you run outside of Node-RED  
`echo poll | python i2c.py`  
And see if that starts polling the device

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [23 May 2020 08:07 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/13 "2020-05-23T08:07:27Z")

</div>

The thing is that that python code looks to be interactive. If you don't pass it a command, it returns the `help` list. While you might be able to use it, the commands will have to be sent as a paramater in the exec node.

Currently in the exec node, you have the `append` msg.payload checked off. That means whatever is passed in to the `exec` node gets sent to the python progran as a parameter. Currently you are sending in a timestamp and the python rogram doesn't know what to do with it so it returns the `Help`.

It's possible that you could send in a valid command to get some data back, but you should run the python code in a cli and learn what you have to send.

Earlier you said

> The problem is that the i2c scan is in atlas scientific ASCII code.

can you explain this and show a debug of what the output is?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [23 May 2020 08:52 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/14 "2020-05-23T08:52:22Z")

</div>

Yes the python takes a command - which is why I was suggesting trying to pipe said command directly into it.

Not sure why daemon didn't work - the setup of the node is slightly different in that only the command goes into the command field then any parameters in the extra parameters field. - You may also may need -u in order to stop python buffering any output - which I suspect is what was happening.  
so something like

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0ef2fd6e46a3f75635e5d8bcee9f8c965662eec0.png)  
then use an inject to send commands like `poll` etc

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [23 May 2020 14:23 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/15 "2020-05-23T14:23:28Z")

</div>

It is possible to check. thank you for telling me.

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [23 May 2020 14:24 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/16 "2020-05-23T14:24:23Z")

</div>

Strangely, it wasn't just the daemon. I don't know what the problem is.

---

<div class="post-metadata">

### Author: ![Athurian](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Athurian](https://discourse.nodered.org/u/Athurian)
#### Post date: [23 May 2020 14:26 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/17 "2020-05-23T14:26:53Z")

</div>

![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/c/dc6311c3ef4d9f4be800a83d1f74ef0d03a3eab5.jpeg)

It is like this. It is said to be structured in i2c mode.  
I would like to support a node-red atlas scientific sensor.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [23 May 2020 15:05 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/18 "2020-05-23T15:05:28Z")

</div>

Would you be willing to add the node-red-contrib-I2C and connect it to a `debug` node (set to display the Complete msg object) to see if it returns something. It is quite possible that the data that comes back can be converted to the temperature.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [23 May 2020 16:35 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/19 "2020-05-23T16:35:49Z")

</div>

@zenofmud there are known issues with the default install of that i2c node - so I would not go there just yet in case it starts another can of worms.

---

<div class="post-metadata">

### Author: ![drtoyis](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@drtoyis](https://discourse.nodered.org/u/drtoyis)
#### Post date: [22 March 2021 18:59 UTC](https://discourse.nodered.org/t/questions-about-raspberry-pi-ezo-sensor-flow-atlas-scientific-sensor/27091/20 "2021-03-22T18:59:31Z")

</div>

Hi, did you manage to make it work?
