MaddyP's 12G Long - Node-Red Nano Peninsula

OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
@MaddyP , how is the concept going?
Love what you are doing here ;Bookworm
Thanks for the check in, @Janci! The project has sat untouched while I have been transitioning into my new role at work, but starting to have some mental space for this build! Also visited the Osaka Aquarium in Japan this summer which refired my interest in having a small piece of the ocean in my life.

Wow, impressive to say the least. To have pid control over a valve would be great for level sensors and overflow drains. I’m so tired of adjusting my Red Sea overflow drain every day. It would be nice to have level sensors trigger control modifications to the valve position automatically
I completely agree, if PID control could be implemented it would be a game changer in aquarium flow/plumbing.

Following, got to love builds out of the box with all the bells and whistles while still DIY.
I don't like the looks of equipment un the display either, i'm building my frag tank that needs to be as pretty as my display, bought the TLF overflow box (In out) that will be very low profile and not an eye sore. Plus: i'm overkilling the return pump capacity to take advantage of one of the overflow perks which is a pulsing effect, i might not need a powerhead or a wavemaker un tje display if this works the way i expect it to do.

Check out the IN OUT Xaqua, it might work for your setup!
Regards
Thank you! I looked into some of the sleek overflow option and even purchased a few but they weren't sleek enough for me. This is much more complicated, but building it is half the fun.

Hey I am trying to get my EZO stamps to read in node-red instead of python on the R Pi. Were you able to get a read from the i2c inside node-red? If so can you share the flow/code?
Absolutely!

It took some manipulation of the code to get it working. I used the "daemon" node to run python python at an interval.


And here are the python files I used for the different Ezo boards.



1566513888840.png
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
Thanks for the check in, @Janci! The project has sat untouched while I have been transitioning into my new role at work, but starting to have some mental space for this build! Also visited the Osaka Aquarium in Japan this summer which refired my interest in having a small piece of the ocean in my life.


I completely agree, if PID control could be implemented it would be a game changer in aquarium flow/plumbing.


Thank you! I looked into some of the sleek overflow option and even purchased a few but they weren't sleek enough for me. This is much more complicated, but building it is half the fun.


Absolutely!

It took some manipulation of the code to get it working. I used the "daemon" node to run python python at an interval.


And here are the python files I used for the different Ezo boards.



1566513888840.png

That's a clever way to overcome the difficulty of using I2C in NodeRed with the default node-red-contrib-i2c flow library and the Atlas-Scientific EZO circuits . I have two Raspberry Pi4s w/ the 4GB memory option to play with, so I think it will have the horse-power.

Thinking about dividing my own project into two parts... WaterPrep area and AquariumRack.... They are physically seperated in different parts of the house... and there is very limited communication between the two processes necessary. (basically just need to make sure my holding tank has sufficient water before ordering a water change to my aquariums... Should be able to have the two projects communicate over MQTT to find that out...).

I'll be back home in about 2 weeks... I've been inspired to go a different direction with my aquarium controller.
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
I started the project. so far I have the EZO RTD, EZO FLO, EZO pH, EZO ORP Atlas-Scientific Circuits communicating over I2C using the default node-red-contrib-i2c node.

I'm struggling with sending multiple commands for doing things like Calibrations or Clearing the Flow Totalizer. I'll figure it out... This i2c node can't be THAT limited!

Here is a photo on PlantedTank Dot Net
pg_17973c.jpg



Is anyone else using Node-RED to send Command to the Atlas-Scientific Circuits over I2C?

I'll paste the Flow that I have at the moment for reading the sensors and displaying the values:
Code:
[

{

"id": "59165d4d.066034",

"type": "tab",

"label": "Flow 1",

"disabled": false,

"info": ""

},

{

"id": "e00b8f43.9ccf9",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "RTDData",

"address": "102",

"command": "",

"count": "8",

"x": 460,

"y": 100,

"wires": [

[

"6588eab1.c5bdb4"

]

]

},

{

"id": "791936ff.768018",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "RTDCmnd",

"address": "102",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 110,

"y": 100,

"wires": [

[

"33df9f56.5deff"

]

]

},

{

"id": "418f9978.531ca8",

"type": "debug",

"z": "59165d4d.066034",

"name": "RawBuff",

"active": true,

"tosidebar": true,

"console": false,

"tostatus": false,

"complete": "payload",

"targetType": "msg",

"x": 520,

"y": 820,

"wires": []

},

{

"id": "a9306c4d.c7cb9",

"type": "inject",

"z": "59165d4d.066034",

"name": "push1",

"topic": "",

"payload": "",

"payloadType": "num",

"repeat": "15",

"crontab": "",

"once": true,

"onceDelay": 0.1,

"x": 120,

"y": 20,

"wires": [

[

"791936ff.768018",

"863f23ed.6ce2b",

"4c96ce0f.154ec",

"9214c7e3.12f458"

]

]

},

{

"id": "33df9f56.5deff",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay1",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 100,

"wires": [

[

"e00b8f43.9ccf9"

]

]

},

{

"id": "54aae87c.830b48",

"type": "i2c scan",

"z": "59165d4d.066034",

"name": "",

"x": 320,

"y": 900,

"wires": [

[

"7dd33aaa.12b2a4"

],

[]

]

},

{

"id": "42f6e013.13b69",

"type": "inject",

"z": "59165d4d.066034",

"name": "push2",

"topic": "",

"payload": "Clear",

"payloadType": "str",

"repeat": "",

"crontab": "",

"once": false,

"onceDelay": 0.1,

"x": 110,

"y": 820,

"wires": [

[

"b1978dba.68466"

]

]

},

{

"id": "7dd33aaa.12b2a4",

"type": "debug",

"z": "59165d4d.066034",

"name": "i2c channel devices",

"active": true,

"tosidebar": true,

"console": false,

"tostatus": false,

"complete": "payload",

"targetType": "msg",

"x": 550,

"y": 900,

"wires": []

},

{

"id": "a281a3c1.00d56",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "ffc1aa9d.ac4028",

"order": 3,

"width": 0,

"height": 0,

"name": "degC",

"label": "degC",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 160,

"wires": []

},

{

"id": "6588eab1.c5bdb4",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 620,

"y": 100,

"wires": [

[

"323c7e18.bdd8e2"

]

]

},

{

"id": "323c7e18.bdd8e2",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum",

"rules": [

{

"t": "set",

"p": "payload.value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 620,

"y": 160,

"wires": [

[

"a281a3c1.00d56",

"5b912629.f72478"

]

]

},

{

"id": "5b912629.f72478",

"type": "ui_gauge",

"z": "59165d4d.066034",

"name": "TankTemp",

"group": "ffc1aa9d.ac4028",

"order": 1,

"width": 0,

"height": 0,

"gtype": "donut",

"title": "Tank Temp",

"label": "degC",

"format": "{{value}}",

"min": 0,

"max": "40",

"colors": [

"#ff8040",

"#ff8000",

"#ff0000"

],

"seg1": "10",

"seg2": "30",

"x": 850,

"y": 100,

"wires": []

},

{

"id": "863f23ed.6ce2b",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "pHCmnd",

"address": "100",

"command": "082",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 120,

"y": 240,

"wires": [

[

"d76c2c51.1df71"

]

]

},

{

"id": "d76c2c51.1df71",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay2",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 240,

"wires": [

[

"4e84ff27.a688"

]

]

},

{

"id": "4e84ff27.a688",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "pHData",

"address": "100",

"command": "",

"count": "8",

"x": 460,

"y": 240,

"wires": [

[

"5e0af3d3.7bd6bc"

]

]

},

{

"id": "5e0af3d3.7bd6bc",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr2",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 630,

"y": 240,

"wires": [

[

"ac1f6728.22f578"

]

]

},

{

"id": "ac1f6728.22f578",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum2",

"rules": [

{

"t": "set",

"p": "payload.Value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 630,

"y": 300,

"wires": [

[

"7176c108.99433",

"6436f959.83a148"

]

]

},

{

"id": "7176c108.99433",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "ad7aabd5.7bf318",

"order": 5,

"width": 0,

"height": 0,

"name": "pH",

"label": "pH",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 300,

"wires": []

},

{

"id": "6436f959.83a148",

"type": "ui_level",

"z": "59165d4d.066034",

"group": "ad7aabd5.7bf318",

"order": 3,

"width": 0,

"height": 0,

"name": "TankpH",

"label": "",

"colorHi": "#8000ff",

"colorWarn": "#008080",

"colorNormal": "#ff0000",

"colorOff": "#595959",

"min": "4",

"max": "10",

"segWarn": "6",

"segHigh": "8.5",

"unit": "",

"layout": "sv",

"channelA": "",

"channelB": "",

"decimals": 0,

"animations": "soft",

"shape": "3",

"colorschema": "rainbow",

"textoptions": "default",

"colorText": "#eeeeee",

"fontLabel": "",

"fontValue": "",

"fontSmall": "",

"colorFromTheme": true,

"textAnimations": true,

"hideValue": true,

"tickmode": "segments",

"peakmode": false,

"peaktime": 3000,

"x": 840,

"y": 260,

"wires": []

},

{

"id": "4c96ce0f.154ec",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "FlowCmnd",

"address": "104",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 110,

"y": 520,

"wires": [

[

"fb7d7fe3.15b03"

]

]

},

{

"id": "fb7d7fe3.15b03",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay3",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 520,

"wires": [

[

"89af4958.9414b8"

]

]

},

{

"id": "89af4958.9414b8",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "FlowData",

"address": "104",

"command": "",

"count": "8",

"x": 460,

"y": 520,

"wires": [

[

"5e8a1754.f437d8",

"5f966686.1c2b78"

]

]

},

{

"id": "5e8a1754.f437d8",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr3",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 630,

"y": 520,

"wires": [

[

"6e7c1c2d.edae24"

]

]

},

{

"id": "6e7c1c2d.edae24",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum3",

"rules": [

{

"t": "set",

"p": "payload.Value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 630,

"y": 580,

"wires": [

[

"117ae2b.0951e1d",

"8b9f9a88.59a058"

]

]

},

{

"id": "117ae2b.0951e1d",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "b03ec9c2.970168",

"order": 3,

"width": 0,

"height": 0,

"name": "l/min",

"label": "l/min",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 580,

"wires": []

},

{

"id": "b1978dba.68466",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "TotClear",

"address": "104",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "8",

"x": 320,

"y": 820,

"wires": [

[

"418f9978.531ca8"

]

]

},

{

"id": "33f61e3b.8cb402",

"type": "inject",

"z": "59165d4d.066034",

"name": "push3",

"topic": "",

"payload": "",

"payloadType": "num",

"repeat": "",

"crontab": "",

"once": false,

"onceDelay": 0.1,

"x": 110,

"y": 900,

"wires": [

[

"54aae87c.830b48"

]

]

},

{

"id": "8b9f9a88.59a058",

"type": "ui_gauge",

"z": "59165d4d.066034",

"name": "PumpFlow",

"group": "b03ec9c2.970168",

"order": 1,

"width": 0,

"height": 0,

"gtype": "gage",

"title": "Pump Flow",

"label": "l/min",

"format": "{{value}}",

"min": 0,

"max": "30",

"colors": [

"#80ffff",

"#80ffff",

"#00ffff"

],

"seg1": "10",

"seg2": "20",

"x": 850,

"y": 520,

"wires": []

},

{

"id": "fea649a4.e13928",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "ad7aabd5.7bf318",

"order": 1,

"width": 0,

"height": 0,

"name": "pHLabel",

"label": "Tank pH",

"format": "",

"layout": "row-center",

"x": 840,

"y": 220,

"wires": []

},

{

"id": "fcfd20fc.fe16a",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "ORPData",

"address": "98",

"command": "",

"count": "8",

"x": 460,

"y": 380,

"wires": [

[

"8fbadc49.54a87"

]

]

},

{

"id": "9214c7e3.12f458",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "ORPCmnd",

"address": "98",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 110,

"y": 380,

"wires": [

[

"49ba564f.5d51a8"

]

]

},

{

"id": "49ba564f.5d51a8",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay1",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 380,

"wires": [

[

"fcfd20fc.fe16a"

]

]

},

{

"id": "e272ee73.d5b14",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "b2db3abe.0a63d8",

"order": 3,

"width": 0,

"height": 0,

"name": "mV",

"label": "mV",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 440,

"wires": []

},

{

"id": "8fbadc49.54a87",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 620,

"y": 380,

"wires": [

[

"98d203ea.9b3c2"

]

]

},

{

"id": "98d203ea.9b3c2",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum",

"rules": [

{

"t": "set",

"p": "payload.value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 620,

"y": 440,

"wires": [

[

"e272ee73.d5b14",

"7f98aed2.615d1"

]

]

},

{

"id": "7f98aed2.615d1",

"type": "ui_gauge",

"z": "59165d4d.066034",

"name": "TankORP",

"group": "b2db3abe.0a63d8",

"order": 1,

"width": 0,

"height": 0,

"gtype": "gage",

"title": "Tank ORP",

"label": "mV",

"format": "{{value}}",

"min": 0,

"max": "500",

"colors": [

"#00ff00",

"#ffff00",

"#ff0000"

],

"seg1": "275",

"seg2": "350",

"x": 840,

"y": 380,

"wires": []

},

{

"id": "a4f6724b.00d57",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr3",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 630,

"y": 640,

"wires": [

[

"7eb33ea4.484bc"

]

]

},

{

"id": "7eb33ea4.484bc",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum3",

"rules": [

{

"t": "set",

"p": "payload.Value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 630,

"y": 700,

"wires": [

[

"6baa2964.726738"

]

]

},

{

"id": "6baa2964.726738",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "b03ec9c2.970168",

"order": 3,

"width": 0,

"height": 0,

"name": "litres",

"label": "Total litres",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 700,

"wires": []

},

{

"id": "5f966686.1c2b78",

"type": "debug",

"z": "59165d4d.066034",

"name": "",

"active": true,

"tosidebar": true,

"console": false,

"tostatus": false,

"complete": "false",

"x": 630,

"y": 760,

"wires": []

},

{

"id": "ffc1aa9d.ac4028",

"type": "ui_group",

"z": "",

"name": "EZO RTD over i2c",

"tab": "ba830589.55bb38",

"order": 1,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "ad7aabd5.7bf318",

"type": "ui_group",

"z": "",

"name": "EZO pH over I2C",

"tab": "ba830589.55bb38",

"order": 2,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "b03ec9c2.970168",

"type": "ui_group",

"z": "",

"name": "EZO Flo over I2C",

"tab": "ba830589.55bb38",

"order": 4,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "b2db3abe.0a63d8",

"type": "ui_group",

"z": "",

"name": "EZO ORP over I2C",

"tab": "ba830589.55bb38",

"order": 3,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "ba830589.55bb38",

"type": "ui_tab",

"z": "",

"name": "RPI4-NodeRed-AtlasSciI2C",

"icon": "dashboard",

"disabled": false,

"hidden": false

}

]
 
Last edited:
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
I started the project. so far I have the EZO RTD, EZO FLO, EZO pH, EZO ORP Atlas-Scientific Circuits communicating over I2C using the default node-red-contrib-i2c node.

I'm struggling with sending multiple commands for doing things like Calibrations or Clearing the Flow Totalizer. I'll figure it out... This i2c node can't be THAT limited!

Here is a photo on PlantedTank Dot Net
pg_17973c.jpg



As an aside I have a couple of EBAY auctions going at the moment where I'm selling a ton of Arduino/RaspberryPi Microcontrollers and Atlas-Scientific Sensors, Circuits, etc...
photos here:
Don't think Ebay auction links are permitted on these forums. (My handle on ebay is SonoraTechnical, my company, if you want to check it out yourself). That's all I mention about the stuff I have for sale...



Back to the thread... Is anyone else using Node-RED to send Command to the Atlas-Scientific Circuits over I2C?

I'll paste the Flow that I have at the moment for reading the sensors and displaying the values:
[
{
"id": "59165d4d.066034",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "e00b8f43.9ccf9",
"type": "i2c in",
"z": "59165d4d.066034",
"name": "RTDData",
"address": "102",
"command": "",
"count": "8",
"x": 460,
"y": 100,
"wires": [
[
"6588eab1.c5bdb4"
]
]
},
{
"id": "791936ff.768018",
"type": "i2c out",
"z": "59165d4d.066034",
"name": "RTDCmnd",
"address": "102",
"command": "82",
"payload": "payload",
"payloadType": "msg",
"count": "1",
"x": 110,
"y": 100,
"wires": [
[
"33df9f56.5deff"
]
]
},
{
"id": "418f9978.531ca8",
"type": "debug",
"z": "59165d4d.066034",
"name": "RawBuff",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"x": 520,
"y": 820,
"wires": []
},
{
"id": "a9306c4d.c7cb9",
"type": "inject",
"z": "59165d4d.066034",
"name": "push1",
"topic": "",
"payload": "",
"payloadType": "num",
"repeat": "15",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"x": 120,
"y": 20,
"wires": [
[
"791936ff.768018",
"863f23ed.6ce2b",
"4c96ce0f.154ec",
"9214c7e3.12f458"
]
]
},
{
"id": "33df9f56.5deff",
"type": "delay",
"z": "59165d4d.066034",
"name": "delay1",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 270,
"y": 100,
"wires": [
[
"e00b8f43.9ccf9"
]
]
},
{
"id": "54aae87c.830b48",
"type": "i2c scan",
"z": "59165d4d.066034",
"name": "",
"x": 320,
"y": 900,
"wires": [
[
"7dd33aaa.12b2a4"
],
[]
]
},
{
"id": "42f6e013.13b69",
"type": "inject",
"z": "59165d4d.066034",
"name": "push2",
"topic": "",
"payload": "Clear",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 110,
"y": 820,
"wires": [
[
"b1978dba.68466"
]
]
},
{
"id": "7dd33aaa.12b2a4",
"type": "debug",
"z": "59165d4d.066034",
"name": "i2c channel devices",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"x": 550,
"y": 900,
"wires": []
},
{
"id": "a281a3c1.00d56",
"type": "ui_text",
"z": "59165d4d.066034",
"group": "ffc1aa9d.ac4028",
"order": 3,
"width": 0,
"height": 0,
"name": "degC",
"label": "degC",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 830,
"y": 160,
"wires": []
},
{
"id": "6588eab1.c5bdb4",
"type": "function",
"z": "59165d4d.066034",
"name": "BuffToStr",
"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 100,
"wires": [
[
"323c7e18.bdd8e2"
]
]
},
{
"id": "323c7e18.bdd8e2",
"type": "change",
"z": "59165d4d.066034",
"name": "StrToNum",
"rules": [
{
"t": "set",
"p": "payload.value",
"pt": "msg",
"to": "",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 620,
"y": 160,
"wires": [
[
"a281a3c1.00d56",
"5b912629.f72478"
]
]
},
{
"id": "5b912629.f72478",
"type": "ui_gauge",
"z": "59165d4d.066034",
"name": "TankTemp",
"group": "ffc1aa9d.ac4028",
"order": 1,
"width": 0,
"height": 0,
"gtype": "donut",
"title": "Tank Temp",
"label": "degC",
"format": "{{value}}",
"min": 0,
"max": "40",
"colors": [
"#ff8040",
"#ff8000",
"#ff0000"
],
"seg1": "10",
"seg2": "30",
"x": 850,
"y": 100,
"wires": []
},
{
"id": "863f23ed.6ce2b",
"type": "i2c out",
"z": "59165d4d.066034",
"name": "pHCmnd",
"address": "100",
"command": "082",
"payload": "payload",
"payloadType": "msg",
"count": "1",
"x": 120,
"y": 240,
"wires": [
[
"d76c2c51.1df71"
]
]
},
{
"id": "d76c2c51.1df71",
"type": "delay",
"z": "59165d4d.066034",
"name": "delay2",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 270,
"y": 240,
"wires": [
[
"4e84ff27.a688"
]
]
},
{
"id": "4e84ff27.a688",
"type": "i2c in",
"z": "59165d4d.066034",
"name": "pHData",
"address": "100",
"command": "",
"count": "8",
"x": 460,
"y": 240,
"wires": [
[
"5e0af3d3.7bd6bc"
]
]
},
{
"id": "5e0af3d3.7bd6bc",
"type": "function",
"z": "59165d4d.066034",
"name": "BuffToStr2",
"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 240,
"wires": [
[
"ac1f6728.22f578"
]
]
},
{
"id": "ac1f6728.22f578",
"type": "change",
"z": "59165d4d.066034",
"name": "StrToNum2",
"rules": [
{
"t": "set",
"p": "payload.Value",
"pt": "msg",
"to": "",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 300,
"wires": [
[
"7176c108.99433",
"6436f959.83a148"
]
]
},
{
"id": "7176c108.99433",
"type": "ui_text",
"z": "59165d4d.066034",
"group": "ad7aabd5.7bf318",
"order": 5,
"width": 0,
"height": 0,
"name": "pH",
"label": "pH",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 830,
"y": 300,
"wires": []
},
{
"id": "6436f959.83a148",
"type": "ui_level",
"z": "59165d4d.066034",
"group": "ad7aabd5.7bf318",
"order": 3,
"width": 0,
"height": 0,
"name": "TankpH",
"label": "",
"colorHi": "#8000ff",
"colorWarn": "#008080",
"colorNormal": "#ff0000",
"colorOff": "#595959",
"min": "4",
"max": "10",
"segWarn": "6",
"segHigh": "8.5",
"unit": "",
"layout": "sv",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": "3",
"colorschema": "rainbow",
"textoptions": "default",
"colorText": "#eeeeee",
"fontLabel": "",
"fontValue": "",
"fontSmall": "",
"colorFromTheme": true,
"textAnimations": true,
"hideValue": true,
"tickmode": "segments",
"peakmode": false,
"peaktime": 3000,
"x": 840,
"y": 260,
"wires": []
},
{
"id": "4c96ce0f.154ec",
"type": "i2c out",
"z": "59165d4d.066034",
"name": "FlowCmnd",
"address": "104",
"command": "82",
"payload": "payload",
"payloadType": "msg",
"count": "1",
"x": 110,
"y": 520,
"wires": [
[
"fb7d7fe3.15b03"
]
]
},
{
"id": "fb7d7fe3.15b03",
"type": "delay",
"z": "59165d4d.066034",
"name": "delay3",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 270,
"y": 520,
"wires": [
[
"89af4958.9414b8"
]
]
},
{
"id": "89af4958.9414b8",
"type": "i2c in",
"z": "59165d4d.066034",
"name": "FlowData",
"address": "104",
"command": "",
"count": "8",
"x": 460,
"y": 520,
"wires": [
[
"5e8a1754.f437d8",
"5f966686.1c2b78"
]
]
},
{
"id": "5e8a1754.f437d8",
"type": "function",
"z": "59165d4d.066034",
"name": "BuffToStr3",
"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 520,
"wires": [
[
"6e7c1c2d.edae24"
]
]
},
{
"id": "6e7c1c2d.edae24",
"type": "change",
"z": "59165d4d.066034",
"name": "StrToNum3",
"rules": [
{
"t": "set",
"p": "payload.Value",
"pt": "msg",
"to": "",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 580,
"wires": [
[
"117ae2b.0951e1d",
"8b9f9a88.59a058"
]
]
},
{
"id": "117ae2b.0951e1d",
"type": "ui_text",
"z": "59165d4d.066034",
"group": "b03ec9c2.970168",
"order": 3,
"width": 0,
"height": 0,
"name": "l/min",
"label": "l/min",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 830,
"y": 580,
"wires": []
},
{
"id": "b1978dba.68466",
"type": "i2c out",
"z": "59165d4d.066034",
"name": "TotClear",
"address": "104",
"command": "82",
"payload": "payload",
"payloadType": "msg",
"count": "8",
"x": 320,
"y": 820,
"wires": [
[
"418f9978.531ca8"
]
]
},
{
"id": "33f61e3b.8cb402",
"type": "inject",
"z": "59165d4d.066034",
"name": "push3",
"topic": "",
"payload": "",
"payloadType": "num",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 110,
"y": 900,
"wires": [
[
"54aae87c.830b48"
]
]
},
{
"id": "8b9f9a88.59a058",
"type": "ui_gauge",
"z": "59165d4d.066034",
"name": "PumpFlow",
"group": "b03ec9c2.970168",
"order": 1,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Pump Flow",
"label": "l/min",
"format": "{{value}}",
"min": 0,
"max": "30",
"colors": [
"#80ffff",
"#80ffff",
"#00ffff"
],
"seg1": "10",
"seg2": "20",
"x": 850,
"y": 520,
"wires": []
},
{
"id": "fea649a4.e13928",
"type": "ui_text",
"z": "59165d4d.066034",
"group": "ad7aabd5.7bf318",
"order": 1,
"width": 0,
"height": 0,
"name": "pHLabel",
"label": "Tank pH",
"format": "",
"layout": "row-center",
"x": 840,
"y": 220,
"wires": []
},
{
"id": "fcfd20fc.fe16a",
"type": "i2c in",
"z": "59165d4d.066034",
"name": "ORPData",
"address": "98",
"command": "",
"count": "8",
"x": 460,
"y": 380,
"wires": [
[
"8fbadc49.54a87"
]
]
},
{
"id": "9214c7e3.12f458",
"type": "i2c out",
"z": "59165d4d.066034",
"name": "ORPCmnd",
"address": "98",
"command": "82",
"payload": "payload",
"payloadType": "msg",
"count": "1",
"x": 110,
"y": 380,
"wires": [
[
"49ba564f.5d51a8"
]
]
},
{
"id": "49ba564f.5d51a8",
"type": "delay",
"z": "59165d4d.066034",
"name": "delay1",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 270,
"y": 380,
"wires": [
[
"fcfd20fc.fe16a"
]
]
},
{
"id": "e272ee73.d5b14",
"type": "ui_text",
"z": "59165d4d.066034",
"group": "b2db3abe.0a63d8",
"order": 3,
"width": 0,
"height": 0,
"name": "mV",
"label": "mV",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 830,
"y": 440,
"wires": []
},
{
"id": "8fbadc49.54a87",
"type": "function",
"z": "59165d4d.066034",
"name": "BuffToStr",
"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 620,
"y": 380,
"wires": [
[
"98d203ea.9b3c2"
]
]
},
{
"id": "98d203ea.9b3c2",
"type": "change",
"z": "59165d4d.066034",
"name": "StrToNum",
"rules": [
{
"t": "set",
"p": "payload.value",
"pt": "msg",
"to": "",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 620,
"y": 440,
"wires": [
[
"e272ee73.d5b14",
"7f98aed2.615d1"
]
]
},
{
"id": "7f98aed2.615d1",
"type": "ui_gauge",
"z": "59165d4d.066034",
"name": "TankORP",
"group": "b2db3abe.0a63d8",
"order": 1,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Tank ORP",
"label": "mV",
"format": "{{value}}",
"min": 0,
"max": "500",
"colors": [
"#00ff00",
"#ffff00",
"#ff0000"
],
"seg1": "275",
"seg2": "350",
"x": 840,
"y": 380,
"wires": []
},
{
"id": "a4f6724b.00d57",
"type": "function",
"z": "59165d4d.066034",
"name": "BuffToStr3",
"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 630,
"y": 640,
"wires": [
[
"7eb33ea4.484bc"
]
]
},
{
"id": "7eb33ea4.484bc",
"type": "change",
"z": "59165d4d.066034",
"name": "StrToNum3",
"rules": [
{
"t": "set",
"p": "payload.Value",
"pt": "msg",
"to": "",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 700,
"wires": [
[
"6baa2964.726738"
]
]
},
{
"id": "6baa2964.726738",
"type": "ui_text",
"z": "59165d4d.066034",
"group": "b03ec9c2.970168",
"order": 3,
"width": 0,
"height": 0,
"name": "litres",
"label": "Total litres",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 830,
"y": 700,
"wires": []
},
{
"id": "5f966686.1c2b78",
"type": "debug",
"z": "59165d4d.066034",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 630,
"y": 760,
"wires": []
},
{
"id": "ffc1aa9d.ac4028",
"type": "ui_group",
"z": "",
"name": "EZO RTD over i2c",
"tab": "ba830589.55bb38",
"order": 1,
"disp": false,
"width": "5",
"collapse": false
},
{
"id": "ad7aabd5.7bf318",
"type": "ui_group",
"z": "",
"name": "EZO pH over I2C",
"tab": "ba830589.55bb38",
"order": 2,
"disp": false,
"width": "5",
"collapse": false
},
{
"id": "b03ec9c2.970168",
"type": "ui_group",
"z": "",
"name": "EZO Flo over I2C",
"tab": "ba830589.55bb38",
"order": 4,
"disp": false,
"width": "5",
"collapse": false
},
{
"id": "b2db3abe.0a63d8",
"type": "ui_group",
"z": "",
"name": "EZO ORP over I2C",
"tab": "ba830589.55bb38",
"order": 3,
"disp": false,
"width": "5",
"collapse": false
},
{
"id": "ba830589.55bb38",
"type": "ui_tab",
"z": "",
"name": "RPI4-NodeRed-AtlasSciI2C",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
Please edit your post to include code so it is not so long. And please remove the bit about stuff for sale.

1586625589941.png
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Finally an update! With all this extra time on my hands being stuck at home, I decided to take another stab at this modulating valve idea. IT WORKS! Maybe not perfect as the ultrasonic sensor does have some noise (slight disturbance in the water surface) but over the past few days it has kept the upper tank water level consistent.

Sensor range is 40mm-300mm (1.57"-11.81") with an analog output of 750-3750. This means ~11.5 points equates to 1mm of water level change. Not bad! And considering in a real tank envrionement the surface area of water in the sump changing level is a fraction of the surface area of water in the display tank, even if the value drifts up and down the display tank will see even less level change.

Pump is also being controlled via 0-10V analog through Node-Red. The next step will be to implement a sine wave pattern in the pump to be sure the valve can follow the changes evenly.

1586626095584.png


Please forgive the crazy looking setup, I threw this together to verify the idea would even be viable.

1586627044640.png


1586627122406.png


1586627153865.png


1586627017234.png
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
Please edit your post to include code so it is not so long. And please remove the bit about stuff for sale.

Done. (though I thought the AtlasSci stuff would be useful to folks as that is what both you and I are using).

I've made progress, adding pH and Temp control via an NCD i2c 8-channel relay board, a virtual touch keyboard on the screen, and included some Rpi4 sys info. Still struggling using the standard i2c node for sending long commands (eg. calibration) to the AtlasSci stamps.

Running Pimoroni Fan-SHIM for the overclocked 4GB Rpi4 (2.0Ghz CPU, 667Mhz GPU). A python script at boot monitors CPU temp every 5 secs, On @ 55degC, Off @ 50degC. Might hear it run for no more than one or two 5 second duty cycles when flipping through tabs on the DashboardUi. Seems to be loafing around 42-49degC. Expect very different results once it is put in a permanent enclosure.

I really like how compact these buckpuck boards are...

6773E8B5-C9F1-49E3-BCEA-D91D1F5EF67C.jpeg

The converters will be used to interface the 0-10V pumps.

Can you provide some information about that buckpuck board?
 
Last edited:
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Done. (though I thought the AtlasSci stuff would be useful to folks as that is what both you and I are using).

I've made progress, adding pH and Temp control via an NCD i2c 8-channel relay board, a virtual touch keyboard on the screen, and included some Rpi4 sys info. Still struggling using the standard i2c node for sending long commands (eg. calibration) to the AtlasSci stamps.

Running Pimoroni Fan-SHIM for the overclocked 4GB Rpi4 (2.0Ghz CPU, 667Mhz GPU). A python script at boot monitors CPU temp every 5 secs, On @ 55degC, Off @ 50degC. Might hear it run for no more than one or two 5 second duty cycles when flipping through tabs on the DashboardUi. Seems to be loafing around 42-49degC. Expect very different results once it is put in a permanent enclosure.



Can you provide some information about that buckpuck board?
Awesome, thank you! :)

Sure! Those are driver boards from Nanobox Reef utilizing Meanwell LDD drivers. Most compact driver boards I could find allowing 5 dimmable channels and fan control. Works on PMW dimming so I've ordered a Rasp Zero W to install in the fixture to facilitate the dimming/control of the light.

How do you like the Raspi 4? Got one on order for this build but not sure if it's going to be much improvement over the Raspi 3. I was utilizing a Asus Tinkerboard but trying to get some of the firmware to take was challenging.
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
Thanks. I'll look them up.

RaspbPi3B is 1.2Ghz w/ 1GB of Ram.... the 4B is easily overclockable to 2.0Ghz w/ 4GB of Ram. Makes a difference. Wired Ethernet is quicker too. One downside is early 4B releases had an issue where the HDMI ports interfered with the WiFi (both of mine have that issue.) ... but if you are just purchasing it, you'll be okay as that stock has probably been worked through.
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
I started the project. so far I have the EZO RTD, EZO FLO, EZO pH, EZO ORP Atlas-Scientific Circuits communicating over I2C using the default node-red-contrib-i2c node.

I'm struggling with sending multiple commands for doing things like Calibrations or Clearing the Flow Totalizer. I'll figure it out... This i2c node can't be THAT limited!

Here is a photo on PlantedTank Dot Net
pg_17973c.jpg



Is anyone else using Node-RED to send Command to the Atlas-Scientific Circuits over I2C?

I'll paste the Flow that I have at the moment for reading the sensors and displaying the values:
Code:
[

{

"id": "59165d4d.066034",

"type": "tab",

"label": "Flow 1",

"disabled": false,

"info": ""

},

{

"id": "e00b8f43.9ccf9",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "RTDData",

"address": "102",

"command": "",

"count": "8",

"x": 460,

"y": 100,

"wires": [

[

"6588eab1.c5bdb4"

]

]

},

{

"id": "791936ff.768018",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "RTDCmnd",

"address": "102",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 110,

"y": 100,

"wires": [

[

"33df9f56.5deff"

]

]

},

{

"id": "418f9978.531ca8",

"type": "debug",

"z": "59165d4d.066034",

"name": "RawBuff",

"active": true,

"tosidebar": true,

"console": false,

"tostatus": false,

"complete": "payload",

"targetType": "msg",

"x": 520,

"y": 820,

"wires": []

},

{

"id": "a9306c4d.c7cb9",

"type": "inject",

"z": "59165d4d.066034",

"name": "push1",

"topic": "",

"payload": "",

"payloadType": "num",

"repeat": "15",

"crontab": "",

"once": true,

"onceDelay": 0.1,

"x": 120,

"y": 20,

"wires": [

[

"791936ff.768018",

"863f23ed.6ce2b",

"4c96ce0f.154ec",

"9214c7e3.12f458"

]

]

},

{

"id": "33df9f56.5deff",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay1",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 100,

"wires": [

[

"e00b8f43.9ccf9"

]

]

},

{

"id": "54aae87c.830b48",

"type": "i2c scan",

"z": "59165d4d.066034",

"name": "",

"x": 320,

"y": 900,

"wires": [

[

"7dd33aaa.12b2a4"

],

[]

]

},

{

"id": "42f6e013.13b69",

"type": "inject",

"z": "59165d4d.066034",

"name": "push2",

"topic": "",

"payload": "Clear",

"payloadType": "str",

"repeat": "",

"crontab": "",

"once": false,

"onceDelay": 0.1,

"x": 110,

"y": 820,

"wires": [

[

"b1978dba.68466"

]

]

},

{

"id": "7dd33aaa.12b2a4",

"type": "debug",

"z": "59165d4d.066034",

"name": "i2c channel devices",

"active": true,

"tosidebar": true,

"console": false,

"tostatus": false,

"complete": "payload",

"targetType": "msg",

"x": 550,

"y": 900,

"wires": []

},

{

"id": "a281a3c1.00d56",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "ffc1aa9d.ac4028",

"order": 3,

"width": 0,

"height": 0,

"name": "degC",

"label": "degC",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 160,

"wires": []

},

{

"id": "6588eab1.c5bdb4",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 620,

"y": 100,

"wires": [

[

"323c7e18.bdd8e2"

]

]

},

{

"id": "323c7e18.bdd8e2",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum",

"rules": [

{

"t": "set",

"p": "payload.value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 620,

"y": 160,

"wires": [

[

"a281a3c1.00d56",

"5b912629.f72478"

]

]

},

{

"id": "5b912629.f72478",

"type": "ui_gauge",

"z": "59165d4d.066034",

"name": "TankTemp",

"group": "ffc1aa9d.ac4028",

"order": 1,

"width": 0,

"height": 0,

"gtype": "donut",

"title": "Tank Temp",

"label": "degC",

"format": "{{value}}",

"min": 0,

"max": "40",

"colors": [

"#ff8040",

"#ff8000",

"#ff0000"

],

"seg1": "10",

"seg2": "30",

"x": 850,

"y": 100,

"wires": []

},

{

"id": "863f23ed.6ce2b",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "pHCmnd",

"address": "100",

"command": "082",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 120,

"y": 240,

"wires": [

[

"d76c2c51.1df71"

]

]

},

{

"id": "d76c2c51.1df71",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay2",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 240,

"wires": [

[

"4e84ff27.a688"

]

]

},

{

"id": "4e84ff27.a688",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "pHData",

"address": "100",

"command": "",

"count": "8",

"x": 460,

"y": 240,

"wires": [

[

"5e0af3d3.7bd6bc"

]

]

},

{

"id": "5e0af3d3.7bd6bc",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr2",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 630,

"y": 240,

"wires": [

[

"ac1f6728.22f578"

]

]

},

{

"id": "ac1f6728.22f578",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum2",

"rules": [

{

"t": "set",

"p": "payload.Value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 630,

"y": 300,

"wires": [

[

"7176c108.99433",

"6436f959.83a148"

]

]

},

{

"id": "7176c108.99433",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "ad7aabd5.7bf318",

"order": 5,

"width": 0,

"height": 0,

"name": "pH",

"label": "pH",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 300,

"wires": []

},

{

"id": "6436f959.83a148",

"type": "ui_level",

"z": "59165d4d.066034",

"group": "ad7aabd5.7bf318",

"order": 3,

"width": 0,

"height": 0,

"name": "TankpH",

"label": "",

"colorHi": "#8000ff",

"colorWarn": "#008080",

"colorNormal": "#ff0000",

"colorOff": "#595959",

"min": "4",

"max": "10",

"segWarn": "6",

"segHigh": "8.5",

"unit": "",

"layout": "sv",

"channelA": "",

"channelB": "",

"decimals": 0,

"animations": "soft",

"shape": "3",

"colorschema": "rainbow",

"textoptions": "default",

"colorText": "#eeeeee",

"fontLabel": "",

"fontValue": "",

"fontSmall": "",

"colorFromTheme": true,

"textAnimations": true,

"hideValue": true,

"tickmode": "segments",

"peakmode": false,

"peaktime": 3000,

"x": 840,

"y": 260,

"wires": []

},

{

"id": "4c96ce0f.154ec",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "FlowCmnd",

"address": "104",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 110,

"y": 520,

"wires": [

[

"fb7d7fe3.15b03"

]

]

},

{

"id": "fb7d7fe3.15b03",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay3",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 520,

"wires": [

[

"89af4958.9414b8"

]

]

},

{

"id": "89af4958.9414b8",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "FlowData",

"address": "104",

"command": "",

"count": "8",

"x": 460,

"y": 520,

"wires": [

[

"5e8a1754.f437d8",

"5f966686.1c2b78"

]

]

},

{

"id": "5e8a1754.f437d8",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr3",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 630,

"y": 520,

"wires": [

[

"6e7c1c2d.edae24"

]

]

},

{

"id": "6e7c1c2d.edae24",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum3",

"rules": [

{

"t": "set",

"p": "payload.Value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 630,

"y": 580,

"wires": [

[

"117ae2b.0951e1d",

"8b9f9a88.59a058"

]

]

},

{

"id": "117ae2b.0951e1d",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "b03ec9c2.970168",

"order": 3,

"width": 0,

"height": 0,

"name": "l/min",

"label": "l/min",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 580,

"wires": []

},

{

"id": "b1978dba.68466",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "TotClear",

"address": "104",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "8",

"x": 320,

"y": 820,

"wires": [

[

"418f9978.531ca8"

]

]

},

{

"id": "33f61e3b.8cb402",

"type": "inject",

"z": "59165d4d.066034",

"name": "push3",

"topic": "",

"payload": "",

"payloadType": "num",

"repeat": "",

"crontab": "",

"once": false,

"onceDelay": 0.1,

"x": 110,

"y": 900,

"wires": [

[

"54aae87c.830b48"

]

]

},

{

"id": "8b9f9a88.59a058",

"type": "ui_gauge",

"z": "59165d4d.066034",

"name": "PumpFlow",

"group": "b03ec9c2.970168",

"order": 1,

"width": 0,

"height": 0,

"gtype": "gage",

"title": "Pump Flow",

"label": "l/min",

"format": "{{value}}",

"min": 0,

"max": "30",

"colors": [

"#80ffff",

"#80ffff",

"#00ffff"

],

"seg1": "10",

"seg2": "20",

"x": 850,

"y": 520,

"wires": []

},

{

"id": "fea649a4.e13928",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "ad7aabd5.7bf318",

"order": 1,

"width": 0,

"height": 0,

"name": "pHLabel",

"label": "Tank pH",

"format": "",

"layout": "row-center",

"x": 840,

"y": 220,

"wires": []

},

{

"id": "fcfd20fc.fe16a",

"type": "i2c in",

"z": "59165d4d.066034",

"name": "ORPData",

"address": "98",

"command": "",

"count": "8",

"x": 460,

"y": 380,

"wires": [

[

"8fbadc49.54a87"

]

]

},

{

"id": "9214c7e3.12f458",

"type": "i2c out",

"z": "59165d4d.066034",

"name": "ORPCmnd",

"address": "98",

"command": "82",

"payload": "payload",

"payloadType": "msg",

"count": "1",

"x": 110,

"y": 380,

"wires": [

[

"49ba564f.5d51a8"

]

]

},

{

"id": "49ba564f.5d51a8",

"type": "delay",

"z": "59165d4d.066034",

"name": "delay1",

"pauseType": "delay",

"timeout": "1",

"timeoutUnits": "seconds",

"rate": "1",

"nbRateUnits": "1",

"rateUnits": "second",

"randomFirst": "1",

"randomLast": "5",

"randomUnits": "seconds",

"drop": false,

"x": 270,

"y": 380,

"wires": [

[

"fcfd20fc.fe16a"

]

]

},

{

"id": "e272ee73.d5b14",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "b2db3abe.0a63d8",

"order": 3,

"width": 0,

"height": 0,

"name": "mV",

"label": "mV",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 440,

"wires": []

},

{

"id": "8fbadc49.54a87",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 620,

"y": 380,

"wires": [

[

"98d203ea.9b3c2"

]

]

},

{

"id": "98d203ea.9b3c2",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum",

"rules": [

{

"t": "set",

"p": "payload.value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 620,

"y": 440,

"wires": [

[

"e272ee73.d5b14",

"7f98aed2.615d1"

]

]

},

{

"id": "7f98aed2.615d1",

"type": "ui_gauge",

"z": "59165d4d.066034",

"name": "TankORP",

"group": "b2db3abe.0a63d8",

"order": 1,

"width": 0,

"height": 0,

"gtype": "gage",

"title": "Tank ORP",

"label": "mV",

"format": "{{value}}",

"min": 0,

"max": "500",

"colors": [

"#00ff00",

"#ffff00",

"#ff0000"

],

"seg1": "275",

"seg2": "350",

"x": 840,

"y": 380,

"wires": []

},

{

"id": "a4f6724b.00d57",

"type": "function",

"z": "59165d4d.066034",

"name": "BuffToStr3",

"func": "msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;",

"outputs": 1,

"noerr": 0,

"x": 630,

"y": 640,

"wires": [

[

"7eb33ea4.484bc"

]

]

},

{

"id": "7eb33ea4.484bc",

"type": "change",

"z": "59165d4d.066034",

"name": "StrToNum3",

"rules": [

{

"t": "set",

"p": "payload.Value",

"pt": "msg",

"to": "",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 630,

"y": 700,

"wires": [

[

"6baa2964.726738"

]

]

},

{

"id": "6baa2964.726738",

"type": "ui_text",

"z": "59165d4d.066034",

"group": "b03ec9c2.970168",

"order": 3,

"width": 0,

"height": 0,

"name": "litres",

"label": "Total litres",

"format": "{{msg.payload}}",

"layout": "row-spread",

"x": 830,

"y": 700,

"wires": []

},

{

"id": "5f966686.1c2b78",

"type": "debug",

"z": "59165d4d.066034",

"name": "",

"active": true,

"tosidebar": true,

"console": false,

"tostatus": false,

"complete": "false",

"x": 630,

"y": 760,

"wires": []

},

{

"id": "ffc1aa9d.ac4028",

"type": "ui_group",

"z": "",

"name": "EZO RTD over i2c",

"tab": "ba830589.55bb38",

"order": 1,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "ad7aabd5.7bf318",

"type": "ui_group",

"z": "",

"name": "EZO pH over I2C",

"tab": "ba830589.55bb38",

"order": 2,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "b03ec9c2.970168",

"type": "ui_group",

"z": "",

"name": "EZO Flo over I2C",

"tab": "ba830589.55bb38",

"order": 4,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "b2db3abe.0a63d8",

"type": "ui_group",

"z": "",

"name": "EZO ORP over I2C",

"tab": "ba830589.55bb38",

"order": 3,

"disp": false,

"width": "5",

"collapse": false

},

{

"id": "ba830589.55bb38",

"type": "ui_tab",

"z": "",

"name": "RPI4-NodeRed-AtlasSciI2C",

"icon": "dashboard",

"disabled": false,

"hidden": false

}

]

I was also able to get communication with the EZO boards figured out through node-red-contrib-i2c! You are absolutely correct, these nodes are not the easiest to work with.

1588260276951.png


Documentation shows calibration (and other commands) should be able to process during continuous polling...

1588260321955.png


1588260597332.png


I have yet to try this...
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
I was also able to get communication with the EZO boards figured out through node-red-contrib-i2c! You are absolutely correct, these nodes are not the easiest to work with.
1588260276951.png

I cheat big time to calibrate the probes... I power down my Raspberry Pi4B that is running my Node-RED project on Raspbian Buster and then remove the Tentacle T3 that contains the Atlas-Sci stamps and attached sensors..... and then plug that T3 into my Raspberry Pi3B that runs the Atlas-Scientific IoT software on Windows10IoT.... and power it up.... Then I do all the calibrations right through the Atlas-Sci software... When done... power it down... I peel the Tentacle T3 off of the 3B and put it on my 4B and power that one up again. You can do that of course because the Atlas-Sci circuits store the calibration data on-board in a non-volatile memory... so they move with the circuits..

Yeah... I have to master sending long commands to the Circuits over i2c in my Node-RED apps to perform the calibrations locally while it's all hooked up to my 4B.

I suspect you are a bit more clever than I am with your Node-RED flow.... I'd be curious to see what you are doing in those change nodes... I know there are neater ways to format the results as well (my pump flow results need work)..

I'm going to paste my latest code (ignore that flow stuff is disabled... I can't hook up the meter on the existing test tank). This code has control added for temp and pH... I'm using a NCD-io 8ch relay board over i2c (yeah that's a difficult piece of kit as well with change nodes needed to select each channel as a topic).

DashboardUI.png
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
here's the flow:

Code:
[{"id":"59165d4d.066034","type":"tab","label":"Sensors","disabled":false,"info":""},{"id":"e00b8f43.9ccf9","type":"i2c in","z":"59165d4d.066034","name":"RTDData","address":"102","command":"","count":"8","x":120,"y":180,"wires":[["6588eab1.c5bdb4"]]},{"id":"791936ff.768018","type":"i2c out","z":"59165d4d.066034","name":"RTDCmnd","address":"102","command":"82","payload":"payload","payloadType":"msg","count":"1","x":110,"y":100,"wires":[["33df9f56.5deff"]]},{"id":"418f9978.531ca8","type":"debug","z":"59165d4d.066034","name":"RawBuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":520,"y":740,"wires":[]},{"id":"a9306c4d.c7cb9","type":"inject","z":"59165d4d.066034","name":"push1","topic":"","payload":"","payloadType":"num","repeat":"10","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":20,"wires":[["791936ff.768018","863f23ed.6ce2b","4c96ce0f.154ec","9214c7e3.12f458"]]},{"id":"33df9f56.5deff","type":"delay","z":"59165d4d.066034","name":"delay1","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":110,"y":140,"wires":[["e00b8f43.9ccf9"]]},{"id":"54aae87c.830b48","type":"i2c scan","z":"59165d4d.066034","name":"","x":320,"y":780,"wires":[["7dd33aaa.12b2a4"],[]]},{"id":"42f6e013.13b69","type":"inject","z":"59165d4d.066034","name":"push2","topic":"","payload":"Clear","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":740,"wires":[["b1978dba.68466"]]},{"id":"7dd33aaa.12b2a4","type":"debug","z":"59165d4d.066034","name":"i2c channel devices","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":550,"y":780,"wires":[]},{"id":"6588eab1.c5bdb4","type":"function","z":"59165d4d.066034","name":"BuffToStr1","func":"msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n  + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":100,"wires":[["323c7e18.bdd8e2"]]},{"id":"323c7e18.bdd8e2","type":"change","z":"59165d4d.066034","name":"StrToNum1","rules":[{"t":"set","p":"payload.value","pt":"msg","to":"","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":160,"wires":[["5b912629.f72478","1ab56f48.ad8f91"]]},{"id":"5b912629.f72478","type":"ui_gauge","z":"59165d4d.066034","name":"TankTemp","group":"ffc1aa9d.ac4028","order":1,"width":5,"height":4,"gtype":"donut","title":"Tank Temp","label":"degC","format":"{{value}}","min":0,"max":"40","colors":["#ff8040","#ff8000","#ff0000"],"seg1":"10","seg2":"30","x":650,"y":120,"wires":[]},{"id":"863f23ed.6ce2b","type":"i2c out","z":"59165d4d.066034","name":"pHCmnd","address":"100","command":"082","payload":"payload","payloadType":"msg","count":"1","x":120,"y":240,"wires":[["d76c2c51.1df71"]]},{"id":"d76c2c51.1df71","type":"delay","z":"59165d4d.066034","name":"delay2","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":110,"y":280,"wires":[["4e84ff27.a688"]]},{"id":"4e84ff27.a688","type":"i2c in","z":"59165d4d.066034","name":"pHData","address":"100","command":"","count":"8","x":120,"y":320,"wires":[["5e0af3d3.7bd6bc"]]},{"id":"5e0af3d3.7bd6bc","type":"function","z":"59165d4d.066034","name":"BuffToStr2","func":"msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n  + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":240,"wires":[["ac1f6728.22f578"]]},{"id":"ac1f6728.22f578","type":"change","z":"59165d4d.066034","name":"StrToNum2","rules":[{"t":"set","p":"payload.Value","pt":"msg","to":"","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":300,"wires":[["6436f959.83a148","adbe2f0c.98d94"]]},{"id":"6436f959.83a148","type":"ui_level","z":"59165d4d.066034","group":"ad7aabd5.7bf318","order":1,"width":5,"height":4,"name":"TankpH","label":"pH","colorHi":"#8000ff","colorWarn":"#00ff00","colorNormal":"#00ff00","colorOff":"#595959","min":"4.0","max":"10.0","segWarn":"6.0","segHigh":"8.0","unit":"","layout":"sv","channelA":"","channelB":"","decimals":"2","animations":"soft","shape":"3","colorschema":"rainbow","textoptions":"custom","colorText":"#eeeeee","fontLabel":"1.5","fontValue":"1.5","fontSmall":".75","colorFromTheme":true,"textAnimations":true,"hideValue":false,"tickmode":"segments","peakmode":false,"peaktime":3000,"x":640,"y":260,"wires":[]},{"id":"4c96ce0f.154ec","type":"i2c out","z":"59165d4d.066034","d":true,"name":"FlowCmnd","address":"104","command":"82","payload":"payload","payloadType":"msg","count":"1","x":110,"y":520,"wires":[["fb7d7fe3.15b03"]]},{"id":"fb7d7fe3.15b03","type":"delay","z":"59165d4d.066034","name":"delay4","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":110,"y":560,"wires":[["89af4958.9414b8"]]},{"id":"89af4958.9414b8","type":"i2c in","z":"59165d4d.066034","d":true,"name":"FlowData","address":"104","command":"","count":"8","x":120,"y":620,"wires":[["5e8a1754.f437d8","a4f6724b.00d57"]]},{"id":"5e8a1754.f437d8","type":"function","z":"59165d4d.066034","name":"BuffToStr4a","func":"msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n  + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":520,"wires":[["6e7c1c2d.edae24"]]},{"id":"6e7c1c2d.edae24","type":"change","z":"59165d4d.066034","name":"StrToNum4a","rules":[{"t":"set","p":"payload.Value","pt":"msg","to":"","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":580,"wires":[["117ae2b.0951e1d","8b9f9a88.59a058"]]},{"id":"117ae2b.0951e1d","type":"ui_text","z":"59165d4d.066034","group":"b03ec9c2.970168","order":3,"width":0,"height":0,"name":"l/min","label":"l/min","format":"{{msg.payload}}","layout":"row-spread","x":630,"y":580,"wires":[]},{"id":"b1978dba.68466","type":"i2c out","z":"59165d4d.066034","name":"TotClear","address":"104","command":"","payload":"payload","payloadType":"bin","count":"8","x":320,"y":740,"wires":[["418f9978.531ca8"]]},{"id":"33f61e3b.8cb402","type":"inject","z":"59165d4d.066034","name":"push3","topic":"","payload":"","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":780,"wires":[["54aae87c.830b48"]]},{"id":"8b9f9a88.59a058","type":"ui_gauge","z":"59165d4d.066034","name":"PumpFlow","group":"b03ec9c2.970168","order":1,"width":5,"height":4,"gtype":"wave","title":"Pump Flow","label":"l/min","format":"{{value}}","min":0,"max":"30","colors":["#d7ffff","#80ffff","#00ffff"],"seg1":"10","seg2":"20","x":650,"y":520,"wires":[]},{"id":"fcfd20fc.fe16a","type":"i2c in","z":"59165d4d.066034","name":"ORPData","address":"98","command":"","count":"8","x":120,"y":460,"wires":[["8fbadc49.54a87"]]},{"id":"9214c7e3.12f458","type":"i2c out","z":"59165d4d.066034","name":"ORPCmnd","address":"98","command":"82","payload":"payload","payloadType":"msg","count":"1","x":110,"y":380,"wires":[["49ba564f.5d51a8"]]},{"id":"49ba564f.5d51a8","type":"delay","z":"59165d4d.066034","name":"delay3","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":110,"y":420,"wires":[["fcfd20fc.fe16a"]]},{"id":"e272ee73.d5b14","type":"ui_text","z":"59165d4d.066034","group":"b2db3abe.0a63d8","order":3,"width":0,"height":0,"name":"mV","label":"mV","format":"{{msg.payload}}","layout":"row-spread","x":630,"y":440,"wires":[]},{"id":"8fbadc49.54a87","type":"function","z":"59165d4d.066034","name":"BuffToStr3","func":"msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n  + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":380,"wires":[["98d203ea.9b3c2"]]},{"id":"98d203ea.9b3c2","type":"change","z":"59165d4d.066034","name":"StrToNum3","rules":[{"t":"set","p":"payload.value","pt":"msg","to":"","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":440,"wires":[["e272ee73.d5b14","7f98aed2.615d1"]]},{"id":"7f98aed2.615d1","type":"ui_gauge","z":"59165d4d.066034","name":"TankORP","group":"b2db3abe.0a63d8","order":1,"width":5,"height":4,"gtype":"gage","title":"Tank ORP","label":"mV","format":"{{value}}","min":0,"max":"500","colors":["#00ff00","#ffff00","#ff0000"],"seg1":"275","seg2":"350","x":640,"y":380,"wires":[]},{"id":"a4f6724b.00d57","type":"function","z":"59165d4d.066034","name":"BuffToStr4b","func":"msg.payload = (String.fromCharCode(msg.payload[1])) + (String.fromCharCode(msg.payload[2]))\n + (String.fromCharCode(msg.payload[3])) + (String.fromCharCode(msg.payload[4]))\n  + (String.fromCharCode(msg.payload[5])) + (String.fromCharCode(msg.payload[6]));\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":640,"wires":[["7eb33ea4.484bc"]]},{"id":"7eb33ea4.484bc","type":"change","z":"59165d4d.066034","name":"StrToNum4b","rules":[{"t":"set","p":"payload.Value","pt":"msg","to":"","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":700,"wires":[["6baa2964.726738"]]},{"id":"6baa2964.726738","type":"ui_text","z":"59165d4d.066034","group":"b03ec9c2.970168","order":4,"width":0,"height":0,"name":"litres","label":"Total litres","format":"{{msg.payload}}","layout":"row-spread","x":630,"y":700,"wires":[]},{"id":"767048b8.04b1e8","type":"ui_slider","z":"59165d4d.066034","name":"TempSetpoint","label":"sp","tooltip":"Desired Temperature","group":"ffc1aa9d.ac4028","order":2,"width":5,"height":1,"passthru":false,"outs":"end","topic":"","min":"25","max":"32","step":1,"x":660,"y":180,"wires":[[]]},{"id":"832b804.3822b8","type":"ui_slider","z":"59165d4d.066034","name":"pHSetpoint","label":"sp","tooltip":"Desired pH","group":"ad7aabd5.7bf318","order":2,"width":5,"height":1,"passthru":false,"outs":"end","topic":"","min":"5.5","max":"9.5","step":".1","x":650,"y":320,"wires":[[]]},{"id":"1ab56f48.ad8f91","type":"ramp-thermostat","z":"59165d4d.066034","name":"TempCtrl","profile":"f15ee116.77d49","hysteresisplus":".25","hysteresisminus":".25","x":500,"y":160,"wires":[["a7be1c66.ddc8f"],[],["767048b8.04b1e8"]]},{"id":"d4c352ba.e030e","type":"ui_led","z":"59165d4d.066034","group":"ffc1aa9d.ac4028","order":3,"width":5,"height":2,"label":"Heater","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"allowColorForValueInMessage":false,"name":"Heater","x":1230,"y":100,"wires":[]},{"id":"adbe2f0c.98d94","type":"ramp-thermostat","z":"59165d4d.066034","name":"pHCtrl","profile":"965190ba.83e9b","hysteresisplus":".1","hysteresisminus":".1","x":490,"y":300,"wires":[["a0455e.c7afeaa"],[],["832b804.3822b8"]]},{"id":"8fd0d458.8ba688","type":"ui_led","z":"59165d4d.066034","group":"ad7aabd5.7bf318","order":3,"width":5,"height":2,"label":"CO2","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"allowColorForValueInMessage":false,"name":"CO2","x":1230,"y":140,"wires":[]},{"id":"35e019aa.b80d66","type":"ncd-mcp23008","z":"59165d4d.066034","name":"NCD-GPRelayCtrlr","connection":"aa1e3ead.646b2","addr":"32","interval":"100","onchange":true,"send_init":false,"outputs":9,"output_all":true,"interrupt":0,"io_1":1,"io_2":1,"io_3":1,"io_4":1,"io_5":1,"io_6":1,"io_7":1,"io_8":1,"persist":"","startup":"","x":1050,"y":200,"wires":[["d4c352ba.e030e"],["8fd0d458.8ba688"],[],[],[],[],[],[],[]]},{"id":"a7be1c66.ddc8f","type":"change","z":"59165d4d.066034","name":"RelayCh1Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"channel_1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":140,"wires":[["35e019aa.b80d66"]]},{"id":"cd643120.10061","type":"change","z":"59165d4d.066034","name":"RelayCh2Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"channel_2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":280,"wires":[["35e019aa.b80d66"]]},{"id":"a0455e.c7afeaa","type":"function","z":"59165d4d.066034","name":"ChgDirectAct","func":"if (msg.payload === false)\n{msg.payload=true}\nelse \n{msg.payload=false}\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":240,"wires":[["cd643120.10061"]]},{"id":"4a410a71.d5f3f4","type":"comment","z":"59165d4d.066034","name":"Flow Temporarily Disabled","info":"Flow is temporarily disabled as there are not provisions in the current test tank.\nFurthermore, the Atlas-Sci non-iso carrier board needs to be re-worked (bad solder)","x":830,"y":580,"wires":[]},{"id":"ffc1aa9d.ac4028","type":"ui_group","z":"","name":"EZO RTD over i2c","tab":"ba830589.55bb38","order":1,"disp":false,"width":"5","collapse":false},{"id":"ad7aabd5.7bf318","type":"ui_group","z":"","name":"EZO pH over I2C","tab":"ba830589.55bb38","order":2,"disp":false,"width":"5","collapse":false},{"id":"b03ec9c2.970168","type":"ui_group","z":"","name":"EZO Flo over I2C","tab":"ba830589.55bb38","order":4,"disp":false,"width":"5","collapse":false},{"id":"b2db3abe.0a63d8","type":"ui_group","z":"","name":"EZO ORP over I2C","tab":"ba830589.55bb38","order":3,"disp":false,"width":"5","collapse":false},{"id":"f15ee116.77d49","type":"profile","z":"","name":"SchedTemp","time1":"00:00","temp1":"27","time2":"23:59","temp2":"27","time3":"","temp3":"","time4":"","temp4":"","time5":"","temp5":"","time6":"","temp6":"","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"965190ba.83e9b","type":"profile","z":"","name":"SchedpH","time1":"00:00","temp1":"7.0","time2":"23:59","temp2":"7.0","time3":"","temp3":"","time4":"","temp4":"","time5":"","temp5":"","time6":"","temp6":"","time7":"","temp7":"","time8":"","temp8":"","time9":"","temp9":"","time10":"","temp10":""},{"id":"aa1e3ead.646b2","type":"ncd-comm","z":"","name":"Pi-i2c-1-Bus","bus":"i2c-1","commType":"standard","addr":"0","useMux":false,"muxAddr":"112","muxPort":"0"},{"id":"ba830589.55bb38","type":"ui_tab","z":"","name":"Sensor Display","icon":"dashboard","disabled":false,"hidden":false}]
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
I cheat big time to calibrate the probes... I power down my Raspberry Pi4B that is running my Node-RED project on Raspbian Buster and then remove the Tentacle T3 that contains the Atlas-Sci stamps and attached sensors..... and then plug that T3 into my Raspberry Pi3B that runs the Atlas-Scientific IoT software on Windows10IoT.... and power it up.... Then I do all the calibrations right through the Atlas-Sci software... When done... power it down... I peel the Tentacle T3 off of the 3B and put it on my 4B and power that one up again. You can do that of course because the Atlas-Sci circuits store the calibration data on-board in a non-volatile memory... so they move with the circuits..

Yeah... I have to master sending long commands to the Circuits over i2c in my Node-RED apps to perform the calibrations locally while it's all hooked up to my 4B.

I suspect you are a bit more clever than I am with your Node-RED flow.... I'd be curious to see what you are doing in those change nodes... I know there are neater ways to format the results as well (my pump flow results need work)..

I'm going to paste my latest code (ignore that flow stuff is disabled... I can't hook up the meter on the existing test tank). This code has control added for temp and pH... I'm using a NCD-io 8ch relay board over i2c (yeah that's a difficult piece of kit as well with change nodes needed to select each channel as a topic).

DashboardUI.png
Good way to "cheat", however the temperature compensation value is not saved on power off...this could cause some variance in your readings.

1588283838333.png


Here is the flow for I2C communication with ezo boards...

JSON:
[{"id":"ba2a9d0c.277e1","type":"tab","label":"Probes","disabled":false,"info":""},{"id":"c8d57b54.de5f48","type":"i2c scan","z":"ba2a9d0c.277e1","name":"","x":500,"y":60,"wires":[[],[]]},{"id":"a5b7e492.c7ba48","type":"inject","z":"ba2a9d0c.277e1","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":60,"wires":[["c8d57b54.de5f48"]]},{"id":"ea13210e.f8fd8","type":"inject","z":"ba2a9d0c.277e1","name":"Poll","topic":"","payload":"","payloadType":"str","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":180,"wires":[["e2059474.00d058","7e58a38e.72bccc","84ba3e32.49d5b"]]},{"id":"4f1e6a02.25f274","type":"i2c out","z":"ba2a9d0c.277e1","name":"","address":"","command":"","payload":"payload","payloadType":"msg","count":"1","x":500,"y":140,"wires":[["5aa5e12a.7a96e"]]},{"id":"81517249.37863","type":"i2c in","z":"ba2a9d0c.277e1","name":"","address":"99","command":"","count":"7","x":850,"y":140,"wires":[[]]},{"id":"5aa5e12a.7a96e","type":"delay","z":"ba2a9d0c.277e1","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":670,"y":140,"wires":[["81517249.37863"]]},{"id":"e2059474.00d058","type":"change","z":"ba2a9d0c.277e1","name":"","rules":[{"t":"set","p":"address","pt":"msg","to":"99","tot":"num"},{"t":"set","p":"command","pt":"msg","to":"082","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":140,"wires":[["4f1e6a02.25f274"]]},{"id":"7e58a38e.72bccc","type":"change","z":"ba2a9d0c.277e1","name":"","rules":[{"t":"set","p":"address","pt":"msg","to":"98","tot":"num"},{"t":"set","p":"command","pt":"msg","to":"082","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":180,"wires":[["43309174.61b2a"]]},{"id":"84ba3e32.49d5b","type":"change","z":"ba2a9d0c.277e1","name":"","rules":[{"t":"set","p":"address","pt":"msg","to":"102","tot":"num"},{"t":"set","p":"command","pt":"msg","to":"082","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":220,"wires":[["b3741f9.3914ee"]]},{"id":"43309174.61b2a","type":"i2c out","z":"ba2a9d0c.277e1","name":"","address":"","command":"","payload":"payload","payloadType":"msg","count":"1","x":500,"y":180,"wires":[["a4dcd168.a62de"]]},{"id":"53c9cd29.3239a4","type":"i2c in","z":"ba2a9d0c.277e1","name":"","address":"98","command":"","count":"7","x":850,"y":180,"wires":[[]]},{"id":"a4dcd168.a62de","type":"delay","z":"ba2a9d0c.277e1","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":670,"y":180,"wires":[["53c9cd29.3239a4"]]},{"id":"b3741f9.3914ee","type":"i2c out","z":"ba2a9d0c.277e1","name":"","address":"","command":"","payload":"payload","payloadType":"msg","count":"1","x":500,"y":220,"wires":[["7592e473.4a997c"]]},{"id":"47c595d1.14dfcc","type":"i2c in","z":"ba2a9d0c.277e1","name":"","address":"102","command":"","count":"7","x":850,"y":220,"wires":[[]]},{"id":"7592e473.4a997c","type":"delay","z":"ba2a9d0c.277e1","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":670,"y":220,"wires":[["47c595d1.14dfcc"]]}]
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
Good way to "cheat", however the temperature compensation value is not saved on power off...this could cause some variance in your readings.

Here is the flow for I2C communication with ezo boards...

Yeah, I see that with my readings. Definitely need to get the commands working for calibration, temperature compensation and other things (resetting water flow total).

Thank you very much for the flow... I will look at it immediately after dinner! Update: Ok, I checked it out... you are doing the same thing in the change nodes that i accomplished directly in the i2c_out node. I was hoping you were sending some really complex commands, so that i could learn from your genius! :) We are both struggling with this one together.

I began a thread on the Node-RED forums... basically as a way for folks to comment/critique... (I referenced your build thread here too...). That way programming specific questions can get answered there:

Sonora Technical's (me) Aquarium Controller Thread
 
Last edited:
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Yeah, I see that with my readings. Definitely need to get the commands working for calibration, temperature compensation and other things (resetting water flow total).

Thank you very much for the flow... I will look at it immediately after dinner!
I began a thread on the Node-RED forums... basically as a way for folks to comment/critique... (I referenced your build thread here too...). That way programming specific questions can get answered there:

Sonora Technical's (me) Aquarium Controller Thread
Awesome! I’ll check it out. Once I receive all my components for this controller I’ll start a thread in the Aquarium Controller forum to track all this.
 

FischAutoTechGarten

Community Member
View Badges
Joined
Mar 19, 2020
Messages
37
Reaction score
40
Rating - 0%
0   0   0
... however the temperature compensation value is not saved on power off...this could cause some variance in your readings.

I figured it out. I have figured out sending complex commands to the Atlas-Scientific Circuits over i2c using the Node-RED-contrib-i2c nodes. So I can feed it a temperature compensation (and do calibrations too)... Checkout my Node-RED forums thread I referenced a couple of posts up.... I put the code there....
 
OP
OP
MaddyP

MaddyP

'Til Reefdom Come...
View Badges
Joined
Jul 21, 2016
Messages
1,907
Reaction score
4,530
Location
Vancouver, WA
Rating - 0%
0   0   0
Started a separate thread to detail the controller build! Moving forward all development on the controller will be documented there...

 

swiss1939

Active Member
View Badges
Joined
May 6, 2020
Messages
448
Reaction score
447
Location
NYC
Rating - 0%
0   0   0
If there were ever a 12G nano that was over-engineered more.. I would be shocked! Tank cost a fraction of all the parts! Love it and can't wait to see it full of life! Funny, I was thinking of using the same 12G tank myself to fit into a strange cubby shelf in my kitchen and was proud of myself for finding ways to make it fit with very little room overhead by using super thin reef brite strip leds hidden in the tiny space above it! This thread put me in my place. ;)
 

More than just hot air: Is there a Pufferfish in your aquarium?

  • There is currently a pufferfish in my aquarium.

    Votes: 32 17.4%
  • There is not currently a pufferfish in my aquarium, but I have kept one in the past.

    Votes: 32 17.4%
  • There has never been a pufferfish in my aquarium, but I plan to keep one in the future.

    Votes: 33 17.9%
  • I have no plans to keep a pufferfish in my aquarium.

    Votes: 79 42.9%
  • Other.

    Votes: 8 4.3%
Back
Top