FreeTouchDeck icon indicating copy to clipboard operation
FreeTouchDeck copied to clipboard

FreeTouchDeck for Home Assistant

Open CeJienAJPC opened this issue 4 years ago • 25 comments

Is there a way, for you to bring this awesome project to Home Assistant too? I already commented on your Youtube Video regarding this (repeating here, coz this is a proper channel for adding NEW REQUESTS). Apologies though.

FreeTouchDeck + Home Assistant = Too many interesting use cases

Would love to see this project with Home Assistant

Regards

CeJienAJPC avatar Nov 22 '20 13:11 CeJienAJPC

I've been looking in to this and Home Assistant exposes an RESTful API. I'm not sure yet on how to implement the use of this API (I mean the user interface and configuration), but I have been testing using HTTPClient at the same time as Bluetooth and those seem work together just fine.

Docs: https://developers.home-assistant.io/docs/api/rest

DustinWatts avatar Nov 22 '20 17:11 DustinWatts

Well... did some work on it the past month. And some basic integration is working now in my development version that I have locally. The part that doesn't work is is when HA is configured with DuckDNS to use SSL because there is not enough ram on the ESP available to start a secure network client. However, HA can be configured to use both SSL for outside connections and normal HTTP over internal connections. So I'm probably going to release this version with HTTP HA support together with a tutorial on how to set it up.

But... progress is being made!

DustinWatts avatar Dec 28 '20 20:12 DustinWatts

That's a great progress. Thanks Dustin

CeJienAJPC avatar Dec 29 '20 04:12 CeJienAJPC

@CeJienAJPC Hmm I really like the Idea of Home Assistant integration on TouchDeck but there are already Projekt that are Implementing this and are Home Assistant centered. For example: https://esphome.io/components/binary_sensor/nextion.html

I thing a better way would be to keep the focus of FreeTouchDeck in the core functionality and extensibility of the project. This would free up resources here.

Note: Giving Free Touch Deck an extensible component structure could help implement different Use Cases more easily.

Syndlex avatar Feb 08 '21 11:02 Syndlex

I was thinking of expanding the code to allow for mqtt messages to be sent. Should not be hard to implement. Action 11 is available. Duplicating the wifi struct for mqtt server and adding config action field for mqtt messages. Once an mqtt message is set/reset, a counter should be updated allowing the device to determine whether connection to the broker needs to be established on boot. I can’t see how you responded to the HA request, though.

romix123 avatar Feb 15 '21 20:02 romix123

@romix123 One of the issues is that a combination of the TFT library, BLE, WiFi and the MQTT pubsubclient takes up a lot of resources. So a combination of all these functionalities is quite a challenge. My response to the HA request was that I have a version given to a few people on my discord to test. But if you'd like to help and get a stable version with MQTT, I'm up for it!

DustinWatts avatar Feb 15 '21 21:02 DustinWatts

I will give it a shot. Browsing through the code, it feels like there is room for code optimisation as well.

Best, Ronald Leenes

Verstuurd vanaf mijn iPad

Op 15 feb. 2021 om 22:33 heeft Dustin Watts [email protected] het volgende geschreven:

 @romix123 One of the issues is that a combination of the TFT library, BLE, WiFi and the MQTT pubsubclient takes up a lot of resources. So a combination of all these functionalities is quite a challenge. My response to the HA request was that I have a version given to a few people on my discord to test. But if you'd like to help and get a stable version with MQTT, I'm up for it!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

romix123 avatar Feb 16 '21 07:02 romix123

@romix123 I totally agree with there being room for code optimization!

Groet, Dustin

DustinWatts avatar Feb 16 '21 07:02 DustinWatts

Take a look openHASP, it runs on Dustins hardware.

gjelsoe avatar May 31 '21 17:05 gjelsoe

I'm going to vote for adding OpenHab to the list... There is a REST interface as well as MQTT.

seraasch avatar Jun 12 '21 18:06 seraasch

Take a look openHASP, it runs on Dustins hardware.

I want to try this on openhasp! What binary does the ESP32 use? Please share if you have this working!

rlust avatar Jul 22 '21 14:07 rlust

Take a look openHASP, it runs on Dustins hardware.

