Git Product home page Git Product logo

lilygo-ttgo-higrow's Introduction

LilyGO-TTGO-HiGrow

TTGO-HIGrow MQTT interface for Homeassistant

T-Higrow

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them

  1. LilyGo T-Higrow V1.1 (available from AliExpress) (make sure it is V1.1 19-8-22 or later)

  2. Windows 10, with installed Arduino EDI (my version 1.8.12)

  3. USB Cable with USB-C to attatch to the LilyGo

  4. MQTT server (I am running on a Synology NAS in docker) If you have a Synology NAS, I can recommend to follow BeardedTinker on YouTube, he makes a very intuitive explanation how to setup the whole environment on Synology.

Installing

Below a step by step that tell you how to get a development/production environment up and running, and to make things even more easy, BeardedTinker have created the two tutorials on YouTube, which gives a detailed instruktion how to get it all to work.

He has performed a tremendous task in doing this.

First video is how to setup the whole environment: https://www.youtube.com/watch?v=7w6_ZkLDxko&t=231s

Second video is how to configurate the sensors into Home-Assistant: https://www.youtube.com/watch?v=AmsmAuHolHw

I highly recommend that your see and follow these two videos, as then you only will have success in setting this up.

After seeing the videos, remenber to give a "Thumbs Up" to support BeardedThinker in his work.

  1. Setup the Arduino EDI
  2. Download the .ino file
  3. Edit the .ino file where it is marked that you should edit
  4. Add the following to your configuration.yaml ( change name and state_topic accordint to your needs):
#Greenhouse
  - platform: mqtt
    name: Drivhus_Padron_Battery_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.bat.bat }}"
    unit_of_measurement: '%'
    icon: mdi:battery
  - platform: mqtt    
    name: Drivhus_Padron_salt_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.salt.salt }}"
    unit_of_measurement: 'q' 
    icon: mdi:bottle-tonic
  - platform: mqtt
    name: Drivhus_Padron_Time_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.time.time }}"
    icon: mdi:clock
  - platform: mqtt
    name: Drivhus_Padron_Date_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.date.date }}"
    icon: mdi:calendar    
  - platform: mqtt
    name: Drivhus_Padron_Soil_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.soil.soil }}"
    unit_of_measurement: '%' 
    icon: mdi:water-percent
  - platform: mqtt
    name: Drivhus_Padron_Temp_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.temp.temp }}"
    unit_of_measurement: 'C' 
    icon: mdi:home-thermometer
  - platform: mqtt
    name: Drivhus_Padron_Humid_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.humid.humid }}"
    unit_of_measurement: '%' 
    icon: mdi:water-percent
  - platform: mqtt
    name: Drivhus_Padron_rel_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.rel.rel }}"
    icon: mdi:alert-decagram
  - platform: mqtt
    name: Drivhus_Padron_no_1
    state_topic: "Drivhus/Padron_1"
    value_template: "{{ value_json.Drivhus.Drivhus }}"
    icon: mdi:numeric-1

โ€‹ and the data will be available in Homeassistant. โ€‹ Create a "Blink" card:

Green-house

You then just use this .ino as a master, and create a copy for each LilyGo T-Higrow V1.1 you have.

Follow the code, and calibrate your Soil sensor, first take the value when unit is on the table, then take the value when unit is placed in water (up to the electronics), these two readings you place in the right places of the map statement.

Running

The LilyGo T-Higrow V1.1, will wake up every (in this case) hour and report status to the MQTT server, and at the same time it will be updated in Homeassistant. It will run for approx. 2 months on a 3.7V Lithium battery.

I have had a couple of units, which did not last that long. It turns out that one were using 5mA, and the other 14.6 mA when in sleep mode. They are not suitable for battery, and I have no clue why they consume this amount of power. The average consumption for my other boards are around 0.250 mA, which is according to factory specifications.

You can set the wakeup time as you want. Lower time higher battery consumption, Higher time lower battery consumption.

All sensors from the LilyGo T-Higrow V1.1 are updated, so you can easy include them in Homeassistant if you should wish so.

Alarm for low soil humidity

You can make the Homeassistant give you an alarm for low Soil Humidity, you will have to add the following to your automations.yaml. (example)

- alias: 'nord_window_soil_8'
  trigger:
    platform: numeric_state
    entity_id: sensor.north_window_soil_8
    below: 30
    for:
      minutes: 30
  action:
  - service: notify.mobile_app_xxxxxxx_iphone
    data:
      message: 'North window plant 8, needs watering'

Deployment

See instructions under Prerequisites

Versioning

1.5 Major release update, introducing logging, change to PubSubClient, minor error corrections, and tuning related to battery usage.

1.6 Implementing MQTT username and password, and made compatible for DHT11, DHT12. (DHT22 not testet yet.)

1.7 Correcting that counter sleep5no did not update

Authors

  • Per Rose
  • BeardedTinker (contributer)

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

3D printed case for the sensor

In the following you will find instructions on how to download and use the casing for the LILYGO HI-Grow sensor.

Prerequisites

What things you need to print the case:

  1. FreeCad, available from https://www.freecadweb.org/downloads.php
  2. A 3D printer
  3. Some optic cable, like this from AliExpress: https://www.aliexpress.com/item/32495181964.html?spm=a2g0s.9042311.0.0.27424c4dFTciIW
  4. A 5mm and 8mm drill, for aligning the holes for optic cable and charging plug.
  5. A C-charging plug, eg. like this from AliExpress: https://www.aliexpress.com/item/4000634865136.html?spm=a2g0s.9042311.0.0.27424c4dmTM92r
  6. A 800mA Lithium-ION battery, like this from AliExpress: https://www.aliexpress.com/item/33022823001.html?spm=a2g0s.9042311.0.0.27424c4dmElaxC
  7. A tube of Aquarium Silicone, for making expecially outdoor sensors watertight.

Here are a series of images, showing the process of assemble the case after print.

Case1

Case1

Case1

Case1

Case1

I have included the original file for the cases in FreeCad format.

lilygo-ttgo-higrow's People

Contributors

pesor avatar beardedtinker avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.