Git Product home page Git Product logo

homepoint's Introduction

homepoint logo

issues Donations Badge

๐Ÿ  Control your MQTT/HomeKit Smart Home Devices from an ESP32-powered screen ๐Ÿ 

Homepoint is a screen-based interface for MQTT & HomeKit-connected Smarthome devices that runs on the ESP32 Chipset.

Table of Contents

โœ”๏ธ Features

  • See and trigger scenes (groups of devices) on the front screen.

  • Trigger individual devices by diving into scenes (by tapping the indicator or long pressing a button).

  • See partially switched on scenes with multiple devices at a glance.

  • Support for temperature, humidity, air quality sensors & Tasmota energy readings.

  • Remote Configuration: Configure and reboot HomePoint through a web interface. No need to reflash.

  • Over-The-Air Updates (Beta): Flash new versions of HomePoint wirelessly over the air.

  • HomeKit Switch Support (Setup Automations in Home App to toggle from Homepoint)*

  • Supports both Touch Screen or Button based navigation.

  • Reactive: Screen updates whenever devices are triggered from elsewhere.

  • Easy configuration through a JSON file, no additional code required.

  • Screensaver saves power by switching off screen after 10 minutes.

  • Statusbar shows connectivity for WiFi and MQTT as well as time.

  • Failsafe Mode: In case of corrupt configuration, failsafe mode for remote access is provided.

  • Pre-compiled binaries: Just flash HomePoint on your ESP32 device without compiling.

*currently on experimental branch.

๐Ÿ“ท Demo

HomePoint Youtube demo

๐Ÿ  Installation

HomePoint comes in 2 pre-compiled .bin files ready to be flashed on either a generic ESP32 Module or M5Stack. More details on the hardware setup are available in the Wiki.

Steps to install:

  1. Download ESPTools from https://github.com/espressif/esptool/releases
  2. Install ESPTools with python setup.py install
  3. Run esptool.py -b 921600 write_flash -fs 4MB -fm dout 0x0 homepoint_espgeneric.bin (or homepoint_m5stack.bin for M5Stack)

Alternatively, watch the installation video below:

HomePoint Installation demo

๐Ÿ  Build from source

Homepoint was created using the ESP-IDF SDK.

Detailed build instructions are available in the Wiki.

๐Ÿ”€ Configuration

The configuration lives in data/config.json.

Devices & Scenes

HomePoint supports two types of Scenes with a selection of devices each:

SCENE Types DEVICE Types
Light, Switch (none, all devices expected to be switches)
Sensor display one or two values at once with customizable icons (singleValue / combinedValues)

Grouped Sensors support up to two devices (due to screen space).
Lights & Switches support an infinite number of devices in a group.

Some Sensors use JSON as a data-format, in which case a key can be defined. These can be on any level of the sensor json payload, for Tasmota smart plugs the key value "Power" can be used to display the current power consumption.

WiFi & MQTT Credentials

WiFi and MQTT credentials are to be defined on the top level.

NTP Time (optional)

In order to set the correct timezone, copy & paste your NTP TZ Setting to the timezone key.

Hardware (optional)

Some of the IL9341 Display units seem to differ in e.g. how the touch-screen coordinates correspond to the display or how the LED backlight is controlled. Therefore we offer some options to override the defaults in the configuration file.

Key Type Value
"ledPinPullup" Boolean true or false - control backlight power which can be pull-up/down depending on unit
"screenRotationAngle" Int The rotation parameter can be 0, 1, 2 or 3 - incrementing in 90deg angles
"screenSaverMinutes" Int Minutes until display is switched off (default 10)
"touchXAxisInverted" Bool default: false, invert the X Axis of the touch screen in case it is misaligned
"touchYAxisInverted" Bool default: true, invert the Y Axis of the touch screen in case it is misaligned
"displayColorInverted" Bool default: false, invert the colorspace (ie. for ILI9342C Displays)

Example

MQTT Topics are case-sensitive as per MQTT specification.

{
  "wifi": "MyWifiSSID",
  "password": "My Wifi Password",
  "hostname": "optionalhostname",
  "login": "admin",
  "webpass": "admin",
  "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": "Some 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": "Door 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",
      "icon": "door"
    },
    ]
  },
  {
    "name": "Bedroom",
    "type": "Sensor",
    "icon": "door",
    "devices": [{
      "name": "Temperature DHT Sensor",
      "type": "singleValue",
      "jsondata": true,
      "firstIcon": "temperature_small",
      "firstKey": "temperature",
      "getTopic": "bedroom/esptemp"
    },
    {
      "name": "Tasmota Smart Plug",
      "type": "singleValue",
      "jsondata": true,
      "firstKey": "Power",
      "firstIcon":"wattage_small",
      "getTopic": "tele/DVES_2F73BE/SENSOR"
    }]
  }]
}

A more fully-configured example is available here.

๐Ÿ”ฎ Roadmap

๐Ÿ› Known bugs & issues ๐Ÿ›

If you find any bugs or need assistance, don't hesitate and open an issue :)

๐Ÿ’ž Contributing

Contributions are welcome! Just hack away and open a Pull Request. But please follow the style of the code that's already there (ie. no tabs, spacing).

โ˜• Buy me a coffee

I have developed HomePoint in my free time because I wanted to learn more about C++ on ESP32 and to solve a concrete problem in my smarthome.
As development kept on going, I thought about ways to make this project open source and more accessible and user-friendly for the maker-community.

If you enjoy using HomePoint or this work, consider a small donation. But don't worry, I'll continue working on this anyway ;-).

paypal

Thanks!!

๐Ÿ“œ License

MIT ยฉ Matthias Frick

homepoint's People

Contributors

ghosty-be avatar jholthusen avatar sieren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homepoint's Issues

Add icons and def.

Please, could you add icons and definitions for :

light :
bulb_active.jpg
bulb_inactive.jpg

atmospheric pressure (i use bosch BME280 : humidity, barometric, temperature) :
pressure_small.jpg

Thanks.

Support Device-group Device

Example: A floor lamp has 2 bulbs. Those 2 bulbs are independently controllable (ie Hue). They should appear as one light in Homepoint as it's technically one lamp.

This could mean introducing a third level of device groups (not user accessible on screen).

SPIFFS randomly corrupted

Occasionally SPIFFS gets corrupted in failsafe (or otherwise), resulting in files unable to be edited or created (deleting however always works).
Often files are only "half" written during save and afterwards cannot be overwritten properly.

Currently no steps to reproduce, seems random.
Only "fix" is to reflash the bin partition.

Make MQTT Topics case insensitive

Hi, sorry to bother again. I add a switch for a Tasmota SON/OFF .
Switching On/Off works, but if I switch the device with a other device like the Tasmota device webpage, Homepoint does not show the actual device status.
"scenes": [{
"name": "Strompumpe",
"type": "Switch",
"icon": "garden",
"devices": [{
"name": "Strompumpe",
"setTopic": "Strompumpe/cmnd/power1",
"getTopic": "Strompumpe/stat/power1",
"onValue": "ON",
"offValue": "OFF"

I also have a device with Espurna Firmware and with that it works fine.

Br. Frank

Potential issue with standard build script

Hi Matt,
just setup an Ubuntu VM to double check my own documentation. When running the scripts as described in the README.md and uploading them directly via the script, I get an usuable ESP32. When using the build_all script, I can flash the resulting file with esptool.py and have a working Homepoint.

Could you double check? This is against HEAD, directly cloning https://www.github.com/sieren/homepoint.git

Could double check this works for you?

Thanks!
Jan

GPIO pins

A question, not an issue.

In readme you're referring to GPIO pins?

5 = G5 (on pic) = GPIO5
etc..

+-----------+-----+
| TYPE | PIN |
+-----------+-----+
| TFT_CS | 5 |
| TFT_DC | 4 |
| TFT_MOSI | 23 |
| TFT_SCLK | 18 |
| TFT_RST | 22 |
| TFT_MISO | 19 |
| TFT_LED | 15 |
| TOUCH_CS | 14 |
| TOUCH_IRQ | 2 |
+-----------+-----+

Display ILI9341 not working

Hi Matt

I am really new to playing with ESP32ยดs so it is likely that there is no bug in your code and it is just me not getting it right.

I have an NodeMCU ESP32 and an ILI9341. Both are working fine when I use TFT_eSLI library with Arduino IDE. I did not get it to work with the PIN configuration shown in the video so I tried it with the exact same configuration I used with the Arduino IDE. That is not working either.

I edited the User_Setup.h file in esp-idf/homepoint/main/config/TFT-eSPI/Generic. I hope that is correct?

I would really appreciate it if you could help!

Markus

`
// USER DEFINED SETTINGS
// Set driver type, fonts to be loaded, pins used and SPI control method etc
//
// See the User_Setup_Select.h file if you wish to be able to define multiple
// setups and then easily select which setup file is used by the compiler.
//
// If this file is edited correctly then all the library example sketches should
// run without the need to make any more changes for a particular hardware setup!
// Note that some sketches are designed for a particular TFT pixel width/height

// ##################################################################################
//
// Section 1. Call up the right driver file and any options for it
//
// ##################################################################################

// Only define one driver, the other ones must be commented out
#define ILI9341_DRIVER
//#define ST7735_DRIVER // Define additional parameters below for this display
//#define ILI9163_DRIVER // Define additional parameters below for this display
//#define S6D02A1_DRIVER
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
//#define HX8357D_DRIVER
//#define ILI9481_DRIVER
//#define ILI9486_DRIVER
//#define ILI9488_DRIVER // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
//#define ST7789_DRIVER // Full configuration option, define additional parameters below for this display
//#define ST7789_2_DRIVER // Minimal configuration option, define additional parameters below for this display
//#define R61581_DRIVER

// Some displays support SPI reads via the MISO pin, other displays have a single
// bi-directional SDA pin and the library will try to read this via the MOSI line.
// To use the SDA line for reading data from the TFT uncomment the following line:

// #define TFT_SDA_READ // This option is for ESP32 ONLY, tested with ST7789 display only

// For ST7789 ONLY, define the colour order IF the blue and red are swapped on your display
// Try ONE option at a time to find the correct colour order for your display

// #define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
// #define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red

// For M5Stack ESP32 module with integrated ILI9341 display ONLY, remove // in line below

// #define M5STACK

// For ST7789, ST7735 and ILI9163 ONLY, define the pixel width and height in portrait orientation
// #define TFT_WIDTH 80
// #define TFT_WIDTH 128
// #define TFT_WIDTH 240 // ST7789 240 x 240 and 240 x 320
// #define TFT_HEIGHT 160
// #define TFT_HEIGHT 128
// #define TFT_HEIGHT 240 // ST7789 240 x 240
// #define TFT_HEIGHT 320 // ST7789 240 x 320

// For ST7735 ONLY, define the type of display, originally this was based on the
// colour of the tab on the screen protector film but this is not always true, so try
// out the different options below if the screen does not display graphics correctly,
// e.g. colours wrong, mirror images, or tray pixels at the edges.
// Comment out ALL BUT ONE of these options for a ST7735 display driver, save this
// this User_Setup file, then rebuild and upload the sketch to the board again:

// #define ST7735_INITB
// #define ST7735_GREENTAB
// #define ST7735_GREENTAB2
// #define ST7735_GREENTAB3
// #define ST7735_GREENTAB128 // For 128 x 128 display
// #define ST7735_GREENTAB160x80 // For 160 x 80 display (BGR, inverted, 26 offset)
// #define ST7735_REDTAB
// #define ST7735_BLACKTAB
// #define ST7735_REDTAB160x80 // For 160 x 80 display with 24 pixel offset

// If colours are inverted (white shows as black) then uncomment one of the next
// 2 lines try both options, one of the options should correct the inversion.

// #define TFT_INVERSION_ON
// #define TFT_INVERSION_OFF

// If a backlight control signal is available then define the TFT_BL pin in Section 2
// below. The backlight will be turned ON when tft.begin() is called, but the library
// needs to know if the LEDs are ON with the pin HIGH or LOW. If the LEDs are to be
// driven with a PWM signal or turned OFF/ON then this must be handled by the user
// sketch. e.g. with digitalWrite(TFT_BL, LOW);

// #define TFT_BACKLIGHT_ON HIGH // HIGH or LOW are options

// ##################################################################################
//
// Section 2. Define the pins that are used to interface with the display here
//
// ##################################################################################

// We must use hardware SPI, a minimum of 3 GPIO pins is needed.
// Typical setup for ESP8266 NodeMCU ESP-12 is :
//
// Display SDO/MISO to NodeMCU pin D6 (or leave disconnected if not reading TFT)
// Display LED to NodeMCU pin VIN (or 5V, see below)
// Display SCK to NodeMCU pin D5
// Display SDI/MOSI to NodeMCU pin D7
// Display DC (RS/AO)to NodeMCU pin D3
// Display RESET to NodeMCU pin D4 (or RST, see below)
// Display CS to NodeMCU pin D8 (or GND, see below)
// Display GND to NodeMCU pin GND (0V)
// Display VCC to NodeMCU 5V or 3.3V
//
// The TFT RESET pin can be connected to the NodeMCU RST pin or 3.3V to free up a control pin
//
// The DC (Data Command) pin may be labeled AO or RS (Register Select)
//
// With some displays such as the ILI9341 the TFT CS pin can be connected to GND if no more
// SPI devices (e.g. an SD Card) are connected, in this case comment out the #define TFT_CS
// line below so it is NOT defined. Other displays such at the ST7735 require the TFT CS pin
// to be toggled during setup, so in these cases the TFT_CS line must be defined and connected.
//
// The NodeMCU D0 pin can be used for RST
//
//
// Note: only some versions of the NodeMCU provide the USB 5V on the VIN pin
// If 5V is not available at a pin you can use 3.3V but backlight brightness
// will be lower.

// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP8266 SETUP ######

// For NodeMCU - use pin numbers in the form PIN_Dx where Dx is the NodeMCU pin designation
// #define TFT_CS PIN_D8 // Chip select control pin D8
// #define TFT_DC PIN_D3 // Data Command control pin
// #define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V

//#define TFT_BL PIN_D1 // LED back-light (only for ST7789 with backlight control pin)

// #define TOUCH_CS 14
// #define TOUCH_IRQ 2

// #define TFT_MISO 19
// #define TFT_MOSI 23
// #define TFT_SCLK 18
// #define TFT_CS 14 // Chip select control pin
// #define TFT_DC 27 // Data Command control pin
// #define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
// #define TFT_BL 32 // LED back-light (required for M5Stack)
// #define TFT_LED 32

// ArduiTouch
//#define TFT_CS 5
//#define TFT_DC 4
//#define TFT_MOSI 23
//#define TFT_SCLK 18
//#define TFT_RST 22
//#define TFT_MISO 19
//#define TFT_LED 15

//#define HAVE_TOUCHPAD
//#define TOUCH_CS 14
//#define TOUCH_IRQ 2

//#define TOUCH_CS PIN_D2 // Chip select pin (T_CS) of touch screen

//#define TFT_WR PIN_D2 // Write strobe for modified Raspberry Pi TFT only

// ###### FOR ESP8266 OVERLAP MODE EDIT THE PIN NUMBERS IN THE FOLLOWING LINES ######

// Overlap mode shares the ESP8266 FLASH SPI bus with the TFT so has a performance impact
// but saves pins for other functions.
// Use NodeMCU SD0=MISO, SD1=MOSI, CLK=SCLK to connect to TFT in overlap mode

// In ESP8266 overlap mode the following must be defined
//#define TFT_SPI_OVERLAP

// In ESP8266 overlap mode the TFT chip select MUST connect to pin D3
//#define TFT_CS PIN_D3
//#define TFT_DC PIN_D5 // Data Command control pin
//#define TFT_RST PIN_D4 // Reset pin (could connect to NodeMCU RST, see next line)
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V

// ###### EDIT THE PIN NUMBERS IN THE LINES FOLLOWING TO SUIT YOUR ESP32 SETUP ######

// For ESP32 Dev board (only tested with ILI9341 display)
// The hardware SPI can be mapped to any pins

#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS 15 // Chip select control pin
#define TFT_DC 2 // Data Command control pin
#define TFT_RST 4 // Reset pin (could connect to RST pin)
//#define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP32 board RST

#define TFT_BL 32 // LED back-light (only for ST7789 with backlight control pin)

#define TOUCH_CS 33 // Chip select pin (T_CS) of touch screen

//#define TFT_WR 22 // Write strobe for modified Raspberry Pi TFT only

// For the M5Stack module use these #define lines
//#define TFT_MISO 19
//#define TFT_MOSI 23
//#define TFT_SCLK 18
//#define TFT_CS 14 // Chip select control pin
//#define TFT_DC 27 // Data Command control pin
//#define TFT_RST 33 // Reset pin (could connect to Arduino RESET pin)
//#define TFT_BL 32 // LED back-light (required for M5Stack)
//#define TFT_LED 32 // LED back-light (required for M5Stack)

// ###### EDIT THE PINs BELOW TO SUIT YOUR ESP32 PARALLEL TFT SETUP ######

// The library supports 8 bit parallel TFTs with the ESP32, the pin
// selection below is compatible with ESP32 boards in UNO format.
// Wemos D32 boards need to be modified, see diagram in Tools folder.
// Only ILI9481 and ILI9341 based displays have been tested!

// Parallel bus is only supported on ESP32
// Uncomment line below to use ESP32 Parallel interface instead of SPI

//#define ESP32_PARALLEL

// The ESP32 and TFT the pins used for testing are:
//#define TFT_CS 33 // Chip select control pin (library pulls permanently low
//#define TFT_DC 15 // Data Command control pin - must use a pin in the range 0-31
//#define TFT_RST 32 // Reset pin, toggles on startup

//#define TFT_WR 4 // Write strobe control pin - must use a pin in the range 0-31
//#define TFT_RD 2 // Read strobe control pin

//#define TFT_D0 12 // Must use pins in the range 0-31 for the data bus
//#define TFT_D1 13 // so a single register write sets/clears all bits.
//#define TFT_D2 26 // Pins can be randomly assigned, this does not affect
//#define TFT_D3 25 // TFT screen update performance.
//#define TFT_D4 17
//#define TFT_D5 16
//#define TFT_D6 27
//#define TFT_D7 14

// ##################################################################################
//
// Section 3. Define the fonts that are to be used here
//
// ##################################################################################

// Comment out the #defines below with // to stop that font being loaded
// The ESP8366 and ESP32 have plenty of memory so commenting out fonts is not
// normally necessary. If all fonts are loaded the extra FLASH space required is
// about 17Kbytes. To save FLASH space only enable the fonts you need!

#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:-.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts

// Comment out the #define below to stop the SPIFFS filing system and smooth font code being loaded
// this will save ~20kbytes of FLASH
#define SMOOTH_FONT

// ##################################################################################
//
// Section 4. Other options
//
// ##################################################################################

// Define the SPI clock frequency, this affects the graphics rendering speed. Too
// fast and the TFT driver will not keep up and display corruption appears.
// With an ILI9341 display 40MHz works OK, 80MHz sometimes fails
// With a ST7735 display more than 27MHz may not work (spurious pixels and lines)
// With an ILI9163 display 27 MHz works OK.
// The RPi typically only works at 20MHz maximum.

// #define SPI_FREQUENCY 1000000
// #define SPI_FREQUENCY 5000000
// #define SPI_FREQUENCY 10000000
// #define SPI_FREQUENCY 20000000
//#define SPI_FREQUENCY 27000000 // Actually sets it to 26.67MHz = 80/3
#define SPI_FREQUENCY 40000000 // Maximum to use SPIFFS
// #define SPI_FREQUENCY 80000000

// Optional reduced SPI frequency for reading TFT
#define SPI_READ_FREQUENCY 20000000

// The XPT2046 requires a lower SPI clock rate of 2.5MHz so we define that here:
#define SPI_TOUCH_FREQUENCY 2500000

// The ESP32 has 2 free SPI ports i.e. VSPI and HSPI, the VSPI is the default.
// If the VSPI port is in use and pins are not accessible (e.g. TTGO T-Beam)
// then uncomment the following line:
#define USE_HSPI_PORT

// Comment out the following #define if "SPI Transactions" do not need to be
// supported. When commented out the code size will be smaller and sketches will
// run slightly faster, so leave it commented out unless you need it!

// Transaction support is needed to work with SD library but not needed with TFT_SdFat
// Transaction support is required if other SPI devices are connected.

// Transactions are automatically enabled by the library for an ESP32 (to use HAL mutex)
// so changing it here has no effect

// #define SUPPORT_TRANSACTIONS
`

Problem with the touch screen...

Hi,

I had to replace the touch screen and now the right and left side of the touch function are reversed. The display and above and below of the touch function still works perfectly. Is there a way to swap right and left side of the touch function?

Many thanks in advance, greetings Christian

Project does not compile with current esp-idf master

Hi,

I'm trying to build the project with the current esp-idf master espressif/esp-idf@58df1d9

The build fails with the follwing error

In file included from .../Homepoint/components/arduino-esp32/cores/esp32/wiring_private.h:31,
                 from .../Homepoint/components/arduino-esp32/cores/esp32/wiring_pulse.c:18:
.../Homepoint/components/arduino-esp32/cores/esp32/Arduino.h:121:6: error: conflicting types for 'random'
 long random(long, long);
      ^~~~~~
In file included from .../Homepoint/components/arduino-esp32/cores/esp32/Arduino.h:28,
                 from .../Homepoint/components/arduino-esp32/cores/esp32/wiring_private.h:31,
                 from .../Homepoint/components/arduino-esp32/cores/esp32/wiring_pulse.c:18:
.../xtensa-esp32-elf-8.2.0/xtensa-esp32-elf/sys-include/stdlib.h:267:6: note: previous declaration of 'random' was here
 long random (void);
      ^~~~~~

I know it's the (unstable) compiler version 8.2.0. when I use the compiler version 5.2.0 cmake will refuse to build.

I think it's a temporary problem since I already build Homepoint successfully.

I wonder if it's good to relate on the master branch of ESP-IDF. It seems to be pretty unstable. Unfortunatly earlier versions won't support cmake very well.

UX: Replace Long-Press with 3 dots

Replace long-press with 3 dots on the top right, indicating there are more devices inside a scene.

Longpress is not working reliably with the touch-screen.

Trouble compiling on a Pi

I've (finally) managed to install ESP-IDF successfully, but now the last make fails. Any tips?

make -j 8 flash
[  0%] Built target esp32_linker_script
[  0%] Built target _project_elf_src
[  1%] Built target partition_table
[  1%] Performing build step for 'bootloader'
[  1%] Built target __idf_app_trace
[  2%] Built target __idf_cxx
[  1%] Built target _project_elf_src
[  4%] Built target __idf_log
[  4%] Built target __idf_newlib
[ 12%] Built target __idf_xtensa
[  4%] Built target __idf_vfs
[ 50%] Built target __idf_soc
[  6%] Built target __idf_freertos
[ 53%] Built target __idf_micro-ecc
[  6%] Built target __idf_heap
[ 79%] Built target __idf_bootloader_support
[  6%] Built target __idf_log
[ 87%] Built target __idf_efuse
[  9%] Built target __idf_soc
[ 90%] Built target __idf_spi_flash
[ 10%] Built target __idf_esp_rom
[ 93%] Built target __idf_main
[ 11%] Built target __idf_esp_common
[ 98%] Built target bootloader.elf
[ 12%] Built target __idf_xtensa
[100%] Built target gen_project_binary
[100%] Built target app
[ 14%] Built target __idf_esp32
[ 14%] No install step for 'bootloader'
[ 14%] Built target __idf_espcoredump
[ 14%] Completed 'bootloader'
[ 14%] Built target __idf_pthread
[ 15%] Built target bootloader
[ 16%] Built target __idf_esp_event
[ 16%] Built target __idf_tcpip_adapter
[ 24%] Built target __idf_lwip
[ 25%] Built target __idf_esp_eth
[ 26%] Built target __idf_esp_wifi
[ 27%] Built target __idf_nvs_flash
[ 28%] Built target __idf_spi_flash
[ 28%] Built target __idf_app_update
[ 29%] Built target __idf_bootloader_support
[ 30%] Built target __idf_efuse
[ 38%] Built target __idf_wpa_supplicant
[ 40%] Built target mbedtls
[ 47%] Built target mbedcrypto
[ 48%] Built target mbedx509
[ 50%] Built target __idf_driver
[ 50%] Built target __idf_esp_ringbuf
[ 50%] Built target __idf_console
[ 51%] Built target __idf_spiffs
[ 52%] Built target __idf_sdmmc
[ 53%] Built target __idf_openssl
[ 54%] Built target __idf_wear_levelling
[ 56%] Built target __idf_nghttp
[ 57%] Built target __idf_asio
[ 57%] Built target __idf_esp_adc_cal
[ 59%] Built target __idf_coap
[ 59%] Built target __idf_esp_gdbstub
[ 59%] Built target __idf_protobuf-c
[ 60%] Built target __idf_expat
[ 60%] Built target __idf_jsmn
[ 61%] Built target __idf_json
[ 61%] Built target __idf_ulp
[ 62%] Built target __idf_unity
[ 65%] Built target __idf_freemodbus
[ 65%] Built target __idf_esp-tls
[ 66%] Built target __idf_fatfs
[ 67%] Built target __idf_mdns
[ 68%] Built target __idf_esp_http_server
[ 69%] Built target __idf_tcp_transport
[ 81%] Built target __idf_libsodium
[ 82%] Built target __idf_protocomm
[ 82%] Built target __idf_esp_websocket_client
[ 83%] Built target __idf_esp_http_client
[ 83%] Built target __idf_mqtt
[ 83%] Built target __idf_esp_https_ota
[ 83%] Built target __idf_esp_local_ctrl
[ 84%] Built target __idf_wifi_provisioning
[ 98%] Built target __idf_arduino-esp32
[ 98%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/ui/UIMosaicMenuWidget.cpp.obj
[ 98%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/AppContext.cpp.obj
[ 98%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/ui/UIPageButton.cpp.obj
[ 98%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/main.cpp.obj
[ 99%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/ui/UIButton.cpp.obj
[ 99%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/ui/UIStatusBarWidget.cpp.obj
[ 99%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/ui/UIWidget.cpp.obj
[ 99%] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/ui/UISensorComboWidget.cpp.obj
/home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.cpp:1:9: warning: #pragma once in main file
 #pragma once
         ^~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/fs/ConfigReader.hpp:3,
                 from /home/pi/esp/esp-idf/homepoint/main/AppContext.h:6,
                 from /home/pi/esp/esp-idf/homepoint/main/AppContext.cpp:1:
/home/pi/esp/esp-idf/homepoint/main/util/warnings.h:26: warning: "RAPIDJSON_ASSERT" redefined
 #define RAPIDJSON_ASSERT(x) if(!(x)) throw std::logic_error("JSON Parsing failed. Check your config!");
 
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/allocators.h:18,
                 from /home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/reader.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/document.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/mqtt/MQTTSensorUtils.hpp:5,
                 from /home/pi/esp/esp-idf/homepoint/main/mqtt/MQTTSensorGroup.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/model/Model.hpp:5,
                 from /home/pi/esp/esp-idf/homepoint/main/AppContext.h:3,
                 from /home/pi/esp/esp-idf/homepoint/main/AppContext.cpp:1:
/home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/rapidjson.h:406: note: this is the location of the previous definition
 #define RAPIDJSON_ASSERT(x) assert(x)
 
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/TFT_eFEX/TFT_eFEX.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/tft/TFTESPIDriver.hpp:6,
                 from /home/pi/esp/esp-idf/homepoint/main/config/Config.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/main.cpp:5:
/home/pi/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
 #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
  ^~~~~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/TFT_eFEX/TFT_eFEX.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/tft/TFTESPIDriver.hpp:6,
                 from /home/pi/esp/esp-idf/homepoint/main/config/Config.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UISensorComboWidget.h:3,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UISensorComboWidget.cpp:1:
/home/pi/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
 #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
  ^~~~~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/TFT_eFEX/TFT_eFEX.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/tft/TFTESPIDriver.hpp:6,
                 from /home/pi/esp/esp-idf/homepoint/main/config/Config.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIButton.h:3,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIButton.cpp:1:
/home/pi/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
 #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
  ^~~~~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/TFT_eFEX/TFT_eFEX.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/tft/TFTESPIDriver.hpp:6,
                 from /home/pi/esp/esp-idf/homepoint/main/config/Config.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.cpp:3:
/home/pi/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
 #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
  ^~~~~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/TFT_eFEX/TFT_eFEX.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/tft/TFTESPIDriver.hpp:6,
                 from /home/pi/esp/esp-idf/homepoint/main/config/Config.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIPageButton.h:1,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIPageButton.cpp:1:
/home/pi/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
 #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
  ^~~~~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/TFT_eFEX/TFT_eFEX.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/tft/TFTESPIDriver.hpp:6,
                 from /home/pi/esp/esp-idf/homepoint/main/config/Config.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIMosaicMenuWidget.hpp:3,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIMosaicMenuWidget.cpp:1:
/home/pi/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
 #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
  ^~~~~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/TFT_eFEX/TFT_eFEX.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/tft/TFTESPIDriver.hpp:6,
                 from /home/pi/esp/esp-idf/homepoint/main/config/Config.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIWidget.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIStatusBarWidget.h:4,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIStatusBarWidget.cpp:1:
/home/pi/esp/esp-idf/components/esp32/include/rom/tjpgd.h:1:2: warning: #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead [-Wcpp]
 #warning rom/tjpgd.h is deprecated, please use esp32/rom/tjpgd.h instead
  ^~~~~~~
In file included from /home/pi/esp/esp-idf/homepoint/main/fs/ConfigReader.hpp:3,
                 from /home/pi/esp/esp-idf/homepoint/main/AppContext.h:6,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIStatusBarWidget.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIStatusBarWidget.cpp:1:
/home/pi/esp/esp-idf/homepoint/main/util/warnings.h:26: warning: "RAPIDJSON_ASSERT" redefined
 #define RAPIDJSON_ASSERT(x) if(!(x)) throw std::logic_error("JSON Parsing failed. Check your config!");
 
In file included from /home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/allocators.h:18,
                 from /home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/reader.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/document.h:20,
                 from /home/pi/esp/esp-idf/homepoint/main/mqtt/MQTTSensorUtils.hpp:5,
                 from /home/pi/esp/esp-idf/homepoint/main/mqtt/MQTTSensorGroup.hpp:4,
                 from /home/pi/esp/esp-idf/homepoint/main/model/Model.hpp:5,
                 from /home/pi/esp/esp-idf/homepoint/main/AppContext.h:3,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIStatusBarWidget.h:5,
                 from /home/pi/esp/esp-idf/homepoint/main/ui/UIStatusBarWidget.cpp:1:
/home/pi/esp/esp-idf/homepoint/main/libraries/rapidjson/include/rapidjson/rapidjson.h:406: note: this is the location of the previous definition
 #define RAPIDJSON_ASSERT(x) assert(x)
 
/home/pi/esp/esp-idf/homepoint/main/ui/UIButton.cpp: In member function 'virtual void gfx::UIButton::draw()':
/home/pi/esp/esp-idf/homepoint/main/ui/UIButton.cpp:56:20: warning: variable 'centerPoint' set but not used [-Wunused-but-set-variable]
         const auto centerPoint = mFrame.getCenterPoint();
                    ^~~~~~~~~~~
xtensa-esp32-elf-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[3]: *** [esp-idf/main/CMakeFiles/__idf_main.dir/build.make:167: esp-idf/main/CMakeFiles/__idf_main.dir/ui/UIWidget.cpp.obj] Error 1
make[3]: *** Waiting for unfinished jobs....

Add wake up screen on change state

Hi,
Please add the possibility to wake up the screen when a change status is detected on a item (change value of getTopic) :

...
{
"name": "Porte 1",
"setTopic": "dumy/garage/porte/status/set",
"getTopic": "dumy/garage/porte/status",
"onValue": "on",
"offValue": "off",
"screenOn": "true"
},
....

Thanks.

screenRotationAngle seems not to work

HI, i am using the newest recompile version for the esp generic. As my Touchscreen seems to "rotated" i tried the command screenRotationAngle in the json config file , but no change. No,matter what value i am using.

I tried with "screenRotationAngle": "2", , but maybe I do something wrong?

Thanks for helping
Frank

Possible to add a GPIO IN for move detection ?

Hi,
as the display is switching off after some time (of course a very good function), is it possible to add a move detection PIN to switch it ON? Idea is that instead pressing the touch screen, a simple sensor for PIR or another sensor that detect movement (door is open..) will activate the screen. Nice if this PIN can be configured via the config file and be able to configure if the detection it is at a high or low signal.

Thanks, and best regards
Frank

MQTT: Refactor JSON to find first key

Problem:
A user wants to use Tasmota switches and show Energy levels.
This is currently not supported as the temperature/humidity keys are the only ones supported and also only in a fixed JSON structure.
See https://github.com/sieren/Homepoint/blob/master/main/mqtt/MQTTSensorUtils.hpp L50.

Idea:
This can be refactored to traverse the DOM and find the first occurrence of a given key and use its value. While this will ignore othe, later keys with the same name in the same DOM, this may be a sufficient improvement to usability vs cost of making this work.
(https://stackoverflow.com/questions/55629185/find-all-keys-json-rapidjson)

Pre-compiled binary

Hello Matt,

thanks for your great work!

Is there any easier way to get homepoint up and running?

Maybe by just flashing a .bin file or an .ino file to the ESP32?

I got crazy with installing the esp-idf development toolkit ;)

Thanks mate :)

Error : Detected overlap at address: 0x310000 for file: spiffs.bin

Hi Matt,
i just setup an Debian 10_3 VM to play with an ESP32 and Homepoint.
When running the scripts as described in the README i get an Error.
When using the build_all script I get the same Error.

With "make -j 8 flash" gives the Error:
esptool write_flash: error: argument

: Detected overlap at address: 0x310000 for file: spiffs.bin
esptool.py --chip esp32 write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 homepoint.bin 0x310000 spiffs.bin

and with the build_all script i get the Error:
Exception: Not possible to create this bin, overlapping between spiffs.bin and homepoint.bin

Can you help me ?

Issue to build the binary from master branch

Hi there,
when going through the setup for ESP-IDF and afterwards running your build commands, alls seems to work up to the last command

make -j 8 flash

gives the following error (truncated the output).

jan@DESKTOP-ODC87IQ:~/esp/homepoint/build$ make spiffs_spiffs_bin
Scanning dependencies of target spiffs_spiffs_bin
Built target spiffs_spiffs_bin
jan@DESKTOP-ODC87IQ:~/esp/homepoint/build$ 


[ 87%] Linking CXX static library liblibsodium.a
[ 87%] Built target __idf_libsodium
[ 87%] Building CXX object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/base64.cpp.obj
[ 87%] Building CXX object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/cbuf.cpp.obj
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-adc.c.obj
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-bt.c.obj
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-cpu.c.obj
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-gpio.c.obj
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-dac.c.obj
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-i2c.c.obj
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-ledc.c.obj
/home/jan/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c: In function '__pinMode':
/home/jan/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c:102:24: error: 'rtc_gpio_desc' undeclared (first use in this function); did you mean 'rtc_io_desc'?
   uint32_t rtc_reg = rtc_gpio_desc[pin].reg;
                      ^~~~~~~~~~~~~
                      rtc_io_desc
/home/jan/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c:102:24: note: each undeclared identifier is reported only once for each function it appears in
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-matrix.c.obj
esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/build.make:206: recipe for target 'esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-gpio.c.obj' failed
make[3]: *** [esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-gpio.c.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
[ 88%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-misc.c.obj
CMakeFiles/Makefile2:5416: recipe for target 'esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/all' failed
make[2]: *** [esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/all] Error 2
CMakeFiles/Makefile2:246: recipe for target 'CMakeFiles/flash.dir/rule' failed
make[1]: *** [CMakeFiles/flash.dir/rule] Error 2
Makefile:229: recipe for target 'flash' failed
make: *** [flash] Error 2

could you please advise? I tried to use the source code attached to the release, but it seems to not have the submodules attached, which is sort of logical...

Thanks a lot,
Jan

Upload error after compilation finished on OSX

Hi,

I have a problem installing the homepoint.elf to my ESP32 at the end of the compilation:

[ 98%] Linking CXX static library libmain.a
[100%] Built target __idf_main
[100%] Generating ld/esp32.project.ld
[100%] Built target __ldgen_output_esp32.project.ld
[100%] Linking CXX executable homepoint.elf
[100%] Built target homepoint.elf
[100%] Generating binary image from built executable
esptool.py v2.8
Generated ~/Homepoint/build/homepoint.bin
[100%] Built target gen_project_binary
[100%] Built target app
Note: esptool.py will attempt to set baud rate automatically. To specify a baud rate, set the ESPBAUD environment variable.
usage: esptool write_flash [-h] [--erase-all]
                           [--flash_freq {keep,40m,26m,20m,80m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size FLASH_SIZE]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--encrypt]
                           [--ignore-flash-encryption-efuse-setting]
                           [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: 'spiffs.bin'
esptool.py --chip esp32 -p /dev/tty.SLAB_USBtoUART write_flash --flash_mode dio --flash_freq 80m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 homepoint.bin 0x310000 spiffs.bin
CMake Error at run_cmd.cmake:14 (message):
  esptool.py failed
Call Stack (most recent call first):
  run_esptool.cmake:21 (include)


make[3]: *** [CMakeFiles/flash] Error 1
make[2]: *** [CMakeFiles/flash.dir/all] Error 2
make[1]: *** [CMakeFiles/flash.dir/rule] Error 2
make: *** [flash] Error 2

Any idea what's going wrong? I use esp-idf release/4.0, but I don't know where to get this spiffs.bin from.

Regards, Thomas

Battery level

Hi Sieren, can you optimize homepoint to battery operation (sleep of ESP32, poweroff screen in 1min) and add battery level monitoring and show % in status bar... Standard 3.7-4.2 Lipo battery 2500mah, sense via analog in A0 (with voltage divider of course)

NTP: Sync every x Hours

Right now we only obtain once during launch, ideally this should sync ever 12 or 24 hours since the RTC of the ESP32 runs out of sync quite easily.

Hostname in config file

Adding hostname (actually 'homepoint') in config file config.json.
When we have multiple units, it is better to have a different name.

Thanks.

Hardware

ESP8266 Support

Does someone have experience with the ESP8266 and Homepoint? Does that work?

Refactor ConfigReader

Right now ConfigReader reads the JSON config every single time.

Ideally it should read it once and hold all the data for other parts of HomePoint to access.
Adding some kind of Serialize/Deserialize mechanism would allow for Homepoint to be web-configurable at some point.

Unable to build homepoint on MacOS

Hallo,

Thanks for your Great work, I want to complice the code for my M5Stack, but I am unable to complice the code. I installeer all the tools according to the manualen, but when I run:

cmake -DM5STACK=ON ../

I het the error:

-bash: cmake: command not found

I checked my installation of the tools and all the paths seems to be ok. The file CMakeLists.txt has something to do with it, but it is not being used it seems.

Also running:

idf.py menuconfig

Gives the error:

'cmake' must be available on the PATH to use idf.py

My ~/.bash_profile looks like:

export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH export IDF_PATH=~/esp/esp-idf export PATH="$IDF_PATH/tools:$PATH"

Gr. Remco

Plans to productionize Project builds?

I have taken advantage of the flashing from pre-built app straight to firmware, but the build is stuck at the first release. Are there any plans to update this programmatically or by hand?

Bug on device on main screen

Device activation on main screen change the status immediately without waiting response of the return of value "getTopic".
It doesn't appear on device secondary screen (devices in Device-group are OK).

Thanks.

last Step fail

Hi Matt,
a big thank for your great work.

I spend the last two Days to install Homepoint on my ESP32. After changing from Windows to an Linux PC it was a little bit easier. :)
But actually now i cant go further.

I cant find the mistake.

Thanks a lot for helping.

 85%] Building C object esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-time.c.obj
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-touch.c:18:
/home/florian/esp/esp-idf/components/esp32/include/rom/ets_sys.h:1:2: warning: #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead [-Wcpp]
 #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-touch.c:20:
/home/florian/esp/esp-idf/components/esp32/include/esp_intr.h:16:2: warning: #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead [-Wcpp]
 #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-sigmadelta.c:19:
/home/florian/esp/esp-idf/components/esp32/include/rom/ets_sys.h:1:2: warning: #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead [-Wcpp]
 #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-misc.c:34:
/home/florian/esp/esp-idf/components/esp32/include/rom/rtc.h:1:2: warning: #warning rom/rtc.h is deprecated, please use esp32/rom/rtc.h instead [-Wcpp]
 #warning rom/rtc.h is deprecated, please use esp32/rom/rtc.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c:18:
/home/florian/esp/esp-idf/components/esp32/include/rom/ets_sys.h:1:2: warning: #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead [-Wcpp]
 #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c:20:
/home/florian/esp/esp-idf/components/esp32/include/esp_intr.h:16:2: warning: #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead [-Wcpp]
 #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c:21:
/home/florian/esp/esp-idf/components/esp32/include/rom/gpio.h:1:2: warning: #warning rom/gpio.h is deprecated, please use esp32/rom/gpio.h instead [-Wcpp]
 #warning rom/gpio.h is deprecated, please use esp32/rom/gpio.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-spi.c:20:
/home/florian/esp/esp-idf/components/esp32/include/rom/ets_sys.h:1:2: warning: #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead [-Wcpp]
 #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-spi.c:22:
/home/florian/esp/esp-idf/components/esp32/include/esp_intr.h:16:2: warning: #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead [-Wcpp]
 #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-spi.c:23:
/home/florian/esp/esp-idf/components/esp32/include/rom/gpio.h:1:2: warning: #warning rom/gpio.h is deprecated, please use esp32/rom/gpio.h instead [-Wcpp]
 #warning rom/gpio.h is deprecated, please use esp32/rom/gpio.h instead
  ^~~~~~~
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-timer.c:19:
/home/florian/esp/esp-idf/components/esp32/include/rom/ets_sys.h:1:2: warning: #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead [-Wcpp]
 #warning rom/ets_sys.h is deprecated, please use esp32/rom/ets_sys.h instead
  ^~~~~~~
/home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c: In function '__pinMode':
/home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c:90:24: error: 'rtc_gpio_desc' undeclared (first use in this function); did you mean 'rtc_io_desc'?
     uint32_t rtc_reg = rtc_gpio_desc[pin].reg;
                        ^~~~~~~~~~~~~
                        rtc_io_desc
/home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-gpio.c:90:24: note: each undeclared identifier is reported only once for each function it appears in
In file included from /home/florian/esp/homepoint/components/arduino-esp32/cores/esp32/esp32-hal-timer.c:23:
/home/florian/esp/esp-idf/components/esp32/include/esp_intr.h:16:2: warning: #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead [-Wcpp]
 #warning esp_intr.h is deprecated, please include esp_intr_alloc.h instead
  ^~~~~~~
esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/build.make:206: recipe for target 'esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-gpio.c.obj' failed
make[3]: *** [esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/cores/esp32/esp32-hal-gpio.c.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:4925: recipe for target 'esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/all' failed
make[2]: *** [esp-idf/arduino-esp32/CMakeFiles/__idf_arduino-esp32.dir/all] Error 2
CMakeFiles/Makefile2:214: recipe for target 'CMakeFiles/flash.dir/rule' failed
make[1]: *** [CMakeFiles/flash.dir/rule] Error 2
Makefile:216: recipe for target 'flash' failed
make: *** [flash] Error 2

Build issue (probably PEBCAK)

Hi,

I'm trying to build this project but unfortunately encounter a build issue. I think I have a correct environment (including the correct commit version of ESP-IDF).

This is the output I have:

rdehuyss@ronald-desktop:~/projects/Personal/m5stack/homepoint/build$ cmake -DM5STACK=ON ../
CMake Warning at /home/rdehuyss/.esp/esp-idf/tools/cmake/git_submodules.cmake:44 (message):
  Git submodule components/coap/libcoap is out of date.  Run 'git submodule
  update --init --recursive' to fix.
Call Stack (most recent call first):
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:78 (git_submodule_check)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:160 (__build_get_idf_git_revision)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/idf.cmake:42 (__build_init)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:5 (include)


CMake Warning at /home/rdehuyss/.esp/esp-idf/tools/cmake/git_submodules.cmake:44 (message):
  Git submodule components/esp_wifi/lib_esp32 is out of date.  Run 'git
  submodule update --init --recursive' to fix.
Call Stack (most recent call first):
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:78 (git_submodule_check)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:160 (__build_get_idf_git_revision)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/idf.cmake:42 (__build_init)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:5 (include)


CMake Warning at /home/rdehuyss/.esp/esp-idf/tools/cmake/git_submodules.cmake:44 (message):
  Git submodule components/esptool_py/esptool is out of date.  Run 'git
  submodule update --init --recursive' to fix.
Call Stack (most recent call first):
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:78 (git_submodule_check)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:160 (__build_get_idf_git_revision)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/idf.cmake:42 (__build_init)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:5 (include)


CMake Warning at /home/rdehuyss/.esp/esp-idf/tools/cmake/git_submodules.cmake:44 (message):
  Git submodule components/lwip/lwip is out of date.  Run 'git submodule
  update --init --recursive' to fix.
Call Stack (most recent call first):
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:78 (git_submodule_check)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:160 (__build_get_idf_git_revision)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/idf.cmake:42 (__build_init)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:5 (include)


CMake Warning at /home/rdehuyss/.esp/esp-idf/tools/cmake/git_submodules.cmake:44 (message):
  Git submodule components/mbedtls/mbedtls is out of date.  Run 'git
  submodule update --init --recursive' to fix.
Call Stack (most recent call first):
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:78 (git_submodule_check)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:160 (__build_get_idf_git_revision)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/idf.cmake:42 (__build_init)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:5 (include)


CMake Warning at /home/rdehuyss/.esp/esp-idf/tools/cmake/git_submodules.cmake:44 (message):
  Git submodule components/mqtt/esp-mqtt is out of date.  Run 'git submodule
  update --init --recursive' to fix.
Call Stack (most recent call first):
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:78 (git_submodule_check)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:160 (__build_get_idf_git_revision)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/idf.cmake:42 (__build_init)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/project.cmake:7 (include)
  CMakeLists.txt:5 (include)


-- ccache will be used for faster builds
-- Project version: c09760c
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python requirements from /home/rdehuyss/.esp/esp-idf/requirements.txt are satisfied.
CMake Error at /home/rdehuyss/.esp/esp-idf/components/esp32/project_include.cmake:11 (message):
  Internal error, toolchain has not been set correctly by project (or an
  invalid CMakeCache.txt file has been generated somehow)
Call Stack (most recent call first):
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:284 (include)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/build.cmake:449 (__build_process_project_includes)
  /home/rdehuyss/.esp/esp-idf/tools/cmake/project.cmake:315 (idf_build_process)
  CMakeLists.txt:14 (project)


-- Configuring incomplete, errors occurred!
See also "/home/rdehuyss/projects/Personal/m5stack/homepoint/build/CMakeFiles/CMakeOutput.log".

My system:

rdehuyss@ronald-desktop:~/projects/Personal/m5stack/homepoint/build$ printenv PATH
/home/rdehuyss/.esp/esp-idf/tools:/home/rdehuyss/.esp/xtensa-esp32-elf/bin:/home/rdehuyss/.local/bin:/home/rdehuyss/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
rdehuyss@ronald-desktop:~/projects/Personal/m5stack/homepoint/build$ printenv IDF_PATH
/home/rdehuyss/.esp/esp-idf
rdehuyss@ronald-desktop:~/projects/Personal/m5stack/homepoint/build$ cd $IDF_PATH
rdehuyss@ronald-desktop:~/.esp/esp-idf$ git status
HEAD detached at 02f2e6366
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   components/coap/libcoap (new commits)
	modified:   components/esp_wifi/lib_esp32 (new commits)
	modified:   components/esptool_py/esptool (new commits)
	modified:   components/lwip/lwip (new commits)
	modified:   components/mbedtls/mbedtls (new commits)
	modified:   components/mqtt/esp-mqtt (new commits)

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	components/bt/controller/
	components/bt/host/

Any idea what might be wrong?

Add beep on event.

Hi,

Add possibility to make a beep on a event (getTopic and onValue or offValue) :

For example :
{
"name": "Porte 1",
"setTopic": "dumy/garage/porte/status/set",
"getTopic": "dumy/garage/porte/status",
"onValue": "open",
"offValue": "close
"alarmValue": "open,5"
},

In this example, it generate a beep during 5 seconds when getTopic take the value "open"
This alarm is ringing only with external event (ie i don't have push button on ESP to change the state)

Thanks.

Support pre-compiled binary files

  1. Upload HomePoint as a precompiled .bin to ESP32 Devices (ArduiTouch/M5Stack)
  2. First time setup by connecting to an Access Point on ESP32 to configure WiFi to connect to
  3. Edit HomePoint Configuration remotely through web interface

#47

Bulb icons

This is my bulb for the project.
bulb_active.jpg
bulb_inactive.jpg

Thanks.
bulb_active
bulb_inactive

Update Documentation / Toolchain links

Seems like the toolchain download is gone from the ESP-IDF 4.0 documentation, instead relying on a separate installer (first tracked through #22) which is confusing.

Need to either provide links in documentation or take another shot at building from 4.0 master.

Sensors connected to ESP32

Hello,
I am using an ESP32 in the ArduiTouch Housing! It works perfectly! Thank you for this great piece of code.
Because my ArduiTouch is placed in the Bathroom to control the lights, I thought about measuring the temperature and humidity to know when I need to open the window!
Is there any opportunity to connect a sensor (e.g. DHT 22) directly to the ESP32 where Homepoint runs on. My idea would be to copy the needed library to the library folder, compile it by oneself, and then have the possibility to configure the library in the config.json file!

It would be great if something like this would be possible in the future!

Error building Homepoint (wifi)

After investing a lot of time to get esp-idf working I'm now encountering an error when building Homepoint for M5Stack with the latest version of esp-idf (master branch):

[make git:(master) โœ—] make -j 8 flash
.....
"In file included from /Users/xxx/esp/homepoint/main/wifi/WifiContext.cpp:13:
/Users/xxx/esp/homepoint/main/wifi/WifiContext.cpp: In function 'void event_handler(void*, esp_event_base_t, int32_t, void*)':
/Users/xxx/esp/homepoint/main/wifi/WifiContext.cpp:50:31: error: cannot convert 'esp_ip4_addr_t*' {aka 'esp_ip4_addr*'} to 'const ip4_addr_t*' {aka 'const ip4_addr*'}
ip4addr_ntoa(&event->ip_info.ip));
^~~~~~~~~~~~~~~~~~
....
make[3]: *** [esp-idf/main/CMakeFiles/__idf_main.dir/wifi/WifiContext.cpp.obj] Error 1
make[2]: *** [esp-idf/main/CMakeFiles/__idf_main.dir/all] Error 2
make[1]: *** [CMakeFiles/flash.dir/rule] Error 2
make: *** [flash] Error 2"

[Feature Request] ADD Home-Assistant

Dear Dev. That's the most genial Project for me to use it as a small touch panel to control my AC in each room. Unfortunately I use Home-Assistant. Do you plan to make it also running for Home Assistant?

Change bin_address in build_all script

hi matt,
thanks for setting up the partion table, now it works.
But please make a small change for everyone who uses the build_all script.
There the lines with the Python call must be changed from
--bin_address 0x8000 0x1000 0x10000 0x310000
to
--bin_address 0x8000 0x1000 0x10000 0x360000.

Icon

Hi there, may i know how u add the icons ? Like living room, bedroom icon?
im still newbie in uploading images into m5stack so can you help me?

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.