ESPHome Indigo Plugin

User avatar
GlennNZ
Posts: 1615
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

ESPHome Indigo Plugin

Post by GlennNZ »

Image

https://github.com/Ghawken/ESPHome_Indi ... /tree/main

This is a plugin for Indigo (Indigodomo) to allow direct access to some ESPHome sensor devices, and growing over time switches/action devices. This connects directly, locally to the ESPHome device via the local network and requires nothing further. The ESPHome device needs API enabled. ESPHome is a complex, fantastic project and overtime has become very mature/stable.

Many thanks for the enormous man-hours of maintaining and updating this project - it truly is an impressive feat.

So What is ESPHome? (What follows is my, likely limited understanding)

https://esphome.io/
& sensor options: https://esphome.io/#sensor-components


It is essentially firmware for a number of microprocessors, most common, and most powerful the ESP32.

The ESP32, such as this relatively expensive $22 USD one: https://www.sparkfun.com/products/15663
Image
Sparkfun Thing Plus:

or
Image
https://shop.allnetchina.cn/collections ... 3005795430

This includes a processor, memory, Wi-Fi connection, a number of pins for connecting sensors/devices.

Oh shoot, I read this far and how this seems far too complicated?

Hold off for a couple of minutes...
Sure it sounds somewhat complicated, but actual setup is straightforward.

This above ESP32 option includes a QWIC connection for i2C devices, meaning plug and play for a high number of sensors.

But anyway – on to setup.

Need:

Need ESP32 (or like device) like above, which is $22 USD.

Plug it into a USB port on a computer (Possibly some drivers needed depending on PC).

Go to http://web.esphome.io.

Press the Connect button and find the USB-connected device.

Install the latest version of ESPHome onto the device via the install button on the web.

Enter Wi-Fi details – and in a minute or two, you have a default ESPHome device connected to your Wi-Fi.

Admittedly, it won’t do much – but it connects, and you can visit its web server with its IP in a web browser. It also enables Over the Air updates via the web browser where you can upload new firmware.

See, very easy!

So what now?

Now you need to customize the firmware for the device. To do so, you need to install ESPHome (the software responsible for creating the firmware) on a computer. The firmware is modified depending on the configuration YAML file and is then uploaded to the device, either via the web or via USB.

See: https://esphome.io/guides/installing_esphome

For me, on a Windows device, it was as easy as:

Running the below, having already had a Python3 install:

Code: Select all

pip3 install wheel

Code: Select all

pip3 install esphome
Now we have an esphome command (Python script) to create the correct firmware for the device. This does need a YAML file, detailing the device details and any sensors/switches you might have added. Can start with the command, in a directory where the YAML file will be saved.

Code: Select all

esphome wizard nameofyaml.yaml
And this takes you through basic setup options, then pretty easy to add sensors, and other devices as per the instructions. Once the appropriate code has been downloaded, the firmware bin has been created it then needs to be placed on your new ESPHome device. This is very easy if you can connect via USB, or can use the firmware.bin file and web page for OTA updates.

If you already have an ESPHome device or ‘works with ESPHome device,’ then as long as ESPHome API is enabled on the device, it should be able to connect to it with this plugin.

Why this Plugin?

It enables direct Indigo -> Each ESPHome device communication/connection without the need for anything else. It is a very simple and robust way of getting a huge number of sensors into the Indigo system directly. Sensor updates, or button presses are immediately communicated back to Indigo.

Other options:

The piBeacon Indigo plugin enables similar sensor support/and much more, but rPIs are hard to find, and another level of expense compared to a $5 ESP32. Alternatively, I suspect one of the HA plugins, and then duplicating ESPHome devices from HA into Indigo may also work. To me, this approach is:

1. Simpler.
Uses an ESP32, firmware avoids the cost, and overhead of RPI/SD-Card, formatting, etc. Only possible because of ESPHome, mind you!
2. Avoids the need for other systems/RPI/Computers running elsewhere and complexity of communication risk.
3. Gives us immediate communication in both directions. Other time I hope to expand the device control – lights, switches, plugs, and enable increased support for these types of ESPHome devices. (The issue being there are an infinite number)

This enables direct support for the huge number of works with ESPHome devices.

Okay... So far I haven't mentioned the Plugin... well mainly because I wrote this summary elsewhere and haven't really sorted it out as yet... But that has all changed in the last 5 hours or so...

Plugin:

Download. Install double click. We do have some dependencies., which in Indigo 2023.2+ are automatically managed. - so double click away

Essentially, nothing will happen all going well except the plugin will start.

Next create an ESPHome4Indigo Core Device (the only device option)
Name it ideally before much else...
Image

Enter the IP address of your ESPHome device, password, and port (defaults to 6053)
Press Save:

& All the Sensor devices, and all the Switch devices connected to this ESPHome device will be created in Indigo. Live updating and the ability to turn on/turn off switch devices currently.

