We have all had it happen: You enter the room to check on your print only to find a mess of plastic. Your print probably failed hours ago and you didn't realize. You can use a service like Obico or OctoEverywhere but their free plans are fairly limited and you must have an OctoPrint camera.
Who this project is for?- Anyone who doesn't want camera feeds slowing OctoPrint.
- Anyone who doesn't want to pay a monthly fee (the rates actually are pretty cheap).
- (This is the biggest reason) Anyone who wants to integrate print failure detection with Home Assistant. You can turn the lights red, send actionable notifications, play alerts on speakers, and whatever else you can dream of!
I'm going to assume you have Home Assistant already setup, with Hacs and the HA app on your phone, but if you don't there are tons of good tutorials on how to do that. Also, you need a MQTT Broker set up (preferably Mosquitto).
Connecting to a CSI interface camera Once you have the Grove Vision AI V2 and any supported camera ready to go, then you can connect them via the CSI connection cable. When connecting, be sure to pay attention to the direction of the row of pins and don't plug them in backwards. When looking down at the connector, the blue plastic should be facing up.
Now attach the Xiao ESP32 to the blue AI vision module as shown below:
Then, attach the antenna to the Xiao's antenna connector. It will be a little hard to connect the antenna so don't try to attach the antenna straight down onto the connector. Instead, angle the antenna, then push down and wiggle it on.
[TO DO: install photo]
2. InstallationWe now need to get the SenseCraft integration from Hacs. In Hacs, click the three dots, then click "Custom repository". Enter:
https://github.com/Seeed-Solution/SenseCraft-HomeAssistant.git
as the repository, select integration as the type, and click add. Type SenseCraft into the Hacs search, open the integration and click download.
Once it installs you will be notified that home Assistant needs to reload. Go ahead and reload it.
3. Xiao FirmwareConnect the Xiao ESP32 to your computer via usb and open the SenseCraft Model Assistant Tool in your web browser of choice. In the drop down in the top right, select XIAO ESP32S3 (Select this even if you have a ESP32C3 like I do) and click Connect.Click on this link to download the firmware and click the Add File button on the web page to upload the XIAO_C3_as_AT_module.bin
firmware you just downloaded. Be sure to use the the 0x0
address. Finally, click Flash and wait for it to work.
Disconnect the Xiao and connect the AI Vision Module to the computer. Click here to open the Github repo and download the tflite model. Select Grove Vision AI (V2) from the drop down. Now click Connect and chose your USB device. Click Setup > Process > Upload custom AI model. Name the model, upload the previously downloaded file, create 6 classes each named "Failure" (This is all still a work in progress so ignore the repetition), and click Send Model. Now go to Configuration and enable MQTT. Enter in your WiFi and MQTT credentials and save it.
5. Configure Home AssistantYour AI vision Module should pop up in Home Assistant now and you can configure it. If it doesn't pop up automatically follow the steps here (don't worry, it isn't hard to manually configure).
6. The Fun StuffNow you can finally create some cool automations!
Comments