Close

Rethinking the IoT setup

A project log for Recycled IoT pet feeders

Upgrading 10 year old automated pet feeders with IoT functionality using an ESP32 microcontroler

bradley-austin-davisBradley Austin Davis 02/18/2022 at 20:210 Comments

Having done the debugging of the ESP32-CAM board and decided to use image processing in this, I realized that I don't want to be constantly sending images off to AWS.  It would be much more cost effective for me to have the cameras register themselves with a service running on my local network (likely on my FreeNAS fileserver) that could do image processing, change detection, etc, and could manage all of the feeders itself, while acting as a single IoT device from the perspective of AWS.

This will make it much to have the devices all programmed with the exact same image, and differentiate themselves to the hub server via MAC address.  I can then have hub able to do things like watch for changes in the camera stream, automatically capture images based on certain criteria, etc.

The only tricky bit is my connectivity.  My ISP router provides my NAT, giving my local network a 192.168.0.0/24 address space.  However, the router's positioning and WiFi support aren't good enough for my house, so I use a set of Google WiFi routers to cover the whole house.  However, they're not running in peering mode, but rather using an HPNA backbone.  In this mode, as far as I can tell, there's no way to avoid the Google WiFi creating a second NAT layer.  So it creates its own network of 192.168.86.0/24.  The practical upshot is that while my WiFi devices can connect to each other and to the LAN devices, the reverse isn't true... the LAN devices can't connect to the WiFi devices.  

This means if the pet feeders are on the WiFi and connecting to the NAS box on the LAN for functionality, they'll have to get requests via either a continuous connection they initiate or some kind of polling mechanism.  

But, I'm sure there's probably lots of example code out there for me to find.  Now I just need to go get it.  

Discussions