These Sensor and Switch devices will be all grouped together in one Device Group. But they are all separate standard indigo devices and can be exported into other ecosystems (like Homekit) without problem. (via HomekitLink plugin)

If you need to recreate Devices as have some changes - delete current devices (sorry might update this aspect) and then press Recreate Devices. All Sensors and Switches (the only devices this version supports are created as a Device Group) The main Core device I have left outside of this group so you can delete and add sensors etc. more easily.
Image
Image
Image

or Repeated as a chatGPT generated advertising summary of above:
:D :D :D :D :D :D :D :D :D :D :D

"In a world where smart home automation reigns supreme, get ready for the ultimate connectivity experience! From the studio that brought you 'HomeKitLink' and 'AppleTV for Indigo,' comes a groundbreaking new adventure – 'ESPHome4Indigo'!

Prepare to be amazed as we dive into the heart of cutting-edge technology. It's a journey where ESPHome, the firmware for the powerful ESP32 microcontroller, takes center stage. Meet your guide, the $22 ESP32 device, packed with memory, Wi-Fi, and plug-and-play capabilities for an array of sensors. This ain't rocket science; it's simpler than you think!

Join us as we unveil the magic of ESPHome. Set up your ESP32, connect it via USB, and let the web interface do the rest. Customize your firmware with ESPHome, and you're off to the races. But that's just the beginning!

Now, enter the world of 'ESPHome4Indigo' – the plugin that bridges the gap between Indigo and ESPHome devices. It's a direct connection, no middlemen, no fuss. Watch in awe as your ESPHome sensors and switches seamlessly integrate with your Indigo system. Instant updates, two-way communication – it's like a dream come true.

Discover why 'ESPHome4Indigo' is the top choice. No need for costly alternatives or complex setups. This plugin is the future of home automation. But there's more! Stay tuned as we expand device control, lighting, switches, and plugs. The possibilities are endless, and you're at the forefront.

But wait, there's a twist! 'ESPHome4Indigo' is not just a plugin; it's an epic adventure waiting for you. Download, install, and embark on a journey like no other. We've got the dependencies lined up, and the plugin is ready to roll. It's a breeze, just like a blockbuster movie – sit back and watch the magic unfold.

So, don't miss out! Get ready to explore the incredible world of 'ESPHome4Indigo.' It's your ticket to a smarter, more connected home. From the studio that brought you innovation, get ready to be amazed. Your home, your rules – 'ESPHome4Indigo' is here to make it happen."
User avatar
mundmc
Posts: 1067
Joined: Fri Sep 14, 2012 4:34 pm

Re: ESPHome Indigo Plugin

Post by mundmc »

