DIY Grow Room Automation w/ Node-Red

Home Assistant automation projects, questions, etc. go here.
User avatar
gvbz
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 37
Joined: Thu Apr 02, 2020 3:30 pm

jaysal wrote:
Wed Jun 24, 2020 4:40 am
Hey gvbz,
I was wondering if you can help me out with function node in the VPD calculation? Specifically line 2 in the code below... I think I need to change the message from my sensor to pass msg.humidity vs the default message which is msg.payload. I cannot figure out how to accomplish that.

function node math.PNG
No problem! I just ran into this same issue so I learned about context information in node red. Check out the updated code on github in the LVPD node, there is an example on how to use global variables in a function block:
Capture.PNG
First pass your humidity into a global variable using the Change node, you could do the same with temperature also, then it can be used in any function without being passed in. Exactly how I'm doing with the leaf temperature manual entry variable:
Capture4.PNG
Capture4.PNG (7.63 KiB) Viewed 3736 times
Here is some more information about working with context in Node-Red:

https://nodered.org/docs/user-guide/context
480W Bridgelux EB Gen3 Parallel Build: https://bit.ly/2NfoVyE
Grow Room Automation w/ Node Red: https://bit.ly/3hOm5yK
Github: https://github.com/gvbz/gardenbro
Instagram: @loudfarms_ca
User avatar
gvbz
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 37
Joined: Thu Apr 02, 2020 3:30 pm

jaysal wrote:
Tue Jun 23, 2020 12:08 am
Yes, I am using an ESP32 to connect my temperature sensors and the L298N Motor Drive Controller. The ESP32 connects via Wi-Fi to Home Assistant and Node-Red which is currently running on a RP4.

I have the L298N connected to a 12V 150CFM fan (computer fan) for testing, I have not yet purchased an EC style inline fans (I would like three; air intake, air exhaust and humidity exhaust) that would go inside my grow environment. I am 30 days out from harvest so I don't want to make any drastic changes at the moment.

What model EC fan do you have? Most likely you can use the L298N.

What is the best way to share the code? ESP code will fit here but probably not the best for Node-RED code. I will zip the json and attach for now.

fan pwm.zip
Yeah fair enough, I'm in the same boat and harvesting in a couple days here, then my entire flower room gets swung over to Node-Red from the Arduino. That fan controller is really interesting, what I'm going to do is take apart the little control box and upload some pics. Maybe you guys can steer me in the right direction.

This is the model here: https://amzn.to/3i2uMpn

For sharing NR code, you can upload a notepad file with the exported code pasted in. Thanks a lot for uploading the fan PWM stuff, I got a couple of ESPs on the way and that will definitely help me get going.
480W Bridgelux EB Gen3 Parallel Build: https://bit.ly/2NfoVyE
Grow Room Automation w/ Node Red: https://bit.ly/3hOm5yK
Github: https://github.com/gvbz/gardenbro
Instagram: @loudfarms_ca
jaysal
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 75
Joined: Sat May 30, 2020 7:49 am

LEDG wrote:
Thu Jun 25, 2020 1:38 pm
I’ve also been tinkering with my PWM fan control. I’m now using a MOSFET (must be logic level, I’m using digi-key part number IRLZ44NPBF-ND http://d.digikey.com/c01Q0BQS3NpX0Z7KS053y00) and a PWM pin on an ESP32 and it works well.
Awesome, perhaps you can go over it in one of your yt videos if you feel the implementation works well.
Gromyjoe
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 48
Joined: Fri Jul 03, 2020 2:28 pm

is it possible to take your configuration files and just change the devices to match mine?
im totally new to this, but hae been playing around with mozilla webthings for awhile now.
Piglet
LED-Curious
LED-Curious
Reactions:
Posts: 4
Joined: Mon Jun 29, 2020 12:29 am

Dope sh*t man. Project is all nice and PWM will work grate. I plan to do same, LEDs, fans and one submersible pump controlled via ESP32 with HA or NR. But after this post i ll try at first NR.

Thx for posting !
User avatar
gvbz
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 37
Joined: Thu Apr 02, 2020 3:30 pm

Gromyjoe wrote:
Sat Jul 04, 2020 8:58 pm
is it possible to take your configuration files and just change the devices to match mine?
im totally new to this, but hae been playing around with mozilla webthings for awhile now.
Yup that's the exact intent. It's not a plug and play system, but with a bit of configuration and learning on your end, you can easily apply it to your room. The github page has been updated with some instructions on how to get up and running, and even re-configure the wireless devices for your application.

If this is your first go, I would start with a cheap DHT22 sensor.
480W Bridgelux EB Gen3 Parallel Build: https://bit.ly/2NfoVyE
Grow Room Automation w/ Node Red: https://bit.ly/3hOm5yK
Github: https://github.com/gvbz/gardenbro
Instagram: @loudfarms_ca
joshybizzle
LED-Curious
LED-Curious
Reactions:
Posts: 2
Joined: Thu Jun 18, 2020 8:29 pm

gvbz wrote:
Tue Jul 07, 2020 7:21 pm
Gromyjoe wrote:
Sat Jul 04, 2020 8:58 pm
is it possible to take your configuration files and just change the devices to match mine?
im totally new to this, but hae been playing around with mozilla webthings for awhile now.
Yup that's the exact intent. It's not a plug and play system, but with a bit of configuration and learning on your end, you can easily apply it to your room. The github page has been updated with some instructions on how to get up and running, and even re-configure the wireless devices for your application.

If this is your first go, I would start with a cheap DHT22 sensor.
I'd say in my opinion a BME280 is a more reliable and durable sensor than the DHT22, probably better for a beginner too.. Very easily implemented with HA via i2c and doesn't need a resistor soldering onto the data line. Pretty much the same price as the DHT22 as well :)
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

joshybizzle wrote:
Tue Jul 07, 2020 11:39 pm
gvbz wrote:
Tue Jul 07, 2020 7:21 pm
Gromyjoe wrote:
Sat Jul 04, 2020 8:58 pm
is it possible to take your configuration files and just change the devices to match mine?
im totally new to this, but hae been playing around with mozilla webthings for awhile now.
Yup that's the exact intent. It's not a plug and play system, but with a bit of configuration and learning on your end, you can easily apply it to your room. The github page has been updated with some instructions on how to get up and running, and even re-configure the wireless devices for your application.

If this is your first go, I would start with a cheap DHT22 sensor.
I'd say in my opinion a BME280 is a more reliable and durable sensor than the DHT22, probably better for a beginner too.. Very easily implemented with HA via i2c and doesn't need a resistor soldering onto the data line. Pretty much the same price as the DHT22 as well :)
I bought 5x DHT22 and they were all very unreliable. Tried from a different seller and got the same result, so I converted to BME280s, which, even as knockoffs (which I'm positive they are), they're still much more consistent. The only crappy things about them is that you usually have to solder pins to the boards you'll find on amazon and that you can only use 2 of them per bus... and to change the ID you have to scratch out a trace on the board and then solder a couple points together. Worth it though IMO.
Want to Support the Site?

Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
User avatar
LEDG
Site Admin
Reactions:
Posts: 1599
Joined: Sun Jun 04, 2017 8:15 pm

Stickying this thread since it's a great resource.
Want to Support the Site?

Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
User avatar
gvbz
LED Enthusiast
LED Enthusiast
Reactions:
Posts: 37
Joined: Thu Apr 02, 2020 3:30 pm

joshybizzle wrote:
Tue Jul 07, 2020 11:39 pm
gvbz wrote:
Tue Jul 07, 2020 7:21 pm
Gromyjoe wrote:
Sat Jul 04, 2020 8:58 pm
is it possible to take your configuration files and just change the devices to match mine?
im totally new to this, but hae been playing around with mozilla webthings for awhile now.
Yup that's the exact intent. It's not a plug and play system, but with a bit of configuration and learning on your end, you can easily apply it to your room. The github page has been updated with some instructions on how to get up and running, and even re-configure the wireless devices for your application.

If this is your first go, I would start with a cheap DHT22 sensor.
I'd say in my opinion a BME280 is a more reliable and durable sensor than the DHT22, probably better for a beginner too.. Very easily implemented with HA via i2c and doesn't need a resistor soldering onto the data line. Pretty much the same price as the DHT22 as well :)
I definitely agree, the better quality sensor you use, the better the result. DHT22s usually come with the pi kits which is why I mentioned it for a complete beginner. I've gotten some pretty decent results by adjusting the value based on an accurate source but they are indeed terrible. There are plenty of BME280 nodes if you don't mind getting into i2c: https://flows.nodered.org/node/node-red-contrib-bme280

The RuuviTag uses a BME280 and for 30$ it has been the best sensor for me hands down.
480W Bridgelux EB Gen3 Parallel Build: https://bit.ly/2NfoVyE
Grow Room Automation w/ Node Red: https://bit.ly/3hOm5yK
Github: https://github.com/gvbz/gardenbro
Instagram: @loudfarms_ca
Post Reply