I want to try this on openhasp! What binary does the ESP32 use? Please share if you have this working!

You can find the binary in the release: https://github.com/HASwitchPlate/openHASP/releases/tag/v0.6.0

DustinWatts avatar Jul 23 '21 07:07 DustinWatts

Which binary do I use for a ESP32 WROOM DEV module? I am trying freetouchdeck_full_4MB_v0.6.0.bin

Chip Info:

  • Chip Family: ESP32
  • Chip Model: ESP32-D0WDQ6 (revision 1)
  • Number of Cores: 2
  • Max CPU Frequency: 240MHz
  • Has Bluetooth: YES
  • Has Embedded Flash: NO
  • Has Factory-Calibrated ADC: YES
  • MAC Address: 24:0A:C4:EC:26:CC Uploading stub... Running stub... Stub running... Changing baud rate to 460800 Changed.
  • Flash Size: 4MB Unexpected error: The firmware binary is invalid (magic byte=FF, should be E9)

I am getting the above error.

rlust avatar Jul 24 '21 00:07 rlust

I am getting the above error.

Hmmm... I'm not sure what's happening there. Can you open an issue here? : https://github.com/HASwitchPlate/openHASP/issues

DustinWatts avatar Jul 24 '21 07:07 DustinWatts

Thanks for the help! I got openhasp loaded. Do you have any ideas on how to configure OpenHasp to use your TFT Combiner. Have the web page working but no display. I am using a ILI9488.

rlust avatar Jul 25 '21 14:07 rlust

You have to define the correct pins to use. The pins are:

TFT_BL 32
TFT_MISO 19 TFT_MOSI 23 TFT_SCLK 18 TFT_CS 15 TFT_DC 2 TFT_RST 4

TOUCH_CS 21

Also, you can try check if the display is working by uploading an example from the TFT_eSPI library. Use the User_Setup.h that is in the examples folder in this repo. Use the "resistive touch" verison.

DustinWatts avatar Jul 26 '21 07:07 DustinWatts

Did you have to short J1 pin to make 3.5 TFT SPI ILI9488 work with ESP32 ?

I cannot get an¥ light on the display. DO I need to have a setting for the LED? I have tried 2 ESP and ILI9488 panels, and no activity on display. I have it configured in Home Assistant just fine I think.

rlust avatar Jul 26 '21 14:07 rlust

I was able to short 3.3V to LED on the ILI9488 and get a display. It is dim but readable. What gpio on the ESP32 should I set to control display brightness?

rlust avatar Jul 26 '21 17:07 rlust

So, I want to generalise this issue to, instead of integration with HA, add the ability to send HTTP requests. That will allow to integrate it with any REST service of your choice. Then we can write guides about how to integrate HA if that is what you want using the REST API, along with other services.

By the way, a mention to the openhasp project with a note on which binaries to use will also help a lot of people find the right resources.

danielo515 avatar Nov 15 '21 09:11 danielo515

This issue has been stale for a while now

github-actions[bot] avatar Jun 06 '22 21:06 github-actions[bot]

Preventing the bot from closing the issue (at least I think this comment stops it 😀)

frostworx avatar Jun 07 '22 14:06 frostworx

Preventing the bot from closing the issue (at least I think this comment stops it 😀)

Actually good question. Maybe I have to remove the stale mark myself :)

The situation hasn't changed yet though. Although.. I am working on a version of FreeTouchDeck (the 0.9.18a) that is ready for the ESP32-S3 with better cores and more SRAM (most important bit) which makes it possible for Home Assistant Support. The how is the big question for me atm. Mostly struggling with the configurator. So stale issue, but work behind the scenes 😄

DustinWatts avatar Jun 07 '22 14:06 DustinWatts

This issue has been stale for a while now

github-actions[bot] avatar Aug 06 '22 21:08 github-actions[bot]

:)

frostworx avatar Aug 07 '22 06:08 frostworx

Should be possible soon with the new version of FreeTouchDeck and in combination with an ESP32-S3

DustinWatts avatar Aug 28 '22 04:08 DustinWatts

This issue has been stale for a while now

github-actions[bot] avatar Oct 27 '22 21:10 github-actions[bot]