[APP][Pro] ESPhome - Control your ESP8266/ESP32 by simple configuration files

If I may interfere:
To me: ESPeasy = very complicated
ESPhome = quite easy

:grinning::+1:

Well your question is not (I think) about the ESPhome or ESPeasy firmware, but more likely about the Homey app.
I wrote a wiki, which describe the logic behind the app I made, a user guide and lot of screenshots :slight_smile:

1 Like

Hi,
I have a ESPhome device for controlling my bathroom fan.
I have added to Homey but in the flows I can only select one switch.

Is it possible to add a button or a list to change the speed of the fan.
Also it is not possible to use the textSensor component.
I want to use it for the actual speed of the fan.

- platform: custom
  lambda: |-
    auto fansendstandby = new FanSendStandby();
    App.register_component(fansendstandby);
    return {fansendstandby};
  switches:
    name: "FanSendStandby"
    id: swfan_standby
    icon: mdi:fan
    
- platform: custom
  lambda: |-
    auto fansendlow = new FanSendLow();
    App.register_component(fansendlow);
    return {fansendlow};
  switches:
    name: "FanSendLow"
    id: swfan_low
    icon: mdi:fan

- platform: custom
  lambda: |-
    auto fansendmedium = new FanSendMedium();
    App.register_component(fansendmedium);
    return {fansendmedium};
  switches:
    name: "FanSendMedium"
    id: swfan_medium
    icon: mdi:fan

- platform: custom
  lambda: |-
    auto fansendhigh = new FanSendHigh();
    App.register_component(fansendhigh);
    return {fansendhigh};
  switches:
    name: "FanSendHigh"
    id: swfan_high
    icon: mdi:fan

text_sensor:
- platform: custom
  lambda: |-
    auto fanrecv = new FanRecv();
    App.register_component(fanrecv);
    return {fanrecv->fanspeed,fanrecv->fantimer,fanrecv->Lastid};
  text_sensors:
    - name: "FanSpeed"
      icon: "mdi:transfer"  
    - name: "FanTimer"
      icon: "mdi:timer"
    - name: "fanLastID"
      icon: "mdi:id-card"

@JeroenD For me, you should use the select component, then mapping to the Homey app will be much easier: Select Component — ESPHome

Thanks, i will look for that!

Can someone help me with the integration of this device, please? I can’t find a way to include the switch - only see sensors here…

(great device because it can handle 16A)

I do not see any reason it would not appear.
Open a github ticket and provide the logs …

I created a device in homey via the esphome way:

  1. created a physical device

  2. created a virtual device

image

  1. added capabilities

but I do not see a type “button”

Probably because of this:
image

Two capabilities have the same name seems …

Can you colelct the debug info and open an issue:

1 Like

@Baldhor Can you send me in the right way to find out what the reason could be that the app shows me that all the devices are offline.
When i reset the app everything works again.
I checked if the signal is good enough and with that i cant find the error.
If i cant find it can i implement a flow to reset the app every 24 hours or so?

@Patrick_85
1/ Is console.re enabled?
It has a memory leak, so it should only be enabled when needed to collect additional logs

2/ The reconnection feature is working as far as I know
My devices run smoothly since months now …

3/ open a ticket in the github projet

and do not forget to collect the debug info from the wizard (in the manage physical devices view).

4/ I will probably ask you to enable console.re for additional logs

@SvenRhein So actually, the problem is that the application is not informed that the native entity exist …
I’m unsure why to be honest …

But I can propose you a work around …

You need to modify the yaml configuration of the device to add another entity
=> It will act as a bridge

Hopefully, you know how to modify the yaml file, compile it, and upload it inside your device …

switch:
  - platform: gpio
    name: "Power"
    pin: GPIO5
    id: relay
    restore_mode: ${relay_restore_mode}

should become:

switch:
  - platform: gpio
    pin: GPIO5
    id: relay
    restore_mode: ${relay_restore_mode}

  - platform: template
    name: "Power"
    id: relay_bridge
    optimistic: true
    restore_mode: ${relay_restore_mode}
    turn_on_action:
      - switch.turn_on: relay
    turn_off_action:
      - switch.turn_off: relay

i did send you the log in pm and also the code for the debug log in PM

to be honest - no - I do not know

@Peter_Kawa You think you could explain how to update yaml config of a device, compile it and upload it?
To be honest, I’m unsure the way I do it is the best one, so I’m asking you in the purpose to also compare with your way :slight_smile:

For info, here is how I do it:

Install python : https://www.python.org/downloads/
=> Don't forget to check the option to add python to path

Open a terminal : cmd.exe
Create esphome directory : mkdir esphome
Go inside that directory : cd esphome

Install esphome:
	python -m pip install wheel
	python -m pip install esphome

Check if it works by typing python -m esphome

Prepare the confioguration file of your device :
	mkdir myconfig
	python -m esphome wizard myconfig\<device_name>.yml
Edit the configuration file and add the required components :
	notepad myconfig\<device_name>.yml

You can then compile the configuration file :
	python -m esphome compile myconfig\<device_name>.yml

The binary files are created into : myconfig\.esphome\build\<device_name>\.pioenvs\<device_name>\
There are 3 binary files (see below) :
	esphome_2023.7.0-dev_cb3s_bk7231n_lt1.1.0.uf2
	firmware.bin
	firmware.uf2

For first time (wired), use the command : python -m esphome upload myconfig\<device_name>.yml
	It will choose the correct file (or should ...)

For OTA, connect to the device web interface and upload the file firmware.uf2

edit: updated the how to, now using latest version of esphome (just a little more simple)

To bad the update don’t work for me.

Then when I reset the app everything is working again.

@Baldhor , great work, just donated some drinking-money. Thanks again!

1 Like

I uploaded to git the firmware for athom-smart-plug-v3 with a fix:

You can just upload it to your device using the webserver

If it fix your problem, a beer is welcome :slight_smile:

edit: I’m 100% sure it will not break your device, but I’m only 99% sure it will fix your issue :slight_smile: