Using the camera component to display the IR temperature array from a MLX90640 via MQTT

Guys,

My ultimate goal is to use the “images” formed by 768 pixels, each containing the IR temperature of the objects on range, to determine presence in different parts of an area at my place.

I’m near to complete the sensor which is based on an ESP32 and ESPHome that provides MQTT messages to a topic, with an array that has 768 elements that represent the temperature on each pixel.

At this stage, my interest is to be able to see that image at Home Assistant using the camera component.
I have found a MQTT camera component variant at HA https://www.home-assistant.io/components/camera.mqtt/ that process messages whose content is the binary of the image.

But I have no experience on this. Can anyone please give me a light on where to look for info on how to decode the MQTT messages that contain the array of data to create what the Camera component needs?

Thank you!

1 Like

Hi @MrMauro ,

Three years later, i am following in your footsteps.

Did you ever make any progress with this mlx90640 sensor and esphome?

Using it as presence detection, and as camera for debugging and to use with deep stack sounds very promising.

Thanks and cheers
Robert

1 Like

Hi @wunsch,

Unfortunately I wasn’t able to continue any longer with that idea. But I would like to resume it for the reasons you mention.

I only have some old code for Arduino regarding the collection of the data from the MLX. I guess it is not a problem to make a working component for the ESPHome from that code.

The issue for me is on the HA side. I’m not sure how to accomplish the presence detection from the data reported by the EPS.

If you lead this, I’ll be glad to help!

1 Like

Have you looked at the thermal camera integration? I haven’t done it yet, but it looks fairly straightforward to setup a. binary sensor

1 Like

Thank you for that @Zipties
It seems that’s the way to go.

Merry Christmas: M5Stack-ESPHome/Thermal Camera Unit (MLX90640).md at main · Chill-Division/M5Stack-ESPHome (github.com)