How do I link the Grow Sensor with Home Assistant

1

Flash Home Assistant OS onto the SD card and put it into the RPI. (This is easily done by using

(This is easily done by using Raspberry Pi Imager available here https://www.raspberrypi.com/software/, choose the Home Assistant image option)

2

Connect the RPi to the router with a network cable.

Connect in browser at http://homeassistant.local:8123/

First time run takes its time!

3

Choose to create my Smart Home

You’ll be prompted to create a user

The fresh HA Overview will now look like this

4

The grow sensor will connect to an MQTT broker that will run on the HA device.

5

Install the MQTT broker on HA

Go to Settings -> Add-ons -> Add-on Store

Install the Mosquitto Broker Add-on and check it’s configured to start on boot.

Start the broker

6

Configure the Grow Sensor (get one here) to connect to your HA MQTT broker using the Grow Sensor App.

7

Set up MQTT integration in Home Assistant

Configure the MQTT broker. Go to Settings -> Devices and Services. The installed MQTT add-on should have been discovered. Add it to your configuration by choosing ADD.

8

Check that Grow Sensor data is being received by the broker and find your topic: Settings -> Devices and Services -> MQTT -> Configure (symbol)

Listen to a topic. Enter # as the topic which allows all messages on the mqtt broker to be displayed for you.

Press START LISTENING and wait for data to arrive. It can take up to 3 minutes because the standard sensor refresh time is 3 minutes

IMPORTANT: Extract the topic from this screen as you need it for the Sensor integration step. In this example, the topic is GROW/GROW-00070006

Option 1. Integrating sensors using MQTT discovery - The sensor does not send a discovery message, so we must send it manually to the HA mqtt broker.

  • Settings -> Devices and Services -> MQTT -> Configure (symbol)

  • The following example text needs to be modified to have the same topic structure and sensor_id that you see on the broker. I.e. Find/Replace 70006 with your sensor’s ID.

  • Each message below must be published on its own topic below with retain:


Topic: homeassistant/sensor/7000601/config 
Message: {"name": "70006 Temperature", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r1val }}", "unit_of_measurement": "°C", "unique_id": "7000601"}

Topic: homeassistant/sensor/7000602/config 
Message: {"name": "70006 Humidity", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r2val }}", "unit_of_measurement": "%", "unique_id": "7000602"}

Topic: homeassistant/sensor/7000603/config 
Message: {"name": "70006 Pressure", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r3val }}", "unit_of_measurement": "mBar", "unique_id": "7000603"}

Topic: homeassistant/sensor/7000604/config 
Message: {"name": "70006 Dew Point", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r4val }}", "unit_of_measurement": "°C", "unique_id": "7000604"}

Topic: homeassistant/sensor/7000605/config 
Message: {"name": "70006 Dew Point Gap", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r5val }}", "unit_of_measurement": "°C", "unique_id": "7000605"}

Topic: homeassistant/sensor/7000606/config 
Message: {"name": "70006 CO2", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r6val }}", "unit_of_measurement": "ppm", "unique_id": "7000606"}

Topic: homeassistant/sensor/7000607/config 
Message: {"name": "70006 Ambient VPD", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r7val }}", "unit_of_measurement": "kPa", "unique_id": "7000607"}

Topic: homeassistant/sensor/7000608/config 
Message: {"name": "70006 Leaf Temp", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r8val }}", "unit_of_measurement": "°C", "unique_id": "7000608"}

Topic: homeassistant/sensor/7000609/config 
Message: {"name": "70006 ePPFD", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r9val }}", "unit_of_measurement": "µmol/s/m2", "unique_id": "7000609"}

Topic: homeassistant/sensor/7000610/config 
Message: {"name": "70006 RQLI Red", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r10val }}", "unit_of_measurement": "%", "unique_id": "7000610"}

Topic: homeassistant/sensor/7000611/config 
Message: {"name": "70006 RQLI Green", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r11val }}", "unit_of_measurement": "%", "unique_id": "7000611"}

Topic: homeassistant/sensor/7000612/config 
Message: {"name": "70006 RQLI Blue", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r12val }}", "unit_of_measurement": "%", "unique_id": "7000612"}

Topic: homeassistant/sensor/7000613/config 
Message: {"name": "70006 RQLI IR", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r13val }}", "unit_of_measurement": "%", "unique_id": "7000613"}

Topic: homeassistant/sensor/7000614/config 
Message: {"name": "70006 eDLI", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r14val }}", "unit_of_measurement": "mol/m2/d", "unique_id": "7000614"}

Topic: homeassistant/sensor/7000615/config 
Message: {"name": "70006 Substrate Moisture", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r15val }}", "unit_of_measurement": "%", "unique_id": "7000615"}

Topic: homeassistant/sensor/7000616/config 
Message: {"name": "70006 Substrate ECp", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r16val }}", "unit_of_measurement": "mS/cm", "unique_id": "7000616"}

Topic: homeassistant/sensor/7000617/config 
Message: {"name": "70006 Substrate Temp", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r17val }}", "unit_of_measurement": "°C", "unique_id": "7000617"}

Topic: homeassistant/sensor/7000618/config 
Message: {"name": "70006 Leaf VPD", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r18val }}", "unit_of_measurement": "kPa", "unique_id": "7000618"}

Topic: homeassistant/sensor/7000619/config 
Message: {"name": "70006 Ambient Leaf difference", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r19val }}", "unit_of_measurement": "°C", "unique_id": "7000619"}

Alternatively, they can all be done together by pasting the following into a CLI terminal. (Need to download the Terminal Add-on)

mosquitto_pub -h localhost -t homeassistant/sensor/7000601/config -r -m '{"name": "70006 Temperature", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r1val }}", "unit_of_measurement": "°C", "unique_id": "7000601"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000602/config -r -m '{"name": "70006 Humidity", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r2val }}", "unit_of_measurement": "%", "unique_id": "7000602"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000603/config -r -m '{"name": "70006 Pressure", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r3val }}", "unit_of_measurement": "mBar", "unique_id": "7000603"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000604/config -r -m '{"name": "70006 Dew Point", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r4val }}", "unit_of_measurement": "°C", "unique_id": "7000604"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000605/config -r -m '{"name": "70006 Dew Point Gap", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r5val }}", "unit_of_measurement": "°C", "unique_id": "7000605"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000606/config -r -m '{"name": "70006 CO2", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r6val }}", "unit_of_measurement": "ppm", "unique_id": "7000606"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000607/config -r -m '{"name": "70006 Ambient VPD", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r7val }}", "unit_of_measurement": "kPa", "unique_id": "7000607"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000608/config -r -m '{"name": "70006 Leaf Temp", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r8val }}", "unit_of_measurement": "°C", "unique_id": "7000608"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000609/config -r -m '{"name": "70006 ePPFD", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r9val }}", "unit_of_measurement": "µmol/s/m2", "unique_id": "7000609"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000610/config -r -m '{"name": "70006 RQLI Red", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r10val }}", "unit_of_measurement": "%", "unique_id": "7000610"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000611/config -r -m '{"name": "70006 RQLI Green", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r11val }}", "unit_of_measurement": "%", "unique_id": "7000611"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000612/config -r -m '{"name": "70006 RQLI Blue", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r12val }}", "unit_of_measurement": "%", "unique_id": "7000612"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000613/config -r -m '{"name": "70006 RQLI IR", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r13val }}", "unit_of_measurement": "%", "unique_id": "7000613"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000614/config -r -m '{"name": "70006 eDLI", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r14val }}", "unit_of_measurement": "mol/m2/d", "unique_id": "7000614"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000615/config -r -m '{"name": "70006 Substrate Moisture", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r15val }}", "unit_of_measurement": "%", "unique_id": "7000615"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000616/config -r -m '{"name": "70006 Substrate ECp", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r16val }}", "unit_of_measurement": "mS/cm", "unique_id": "7000616"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000617/config -r -m '{"name": "70006 Substrate Temp", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r17val }}", "unit_of_measurement": "°C", "unique_id": "7000617"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000618/config -r -m '{"name": "70006 Leaf VPD", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r18val }}", "unit_of_measurement": "kPa", "unique_id": "7000618"}'
mosquitto_pub -h localhost -t homeassistant/sensor/7000619/config -r -m '{"name": "70006 Ambient Leaf difference", "state_topic": "GROW/GROW-00070006", "value_template": "{{ value_json.r19val }}", "unit_of_measurement": "°C", "unique_id": "7000619"}'

Option 2. Integrating the sensors into HA by editing configuration.yaml

Pros: one step

Cons: slightly less flexibility in the Home Assistant UI

Now that HA is receiving data, we must decode this JSON and assign it to individual entities.

Now that HA is receiving data, we must decode this JSON and assign it to individual entities.

