iHost: Using ESPHome on NodeRed (without Home Assistant)

I was Home Assistant user during 2 years, but after moving house and use my Raspberry Pi4 for another application, I was too lazy to install everything again and searched for an alternative. This is why I bought the iHost (I’m still a little disappointed with the limitations, but I’m slowly starting to like it).
I liked the purpose of Tasmota compatibility, since all my dispositives was ESPHome converted.
Luckily, I managed to get ESPHome working and I won’t need to convert them to Tasmota (nothing against the Tasmota, it was only lazy to flash them all again).

This topic I will show how I integrated the ESPHome directly to NodeRed, without the Home Assistant.

Create a Volume “esphome” with folder “esphome-files/” (could be another name)

Install the docker container “esphome/esphome” in HOST mode using the created Volume and access it using:
http://ihost.local:6052/

Config the network in secrets:
wifi_ssid: “YOUR_WIFI_SSID”
wifi_password: “YOUR_WIFI_PASSWORD”
ap_password: “ANOTHER_PASSWORD”

Click in + New Device

If you already have ESPHome devices, click in “Continue” or “Open ESPHome Web” to create a new ESPHome device.

If you want to migrate from Tasmota to ESPHome:

In the case below, I already have a Sonoff Dual R2 flashed with ESPHome using the config: Sonoff Dual R2 | devices.esphome.io

In my case → dev_name: tomada_tv_sala

create_configuration

ESPHomeESP8266

Click in Edit and paste the yaml config said above (for your device), with the same dev_name.

Tip: Add the code below to yaml (this will make possible access the device by web):
web_server:
port: “80”

Validate and after Install. Then click in Wirelessly. It will take a long time to compile and update the device with new configuration.

After compile and flash the device, will show the log:

Now you have a working ESPHome device that can be monitored and edited inside iHost:

Now, its time to use the NodeRed.
First, install the docker container “nodered/node-red” (look on official iHost guide).

With NodeRed running, access it by:
http://ihost.local:1880 or by IP

Inside NodeRed, click in Manager Pallet:

In tag Pallet, find the “node-red-contrib-esphome” and install:

Now get an “espohome” in entry on NodeRed nodoes and doble click it and click in edit:

Config the Device Name, device IP (need to be static) and click in Add:

Then click Done.

Put a Debug node and click in Deploy:

NodeRed6

Double click again on your node device, select “Systems → Status” and Done:

Deploy again and you will see your device connected:

Insert two node Inject, and config one node inject with {“state”:true} and the other with {“state”:false}:

NodeRed10

Put a node esphome out and config the relay:

Connect everything and click in Deploy:

NodeRed13

Now you have a fully functional ESPHome device !

Observations and suggestions:

  • This can be accessed only inside the Node Red or trigged by another ewelink device (using ewelink integration).
  • It would be really good if the iHost allow to create a manual scene button without action or virtual devices, because this could be used like a Button on Cast to Activate the ESPHome devices.
  • Another improvement that could be done is allow the ESPHome devices could be found directly from ESPHome, or directly from network, like is done in Home Assistant (to don’t be needed the static IP).
  • The ewelink token could be taken by localhost, not needing to configure static IP in iHost.
3 Likes

Awesome! thanks for sharing :grinning:

Excited Awesome GIF

1 Like

Actually ihost can add virtual devices via node-red, don’t know if that can meet your needs.
the cube node in node-red, there is a register node that can create a device in iHost.

@JordanWise,

I tried, but I cant use the register node:

Could you help me how to use ?

Thanks

I found the answer on here: