Looking for help with ESPHome initial setup

I am following the documentation for the Everything Presence Lite - This is my first ESP device, and I when trying to connect it to HA I am getting: “Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.” From my cursory searching I cannot find a simple answer, It feels like this is a generic “something went wrong” message.
I am not using any encryption, so I would not expect that I should have to modify my YAML file?
It may be network related as the HASS server on a different VLAN from my IOT devices, however I have confirmed that the firewall rules allow all of my IOT devices to talk tot he HASS server and it can talk to that entire VLAN. (I am not an expert Network guy, but I know a little). I can ping the sensor, so I know I have the right IP address.
This is very new to me, I don’t quite “get it” yet when it comes to ESPhome - what are my next steps for troubleshooting the failed setup?

Is this in your YAML for the device?

image

Welcome to the forums

What is that? Please point to this project or tutorial or whereever you go this from.

Also your (properly formatted) yaml and your full log are really the minimum needed for support.

This is the newest device from Everything Smart Home. The documentation is here: Home | Everything Presence Lite.
As for the other items, can you be more specific. I am unsure which YAML file I need to be looking at. There are several, and I do not fully understand how they all fit together (I still have a lot to learn).
I don’t have the logs yet, I am still trying to figure out how to get them ones.

To be clear I was not looking for the community to fix it for me, just help point me in the right direction, which is why my post is lacking in details.

Wll I think the right direction is to ask the vendor for support.

Does it work if you put it on the same vlan as home assistant?

Is this supposed to be in the configuration.yaml - or is there another device specific yaml file you are referring to?

No, not in your configuration.yaml but in the ESP yaml file for the device.

The device uses code from a github repository and it does have api: in the yaml file. See everything-presence-lite/common/everything-presence-lite-base.yaml at ec8f5e8f84b4400ef71ae01b62dc1db65598e741 · EverythingSmartHome/everything-presence-lite · GitHub

I suspect the problem is in the vlan setup.

@fmarmstrong How did you add the esp device to the home assistant integration? By hostname or ip address?

@nickrout id you build this yourself with the kit or get the reassembled version?

I ask because it looks like the preassembled version is pre-flashed, so you only need to connect it to Wi-Fi and add it using the ESPhome integration. If not, then you’ll need to flash it following their instructions (I didn’t follow all the way through but it looks like they’re using the ESPhome web flasher) to flash through your browser on a regular PC.

More abstractly, here’s a primer to (hopefully) help figure out how the pieces fit together.

EDIT: Reread and see where @nickrout was going with this. I would follow his suggestion of temporarily connecting it to the same network as HA to see if it clears the problem up. The link above may still help.

I tried both and had the same result. As per your suggestion, I will try moving it to the same vlan as my HA Server this evening to see if that changes anything (work getting in the way of fun stuff).
Either result will likely result in more questions, but any information is progress, right.
Thanks.

1 Like

As you suspected, the device works when connected to the same subnet as the HA server. This is good, but does not meet my security needs.
My VLANS are set up so the IOT VLAN only has access to the IP Address of the HA Server. The HA Server has full access to all addresses on the IOT VLAN. I have a couple of Kasa plugs on the IOT VLAN and I can control them with HA - So I believe I have my rules setup correctly. I am not restricting ports or protocols.

Taking it a step further (for testing purposes) I opened up the VLANs communication on the router so that ALL traffic is permitted both ways across the VLANS, and HA will still not find it. Is there some configuration I need that may be preventing HA from looking outside of it’s own subnet to connect to an ESPHome device - even though I have specified the IP?

For no reason that I can explain - 2 hours later, the device successfully configured in HA. I have since returned the VLANs to their original configuration and the device continues to function correctly, both sending and receiving data to/from the HA Server.
I will mark this as resolved, but I cannot fully explain why is started working.

Im also having this issue and have engaged Lewis.

Sadly my devices (5) have not magically resolved themselves.

So you have your devices in a separate vlan? It will be a problem.