mqtt
  sensor:
    - name: "70006 Temperature"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r1val }}"
      unit_of_measurement: "°C"
      unique_id: "7000601"

    - name: "70006 Humidity"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r2val }}"
      unit_of_measurement: "%"
      unique_id: "7000602"

    - name: "70006 Pressure"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r3val }}"
      unit_of_measurement: "mBar"
      unique_id: "7000603"

    - name: "70006 Dew Point"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r4val }}"
      unit_of_measurement: "°C"
      unique_id: "7000604"

    - name: "70006 Dew Point Gap"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r5val }}"
      unit_of_measurement: "°C"
      unique_id: "7000605"

    - name: "70006 CO2"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r6val }}"
      unit_of_measurement: "ppm"
      unique_id: "7000606"

    - name: "70006 Ambient VPD"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r7val }}"
      unit_of_measurement: "kPa"
      unique_id: "7000607"

    - name: "70006 Leaf Temp"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r8val }}"
      unit_of_measurement: "°C"
      unique_id: "7000608"

    - name: "70006 ePPFD"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r9val }}"
      unit_of_measurement: "µmol/s/m2"
      unique_id: "7000609"

    - name: "70006 RQLI Red"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r10val }}"
      unit_of_measurement: "%"
      unique_id: "7000610"

    - name: "70006 RQLI Green"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r11val }}"
      unit_of_measurement: "%"
      unique_id: "7000611"

    - name: "70006 RQLI Blue"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r12val }}"
      unit_of_measurement: "%"
      unique_id: "7000612"

    - name: "70006 RQLI IR"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r13val }}"
      unit_of_measurement: "%"
      unique_id: "7000613"

    - name: "70006 eDLI"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r14val }}"
      unit_of_measurement: "mol/m2/d"
      unique_id: "7000614"

    - name: "70006 Substrate Moisture"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r15val }}"
      unit_of_measurement: "%"
      unique_id: "7000615"

    - name: "70006 Substrate ECp"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r16val }}"
      unit_of_measurement: "mS/cm"
      unique_id: "7000616"

    - name: "70006 Substrate Temp"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r17val }}"
      unit_of_measurement: "°C"
      unique_id: "7000617"

    - name: "70006 Leaf VPD"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r18val }}"
      unit_of_measurement: "kPa"
      unique_id: "7000618"

    - name: "70006 Ambient Leaf difference"
      state_topic: "GROW/GROW-00070006"
      value_template: "{{ value_json.r19val }}"
      unit_of_measurement: "°C"
      unique_id: "7000619"

Create a dashboard

Got to : Settings -> Dashboards -> +ADD DASHBOARD -> New dashboard from scratch

Edit dashboard

-> {} Raw configuration editor

Enter this:

title: Grow Sensor Dashboard
views:
  - title: Sensor Overview
    path: sensor-overview
    theme: default
    cards:
      - type: vertical-stack
        cards:
          - type: markdown
            content: |
              ## 🌡️ Main Environment
          - type: horizontal-stack
            cards:
              - type: history-graph
                title: Temperature
                hours_to_show: 6
                entities:
                  - sensor.grow_00070006_70006_temperature
              - type: history-graph
                title: Humidity
                hours_to_show: 6
                entities:
                  - sensor.70006_humidity
          - type: horizontal-stack
            cards:
              - type: history-graph
                title: CO2
                hours_to_show: 6
                entities:
                  - sensor.70006_co2
              - type: history-graph
                title: Ambient VPD
                hours_to_show: 6
                entities:
                  - sensor.70006_ambient_vpd
      - type: vertical-stack
        cards:
          - type: markdown
            content: |
              ## 🌱 Soil Readings
          - type: horizontal-stack
            cards:
              - type: history-graph
                title: Substrate Moisture
                hours_to_show: 6
                entities:
                  - sensor.70006_substrate_moisture
              - type: history-graph
                title: Substrate ECp
                hours_to_show: 6
                entities:
                  - sensor.70006_substrate_ecp
          - type: history-graph
            title: Substrate Temp
            hours_to_show: 6
            entities:
              - sensor.70006_substrate_temp
      - type: vertical-stack
        cards:
          - type: markdown
            content: |
              ## 💡 Light & Radiation
          - type: history-graph
            title: RQLI Spectrum (Red, Green, Blue, IR)
            hours_to_show: 6
            entities:
              - sensor.70006_rqli_red
              - sensor.70006_rqli_green
              - sensor.70006_rqli_blue
              - sensor.70006_rqli_ir
          - type: horizontal-stack
            cards:
              - type: history-graph
                title: ePPFD
                hours_to_show: 6
                entities:
                  - sensor.70006_eppfd
              - type: history-graph
                title: eDLI
                hours_to_show: 6
                entities:
                  - sensor.70006_edli
      - type: vertical-stack
        cards:
          - type: markdown
            content: |
              ## 📊 Other Sensor Data
          - type: horizontal-stack
            cards:
              - type: history-graph
                title: Pressure
                hours_to_show: 6
                entities:
                  - sensor.70006_pressure
              - type: history-graph
                title: Dew Point
                hours_to_show: 6
                entities:
                  - sensor.70006_dew_point
          - type: horizontal-stack
            cards:
              - type: history-graph
                title: Dew Point Gap
                hours_to_show: 6
                entities:
                  - sensor.70006_dew_point_gap
              - type: history-graph
                title: Leaf Temp
                hours_to_show: 6
                entities:
                  - sensor.70006_leaf_temp
          - type: horizontal-stack
            cards:
              - type: history-graph
                title: Leaf VPD
                hours_to_show: 6
                entities:
                  - sensor.70006_leaf_vpd
              - type: history-graph
                title: Ambient Leaf Difference
                hours_to_show: 6
                entities:
                  - sensor.70006_ambient_leaf_difference

Last updated

Was this helpful?