Oh my god oh my god Glenn this AMAZING! Seriously, for basic sensor devices and actuator devices (that don't really need to run custom code on the device), this makes DIY homeautomation suddenly very affordable and WAY easier than learning micropython/arduino C/ VS Code and mqtt/ api calls.

Anybody even curious about this, I strongly recommend giving it a go. You can get four packs of ESP32's on Amazon for $25 USD (I use https://amzn.to/3QeqI70 for all of my projects, mainly because they are expensive and I am very familiar with the 30 pin layout).

Kudos and congrats!
User avatar
GlennNZ
Posts: 1615
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: ESPHome Indigo Plugin

Post by GlennNZ »

0.1.5

Plugin Store Release

Indigo 2023.2 Version Only. API 3.4

Move to Indigo managing all dependencies/libraries.
Limit floats to five decimal places
Space between value and units
User avatar
GlennNZ
Posts: 1615
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: ESPHome Indigo Plugin

Post by GlennNZ »

mundmc wrote:Oh my god oh my god Glenn this AMAZING!
Kudos and congrats!
Unneeded quote - but I think I might start all updates with it!

Have a new update which is 0.1.7, following a PM and request to support Ratgdo devices as much as possible (these are native esphome devices)
Joe - has a specific plugin for Ratgdo .. here... https://www.indigodomo.com/pluginstore/296/ but this may be another option for some as requested.

0.1.7

Add support for:
TextInfo devices
CoverInfo devices
& correct some issues with Button devices that previous version had

As best as can tell, and please troubleshoot here should support Ratgdo with IP address needed only.

Have a demo ESP flashed with ratdgo firmware, but because no door exists can't quite troubleshoot everything...
User avatar
haakon
Posts: 49
Joined: Thu Mar 02, 2017 4:14 am

Re: ESPHome Indigo Plugin

Post by haakon »

Just want to say a huge thanks for the amazing plugin, GlennNZ! It opens up some seriously cool possibilities. I’ve now set up a sensor that tracks three different temperatures and monitors a door – all at half the cost of a Z-wave sensor that measures a measly single temperature. Wow.

Electromechanical parts and button components would be awesome additions. And display components would be absolutely mind-blowing, even if I don’t quite get how they work just yet.

Anyway, thanks so much!
User avatar
GlennNZ
Posts: 1615
Joined: Sun Dec 07, 2014 3:33 pm
Location: Central Coast, Australia

Re: ESPHome Indigo Plugin

Post by GlennNZ »

haakon wrote:Just want to say a huge thanks for the amazing plugin, GlennNZ! It opens up some seriously cool possibilities. I’ve now set up a sensor that tracks three different temperatures and monitors a door – all at half the cost of a Z-wave sensor that measures a measly single temperature. Wow.

Electromechanical parts and button components would be awesome additions. And display components would be absolutely mind-blowing, even if I don’t quite get how they work just yet.

Anyway, thanks so much!
Thanks!

Glad someone has found it…. never sure whether I’m talking to myself sometimes…

The aim was to make it very easy and as fool proof as possible to add the sensors once you have the main device with a set IP address. Because it uses the underlying API of Esphome seems very quick and robust.

The nature of Microprocessor ESP32s seems to be that they just keep going and going and going. Have yet to a have a major issue with one of many I now have. Also I really like the external wifi antenna for ESP32s - so can reach places previously struggled with build in wifi of other options. And doesn’t run hot - so can lock them away in isolated hot places and don’t crap out like other options.

Anyway back to Plugin:
Pretty sure Buttons are supported, and switches?
(and all sensors and textInfo)

Displays: Not sure that would be ideal for the plugin, most of the display code is on the ESP32 itself. Which needs to be hard baked when install the esphome software.

Basically you choose what to display, from the local ESP32 device. eg. if Pool, temperature sensor connected - can add a display which in the local ESP32 code will display the current reading on said display. (that I have done). So doesn’t really need plugin - other than getting temperature back to Indigo, which happens currently.

But happy to discuss your thoughts - not completely sure what you mean by electromechanical parts - I’ll google now!

Glenn


Sent from my iPad using Tapatalk
User avatar
haakon
Posts: 49
Joined: Thu Mar 02, 2017 4:14 am

Re: ESPHome Indigo Plugin

Post by haakon »

I agree. Even though I haven’t used them for long, the ESP32s seem incredibly robust and easy to work with.

I didn’t know buttons were supported—I’ll have to try that out! (Or hmm, maybe that’s the same as a binary sensor ...)

I actually meant electromechanical "components": I’m thinking of servos and stepper motors. Devices for controlling curtains, physical buttons, and so on have notoriously been expensive and hard to find in the smart home world.

As for displays, I was imagining the possibility of creating affordable touch panels for controlling scenes and stuff. But that might get complicated and cumbersome with ESPHome, I guess.

Looking forward to testing out the plugin even more!
User avatar
mundmc
Posts: 1067
Joined: Fri Sep 14, 2012 4:34 pm

Re: ESPHome Indigo Plugin

Post by mundmc »

haakon wrote:I agree. Even though I haven’t used them for long, the ESP32s seem incredibly robust and easy to work with.

I didn’t know buttons were supported—I’ll have to try that out! (Or hmm, maybe that’s the same as a binary sensor ...)

I actually meant electromechanical "components": I’m thinking of servos and stepper motors. Devices for controlling curtains, physical buttons, and so on have notoriously been expensive and hard to find in the smart home world.

As for displays, I was imagining the possibility of creating affordable touch panels for controlling scenes and stuff. But that might get complicated and cumbersome with ESPHome, I guess.

Looking forward to testing out the plugin even more!
Hey!

Please share any cool photos/schematics of the stuff you deployed.

It's been over a year and I haven't tried this plugin yet (I've been distracted with a bunch of other ESP 232 paste project).

I'm pretty sure i'm gonna use the plugin for my next project: PID tuning the thermostat to my wife.

The esp32 will read from a button and a load cell to determine how frequently and forcibly my wife hits the "make it hotter" or "make it cooler" buttons.
User avatar
haakon
Posts: 49
Joined: Thu Mar 02, 2017 4:14 am

Re: ESPHome Indigo Plugin

Post by haakon »

Please share any cool photos/schematics of the stuff you deployed.
Sure! Here is one of my more refined creations. It measures three different temperatures using waterproof DS18B20 probes. Custom PCB with JST connectors, allowing for easy connection of sensors.
I'm pretty sure i'm gonna use the plugin for my next project: PID tuning the thermostat to my wife.
Sounds cool. How will you get PID control? Custom code?
Attachments
IMG_8218.jpeg
IMG_8218.jpeg (192.21 KiB) Viewed 10 times
IMG_8227.jpeg
IMG_8227.jpeg (235.39 KiB) Viewed 10 times
Pretty simple PCD with connectors for three bus sensors, two binary sensors, a LED for testing and an optional battery connector.
Pretty simple PCD with connectors for three bus sensors, two binary sensors, a LED for testing and an optional battery connector.
schematics.png (193.19 KiB) Viewed 10 times
Post Reply

Return to “ESPHome4Indigo”