# Modbustcp-read Function Script

**URL:** https://discourse.nodered.org/t/modbustcp-read-function-script/71034
**Category:** General
**Tags:** function-node
**Created:** [22 November 2022 08:00 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034 "2022-11-22T08:00:48Z")
**Posts on this page:** 20
**Page:** 3

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 12:13 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/41 "2022-11-26T12:13:16Z")

</div>

I checked and tried everything again. I can't get it to work. ☹

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 14:42 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/42 "2022-11-26T14:42:56Z")

</div>

@Cupra, if you dont mind, there is a lot of traffic in this thread and I cant make out where you are at, so can we start from the beginning.

> [@Cupra85](#):
>
> The connection to the device works. I need 3 registers that I read with modbustcp-read and then want to split into 3 channels with function.
> 
> I need help creating the script
> 
> Register1 : 100 (Chlor)  
> Register2 : 115 (PH)  
> Register3 : 130 (Redox)

1. Have you ever been able to read anything from the modbus device. Anything at all. If so, show me what you did (show the flow) and show me the output (debug message expanded - screenshot)

2. (after you answer No 1) 🙂

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 15:08 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/43 "2022-11-26T15:08:59Z")

</div>

[flows (3) (1).json](https://discourse.nodered.org/uploads/short-url/45ZDLUyXYWEXdbLfQw3SOv3EEjv.json) (11 KB)

This flow runs ok on my raspberry pi.  
But it should run on my CCU, but I don't have a sequencer there, due to the system, only node-red-contrib-modbus v5.13.3 can be installed.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 15:46 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/44 "2022-11-26T15:46:49Z")

</div>

ok, I'll try again.

1. Using `node-red-contrib-modbus` on the CCU, have you ever been able to read **anything** from the modbus device. Anything at all. If so, show me what you did (show the flow) and show me the output (debug message expanded - screenshot)

PS, if you don't click the "Reply" attached to my post, I don't get a notification & have no idea if you have replied and worse - I cant tell if you are replying to me or someone else!

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/7/e798177f6385ec6982b0ea2462a06a763dae0975.png)

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 15:52 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/45 "2022-11-26T15:52:50Z")

</div>

The screenshot of the debug is in this thread post 32

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 15:57 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/46 "2022-11-26T15:57:38Z")

</div>

I have no idea what that screenshot is showing.

If you answer my questions fully I will help you solve this.

> [@Steve-Mcl](#):
>
> Using `node-red-contrib-modbus` on the CCU, have you ever been able to read **anything** from the modbus device. Anything at all. If so, show me what you did (show the flow) and show me the output (debug message expanded - screenshot)

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 16:06 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/47 "2022-11-26T16:06:08Z")

</div>

The screenshot shows the debug message. The Modbus flex grid connects to the device, but hasn't output anything yet.

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 16:08 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/48 "2022-11-26T16:08:10Z")

</div>

if i can get python on the ccu i could load the sequencer and try with that.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 16:12 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/49 "2022-11-26T16:12:00Z")

</div>

Ok, last time, then I give up. Please answer each question (dont second guess my intent or offer me previous screenshots). If you want to solve this, we MUST start from the beginning so I know where we are at.

Also, lets just forget you have a PI - assume every question is about this other device running Node-RED that you are trying to use to get values from ModBus.

### 1. This is your goal is right?

> The connection to the device works. I need 3 registers that I read with modbustcp-read and then want to split into 3 channels with function.
> 
> I need help creating the script
> 
> Register1 : 100 (Chlor)  
> Register2 : 115 (PH)  
> Register3 : 130 (Redox)

### 2. Can you read anything from the device

Using `node-red-contrib-modbus` OR using `modbustcp-read ` on the CCU, have you ever been able to read **anything** from the modbus device? Yes or No

### 3. If YES, then show me...

If you CAN get any data (even 1 register) using the CCU show me what you did (show the flow from the CCU) and show me the output (debug message expanded - screenshot)

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 16:33 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/50 "2022-11-26T16:33:38Z")

</div>

Current flow

```auto
[{"id":"34cf62b3.c5426e","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"Redox Wert","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${redox_wert}","change":true,"cache":true,"x":1030,"y":280,"wires":[[]]},{"id":"f91a7c3b4fc2798e","type":"ccu-connection","name":"HmIP CCU3","host":"192.168.178.108","regaEnabled":true,"bcrfEnabled":false,"iprfEnabled":false,"virtEnabled":false,"bcwiEnabled":false,"cuxdEnabled":false,"regaPoll":false,"regaInterval":"30","rpcPingTimeout":"60","rpcInitAddress":"","rpcServerHost":"192.168.178.108","rpcBinPort":"2055","rpcXmlPort":"2056","tls":false,"inSecure":false,"authentication":false,"username":"","password":"","queueTimeout":"5000","queuePause":"250","contextStore":""}]

```

no debug output!

1. right
2. no (only use trigger and modbus-flex-gitter)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 16:43 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/51 "2022-11-26T16:43:48Z")

</div>

> [@Cupra85](#):
>
> Current flow

You have posted 1 node. a "ccu-sysvar" node.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/f/0fe4530962b9a502cf4e405fcaa1db76c881f2e6.png)

I dont know what type of node that is and I dont know what it has to do with reading ModBus values from your "pool meter".

* * *

OK, lets carry on.

Q1. Do you know the IP of the "pool meter"?

Q2. Can you PING the "pool meter" IP address from the Redmatic (Homematic CCU3)? (does the "pool meter" respond?)

  

_TIP (install `node-red-node-ping` on the CCU if you cannot access a terminal to try the PING)_

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 16:55 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/52 "2022-11-26T16:55:22Z")

</div>

sorry, this is the current flow

