Moving more to ABS than PLA on prints, the fans stopped being that necessary - but what stood out as being a lot more interesting would be to actually turning the printer on or off.
Using the same principles as before, I replaced the Fan part of the solution and added the printer power cord to the available relay.
As an extra, I left cubietruck to manage Octoprint and the remaining solutions in previous posts and set out to build a nice embedded cluster:
- 4 boards (even cubieboard A10 boards will do for this, but one might consider a cheaper alternative as the Orange Pi perhaps);
- 4 webcams, in my case, the Hercules Twist HD as it molds perfectly to the case;
- placing each webcam on the top corners of the printer case, pointing to the heat bed;
- Using cubietruck as the manager of the video solution and controlling each of the 4 boards as video feeds;
And since using the command line to issue MQTT commands wasn't actually that practical, I started working on a web platform to manage the solution.
I spent some time working with MEAN.js which I found to be brilliant by the way, integrated MQTT.js and socket.io into the base boilerplate as well as the live video feeds from the webcams.
In the end I got exactly what I wanted:
- the ESP8266-01 connects to CloudMQTT, a cloud-based, free MQTT broker (moved to it after everything was confirmed to be working properly using mosquitto locally);
- the MQTT broker is accessible by the MEAN.js web app (which later got published to heroku);
- the web app uses MQTT.js to subscribe to CloudMQTT and socket.io to perform realtime UI updating if necessary (if I decide to use sensors in the future);
- the webcams stream the video to the web app.
- turn the printer on/off, which saves some power;
- turn the lighting on/off, in case there's poor lighting in the room;
- use a slicer remotely, like slic3r, generate gcode and upload it to Octoprint;
- run the prints remotely and accompany the status using the webcams.
In spite of travelling over the web, the response time with MQTT is lightning fast, basically feels as if a local physical switch is being used...!
As an alternative to MEANjs, there's also meteor.js but I haven't actually looked into that one, apparently it would have saved me some time integrating MQTT an socket.io - perhaps on my next project!