93

GitHub - sieren/Homepoint: Espressif ESP32 Based Smarthome screen for MQTT

 4 years ago
source link: https://github.com/sieren/Homepoint
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Homepoint

An ESP32 based Smarthome Controller for MQTT

Travis CI Issues

Homepoint is a screen-based interface for MQTT-connected Smarthome devices that runs on the cheaply available ESP32 Chipset. This project requires a MQTT-Broker to be running in your smarthome.

img1.jpgimg2.gif

Features

  • See and trigger scenes (groups of devices) on the front screen.
  • Trigger individual devices by diving into scenes (long press).
  • Support for temperature, humidity and air quality sensors.
  • Supports both Touch Screen or Button based navigation.
  • Screen updates automatically when devices are triggered from elsewhere.
  • Easy configuration through a JSON files.
  • Screensaver saves power by switching off screen after 10 minutes.
  • Statusbar shows connectivity for WiFi and MQTT as well as time.

Is there a feature missing? Open an issue, send me an email or fork this project and add it yourself.

Requirements

Homepoint should work with any ESP32 device and Touchscreen supported by TFT_eSPI. It works out of the box and has been tested with M5STACK and ArduiTouch.

Installation

In order to build Homepoint, you need the ESP-IDF SDK.
Installation is fairly straight forward, see Setting up the Toolchain in the Espressif Documentation.

git clone https://www.github.com/sieren/homepoint.git
cd homepoint
git submodule update --init --recursive
mkdir build && cd build
cmake ../
make spiffs_spiffs_bin
make -j 8 flash

For use with a Button-Based interface configure with

cmake -DBUTTONS=ON ../

and for out of box use with M5STACK run

cmake -DM5STACK=ON ../

Otherwise the default configuration will be for touch-screens like ArduiTouch or the widely used ILI9341 like the one offered by Adafruit. GPIOs for the screen may have to be configured in main/libraries/TFT_ESPI/User_Setup.h.

Other Homepoint specific configuration settings like the time it takes before the Screensaver kicks in can be configured in main/config/Config.h.

Configuration

See the data/config.json file as a reference.
Each Scene consists of one or several devices. The scene can either be a Switch, Light or a Sensor.
Do not put Switch devices into a Sensor scene.
If Sensors transmit their information via JSON, set jsonData to true, and specify the key under which the data is sent (ie. temperature).
Sensor can have up to two devices, in which case a combined view is shown (ie. for temperature and humidity).
Wifi & MQTT credentials go in the top level.
Homepoint gets its time from an NTP Server. In order to set the correct timezone, copy & paste your NTP TZ Setting from here.

Example

{
  "wifi": "MyWifiSSID",
  "password": "My Wifi Password",
  "mqttbroker": "mqtt://192.168.1.2",
  "mqttusername": "mqttusername",
  "mqttpasswd": "mymqttpassword",
  "timezone": "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00",
  "scenes": [{
    "name": "Living Room",
    "type": "Light",
    "icon": "livingroom",
    "devices": [{
      "name": "Side Light",
      "setTopic": "lights/hue/00:17:88:01:02:3c:2a:6d-0b/set/on",
      "getTopic": "hue/status/lights/Hue color lamp 1",
      "onValue": "true",
      "offValue": "false"
    }]
  },
  {
    "name": "Bedroom",
    "type": "Sensor",
    "icon": "door",
    "devices": [{
      "name": "Temperature DHT Sensor",
      "type": "temperature",
      "jsondata": true,
      "temperatureKey": "temperature",
      "getTopic": "bedroom/esptemp"
    },
    {
      "name": "Humidity DHT Sensor",
      "type": "humidity",
      "jsondata": true,
      "humidityKey": "humidity",
      "getTopic": "bedroom/esphumi"
    }]
  }]
}

Switches can have custom icons, the icons of sensors are currently fixed and not customizable. See the data folder for available icons or add your own following the naming scheme visible there.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK