Deploying an EI model with ESPHome


I’m looking for some help to deploy an Edge Impulse model within an ESPHome project (running on an ESP32).

I suspect the easiest way to do this would be to wrap up the resultant Edge Impulse C++ library within an ESPHome ‘custom component’. I have successfully used this approach with a native TFLite model but Edge Impulse seems to add another layer of complexity.

Has anyone here attempted to do this already? If so, I’d be grateful for your advice, or ideally, some code I could adapt.


[PS - yes, I have posted the same question on the ESPHome forum, but I suspect there’ll be more relevant expertise here.]

1 Like

Hi @codersaur,

I am not familiar with ESPHome, so I’d be curious to know if someone else has managed to get this to work. My guess is as good as yours–I would think wrap the Edge Impulse library in a custom class as per (Custom Sensor Component — ESPHome). If you can share the exact error messages you are seeing during compile or run time, we might be able to point you in the right direction for debugging.

1 Like

Hi @shawn_edgeimpulse @codersaur

I would also be super interested in getting this working. The possibilities of ESPHome with EI and Home Assistant are mind-blowing. I am currently looking into it and hope to contact some people of the HA team to see if they are interested.

I started down this path myself and it is quite a mess dependency-wise. ESPHome has a pretty rigid library structure I think – I’ve only use platformio inside of vscode, which handled much of that automagically.

Any progress or findings on this @langestefan ? I agree this would be quite powerful and abstract away that pesky toolchain part… And as importantly, I can see all of my data as sensors in my dashboard.


No it was way too much work to do it next to my job and master degree. After doing some EI projects and becoming more aware of the limitations I also lost a lot interest in EI so I’m not planning to return to this topic.

Understandable. I’d like to hear more about the limitations you found. Just starting on my journey here.