Duet Buddy - a proof of concept remote monitor
-
dammit!!! you guys have just made, nay, forced me to buy this!. Grrrrrr
M5Stack and Battery module on their way.
-
I have one on order from Bangood. Ordered the Grey one at £29.53 as it has the motion sensor built in.
-
I ordered the grey one too from aliexpress for £28.51.
Still waiting for it to get dispatched due to the "extended" chinese new year.
Sounds as though that won't happen till around the 18/02 -
@tekkydave ah I went with this one https://www.amazon.co.uk/MakerHawk-Development-Bluetooth-Expandable-Compatible/dp/B07M71ZG6N which has the built in MPU9250 - £13 more but I get it tomorrow
-
@richardmckenna thats the grey one
-
The github repository has now a script to download the firmware to a M5Stack Core. For now it's only for windows but writing a similar shell script for Mac or Linux should be easy.
With this script, the Arduino IDE is not needed anymore (unless if you want to make code changes) and it just requires the Silicon Labs USB/Serial driver (available at m5stack.com and silabs.com).
https://github.com/zapta/misc/tree/master/duet3d_buddy/release
Please let me know howit works and feel free to send me pull requests.
-
It's arrived
-
Very cool project!
Is there a way to do something similar but display the status of multiple printers on a computer monitor? Maybe with the use of a raspberry pi? I have nine printers that I'd like to monitor from another room but I don't want to buy nine of those.
-
@hayseed_byte Perhaps something like this?
https://github.com/DanalEstes/MultiDuetWebMonitor -
@Phaedrux That's perfect. Thanks! Don't know how I haven't come across that.
-
I've never tried it, but that should run just fine in a Pi browser. Let me know if it does not.
PM here, or danal (dot) estes (at) gmail (dot) com
-
@zapta any chance you could move the duet buddy code to its own repo? It would make it easier to fork without pulling all your other misc stuff as well
-
I did something!
I added a battery level indicator and the printer name. Strangely the M5Stack API only returns the battery level in increments of 25, not sure if there is a way to get round this by skipping the M5Stack API method and going straight to requesting it from the I2C. Will have to look into it more, but from what I can discern from the basic docs and the Chinese datasheet for the IP5306 it only returns 1 of 4 values depending on the voltage range.
This is the current method in the API:
// Return percentage * 100 int8_t POWER::getBatteryLevel() { uint8_t data; if (M5.I2C.readByte(IP5306_ADDR, IP5306_REG_READ3, &data) == true) { switch (data & 0xF0) { case 0x00: return 100; case 0x80: return 75; case 0xC0: return 50; case 0xE0: return 25; default: return 0; } } return -1; }
I also don't quite know what is happening with the switch statement and
data & 0xF0
but that's just my lack of C++ knowledge and IC programming. So if someone can educate me that would be greatI'm going to try adding the charging status as well for when it is plugged in and maybe tweak the layout a bit, then if someone can test it, I'll create a pull request to Zapta's original
-
@richardmckenna, very nice!
The IP5306 seems to have only 25% increments for the LEDs and possibly the IP5306_I2C has the same resolution but with I2C interface instead of LEDs. Hard to find information about the IP5306_I2C.
M5Stack Schematic
http://community.m5stack.com/assets/uploads/files/1515402963959-97994060-2969-49dc-ad9c-7b3887d95a17-image.pngIP5306 (non I2C) Datasheet
https://datasheet.lcsc.com/szlcsc/1809201029_INJOINIC-IP5306_C181692.pdfThe expression (data & 0xF0) returns the 8 bit value of 'data' with the four right bits forces to '0'.
BTW, the two temperature fields in your picture seems to have extra characters. Is it intentional?
-
@zapta said in Duet Buddy - a proof of concept remote monitor:
@richardmckenna, very nice!
The IP5306 seems to have only 25% increments for the LEDs and possibly the IP5306_I2C has the same resolution but with I2C interface instead of LEDs. Hard to find information about the IP5306_I2C.
Yeah that is all I could find. Oh well 25% increments are better than nothing. I’ve added a charging status now as well so when it is plugged in it shows “Charging” and when full “Charged”.
BTW, the two temperature fields in your picture seems to have extra characters. Is it intentional?
That was me trying to find the degrees symbol only to discover it doesn’t exist in the included font. It seems to be standard ASCII with only some of the extended ASCII characters. I’ve given up on that and removed them.
-
@richardmckenna, how did you implement the 'Kossel Max' title? Is it hard coded in your arduino code? One option is to add a title field to the config file on the SD card.
Or, anybody knows if it's possible to query the printer name from the printer using a HTTP request?
-
@zapta I added an extra field to the json file and parsed it like the others. Didn’t even think about pulling from the duet, I will explore that possibility.
The reason behind me wanting the name displayed was that I’m thinking about the best way of adding multiple machines to it. So having an array of machine objects defined in the json. Then you can navigate between the different machines with the left and right buttons.
-
@zapta The printer name is available through /rr_status?type=2 so should be easy enough to do an initial call to that to get the name and other info about the printer.
-
In the forthcoming RRF 3.01-RC2 it's also available via M409 K"network.name".
-
@richardmckenna, if type=2 has also the other relevant information we can just switch to it instead of type=3.
Does it require changes in the duet response json parser?