```auto
[{"id":"e4f0ea06.4e5b38","type":"tab","label":"Depolox Pool E 700P","disabled":false,"info":""},{"id":"5f8d0e10.8d204","type":"inject","z":"e4f0ea06.4e5b38","name":"Chlor Wert","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"100","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"Topic","v":"chlor_wert","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"","x":190,"y":160,"wires":[["ee1fc629.99b7c8"]]},{"id":"c875c0e6.487cc","type":"inject","z":"e4f0ea06.4e5b38","name":"PH Wert","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"115","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"ph_wert","payloadType":"str","x":200,"y":220,"wires":[[]]},{"id":"a3e39dd9.d7162","type":"modbus-flex-getter","z":"e4f0ea06.4e5b38","name":"Depolox Pool E 700P","showStatusActivities":true,"showErrors":true,"logIOActivities":false,"server":"3b446b30.590ab4","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":500,"y":360,"wires":[[],["7d907b02.8feda4","d9f3de12.3a2ee"]]},{"id":"c859d8e1.9963d8","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"PH Wert","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${ph_wert}","change":true,"cache":true,"x":1020,"y":220,"wires":[[]]},{"id":"34cf62b3.c5426e","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"Redox Wert","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${redox_wert}","change":true,"cache":true,"x":1030,"y":280,"wires":[[]]},{"id":"7d907b02.8feda4","type":"function","z":"e4f0ea06.4e5b38","name":"Wert Splitter","func":"var temp = Buffer.from(msg.payload.buffer);\nmsg.payload = temp.readFloatBE();\n\nif(msg.topic == \"chlor_wert\"){\n return([msg,null,null,null,null,null,null,null]);\n}\nif(msg.topic == \"ph_wert\"){\n return([null,msg,null,null,null,null,null,null]);\n}\nif(msg.topic == \"redox_wert\"){\n return([null,null,msg,null,null,null,null,null]);\n}\nif (msg.topic.name == \"temp\") {\n return ([null,null,null,msg,null,null,null,null]);\n}\nif (msg.topic.name == \"cl_soll\") {\n return ([null,null,null,null,msg,null,null,null]);\n} \nif (msg.topic.name == \"ph_soll\") {\n return ([null,null,null,null,null,msg,null,null]);\n}\nif (msg.topic.name == \"cl_dos\") {\n return ([null,null,null,null,null,null,msg,null]);\n}\nif (msg.topic.name == \"ph_dos\") {\n return ([null,null,null,null,null,null,null,msg]);\n}","outputs":8,"noerr":0,"initialize":"","finalize":"","x":730,"y":360,"wires":[["30b92cd9.2e88d4","c045f3ba.6deb1"],[],[],[],[],[],[],[]]},{"id":"874f459c.99a1e8","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"Temperatur","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${temp}","change":true,"cache":true,"x":1030,"y":340,"wires":[[]]},{"id":"85315900.5704f8","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"Chlor Sollwert","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${cl_soll}","change":true,"cache":true,"x":1040,"y":400,"wires":[[]]},{"id":"dd5e0bbe.62d178","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"PH Sollwert","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${ph_soll}","change":true,"cache":true,"x":1030,"y":460,"wires":[[]]},{"id":"1b88a288.b432dd","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"Chlor Dosierleistung","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${cl_dos}","change":true,"cache":true,"x":1060,"y":520,"wires":[[]]},{"id":"471e0104.4a78a","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"PH Dosierleistung","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${ph_dos}","change":true,"cache":true,"x":1050,"y":580,"wires":[[]]},{"id":"30b92cd9.2e88d4","type":"ccu-sysvar","z":"e4f0ea06.4e5b38","name":"Chlor Wert","ccuConfig":"f91a7c3b4fc2798e","topic":"ReGaHSS/${chlor_wert}","change":true,"cache":true,"x":1030,"y":160,"wires":[[]]},{"id":"c30afcbc.20a0e","type":"inject","z":"e4f0ea06.4e5b38","name":"Redox Wert","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"130","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"redox_wert","x":190,"y":280,"wires":[[]]},{"id":"d221c075.ee4e4","type":"inject","z":"e4f0ea06.4e5b38","name":"Temperatur","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"175","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"temp","x":190,"y":340,"wires":[[]]},{"id":"3e0e3a5f.0c0e26","type":"inject","z":"e4f0ea06.4e5b38","name":"Chlor Sollwert","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"111","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"cl_soll","x":180,"y":400,"wires":[[]]},{"id":"30d531ba.c4a5de","type":"inject","z":"e4f0ea06.4e5b38","name":"PH Sollwert","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"126","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"ph_soll","x":190,"y":460,"wires":[[]]},{"id":"4a6ff88a.1f7818","type":"inject","z":"e4f0ea06.4e5b38","name":"Chlor Dosierleistung","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"113","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"cl_dos","payloadType":"str","x":160,"y":520,"wires":[[]]},{"id":"8ecb7048.d8b5f","type":"inject","z":"e4f0ea06.4e5b38","name":"PH Dosierleistung","props":[{"p":"fc","v":"3","vt":"num"},{"p":"address","v":"128","vt":"num"},{"p":"quantity","v":"2","vt":"num"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":"0.5","topic":"ph_dos","x":170,"y":580,"wires":[[]]},{"id":"d9f3de12.3a2ee","type":"debug","z":"e4f0ea06.4e5b38","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":720,"y":260,"wires":[]},{"id":"c045f3ba.6deb1","type":"debug","z":"e4f0ea06.4e5b38","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1020,"y":100,"wires":[]},{"id":"ee1fc629.99b7c8","type":"ping","z":"e4f0ea06.4e5b38","protocol":"IPv4","mode":"triggered","name":"","host":"192.168.178.113","timer":"20","inputs":1,"x":420,"y":160,"wires":[["a3e39dd9.d7162"]]},{"id":"3b446b30.590ab4","type":"modbus-client","name":"Depolox Pool E 700P","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":true,"tcpHost":"192.168.178.113","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true},{"id":"f91a7c3b4fc2798e","type":"ccu-connection","name":"HmIP CCU3","host":"192.168.178.108","regaEnabled":true,"bcrfEnabled":false,"iprfEnabled":false,"virtEnabled":false,"bcwiEnabled":false,"cuxdEnabled":false,"regaPoll":false,"regaInterval":"30","rpcPingTimeout":"60","rpcInitAddress":"","rpcServerHost":"192.168.178.108","rpcBinPort":"2055","rpcXmlPort":"2056","tls":false,"inSecure":false,"authentication":false,"username":"","password":"","queueTimeout":"5000","queuePause":"250","contextStore":""}]

```

debug shows now:  
26.11.2022, 17:54:41[node: Depolox Pool E 700P](http://192.168.178.108/addons/red/#)msg : error

"TypeError: Cannot create property 'fc' on number '7.366'"

IP of the Pool meter is 192.168.178.113

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 17:03 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/53 "2022-11-26T17:03:28Z")

</div>

We are getting closer.

Please answer Q2

Here is a flow for you to try...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0d6f304fceef9229b51b000edbadba41343a8331.png)

```auto
[{"id":"07c79b1713819a7e","type":"ping","z":"e4f0ea06.4e5b38","protocol":"IPv4","mode":"triggered","name":"","host":"192.168.178.113","timer":"20","inputs":1,"x":590,"y":680,"wires":[["7d5345156c43eaba"]]},{"id":"9adf770eb518bb8d","type":"inject","z":"e4f0ea06.4e5b38","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":410,"y":680,"wires":[["07c79b1713819a7e"]]},{"id":"7d5345156c43eaba","type":"debug","z":"e4f0ea06.4e5b38","name":"Ping Result","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"msg","x":790,"y":680,"wires":[]}]

```

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 17:10 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/54 "2022-11-26T17:10:10Z")

</div>

nothing, no ping, no debug  
no respond from the pool meter

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 17:13 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/55 "2022-11-26T17:13:27Z")

</div>

that that is what you need to solve first.

There is a chance it doesnt respond to PING so perhaps you should try the same test from your PI.

Did you say your PI was able to get values from the Pool Meter?

* * *

Some questions that would help me help you...

- What is the IP, Mask and Gateway of the CCU?
- What is the IP, Mask and Gateway of the PI?
- What is the IP, Mask and Gateway of the Pool Meter?

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 17:13 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/56 "2022-11-26T17:13:50Z")

</div>

ah now i have a ping from the pool meter 🙂

26.11.2022, 18:12:52[node: Ping Result](http://192.168.178.108/addons/red/#)192.168.178.113 : msg : Object

object

\_msgid: "ea14bb40.f3ad08"

payload: 12.095

topic: "192.168.178.113"

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 17:14 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/57 "2022-11-26T17:14:21Z")

</div>

ok, good.

Before I continue, please answer...

> [@Steve-Mcl](#):
>
> Did you say your PI was able to get values from the Pool Meter?

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 17:17 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/58 "2022-11-26T17:17:31Z")

</div>

yes, and transfer the values to the ccu

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [26 November 2022 17:21 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/59 "2022-11-26T17:21:17Z")

</div>

ok, can you try this flow & show me what you get in the 2 debug outputs  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/b/2bda1a4bef512561d6709d896e1bdf522a1d8928.png)

```auto
[{"id":"b9bd7ab065719cfb","type":"modbus-getter","z":"e4f0ea06.4e5b38","name":"Get registers 100~176","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"","dataType":"HoldingRegister","adr":"100","quantity":"77","server":"3b446b30.590ab4","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":false,"x":710,"y":820,"wires":[["43e39cf1d34899ae"],["b87165cf5e6c1e4e"]]},{"id":"73de244cf086e495","type":"inject","z":"e4f0ea06.4e5b38","name":"Click Me","props":[],"repeat":"","crontab":"","once":false,"onceDelay":"0.5","topic":"","x":500,"y":820,"wires":[["b9bd7ab065719cfb"]]},{"id":"43e39cf1d34899ae","type":"debug","z":"e4f0ea06.4e5b38","name":"Top output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":950,"y":800,"wires":[]},{"id":"b87165cf5e6c1e4e","type":"debug","z":"e4f0ea06.4e5b38","name":"Bottom Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":960,"y":860,"wires":[]},{"id":"3b446b30.590ab4","type":"modbus-client","name":"Depolox Pool E 700P","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":true,"failureLogEnabled":false,"tcpHost":"192.168.178.113","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true}]

```

Also, "Copy Value" and paste into a codeblock...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/d/cd4b471e4dd7f137de53526954ecc60db5ba9d4e.png)

---

<div class="post-metadata">

### Author: ![Cupra85](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cupra85](https://discourse.nodered.org/u/Cupra85)
#### Post date: [26 November 2022 17:26 UTC](https://discourse.nodered.org/t/modbustcp-read-function-script/71034/60 "2022-11-26T17:26:40Z")

</div>

no debug output.

I have to be gone for 2 hours, I'll get back to you then

[Previous page](https://discourse.nodered.org/t/modbustcp-read-function-script/71034.md?page=2)

[Next page](https://discourse.nodered.org/t/modbustcp-read-function-script/71034.md?page=4)
