WirelessPrinting
WirelessPrinting copied to clipboard
Added ESP-DASH ( Base Template )
Added ESP-DASH Core functions. Please use this template as a base to add more functions to the dashboard.
ESP-DASH Docs: https://github.com/ayushsharma82/ESP-DASH/wiki/Building-Sketch
Hi, thanks for adding this. Looking at the code it is not evident to me where the widgets are getting their data from, how does it work?
@probonopd ESP-DASH Works on 2 methods: addCard
and updateCard
. Add Card Method is used to add a card on the dashboard while the update card method is used to update the values of that specific card.
A Unique ID is used for every card while adding a card. ie: https://github.com/probonopd/WirelessPrinting/pull/134/files#diff-ef932246a9d229efe8048ee0dccbddbfR856
Example: ESPDash.addTemperatureCard("bed", unit, value);
That same ID will be used to update the card in the future.
Example: ESPDash.updateTemperatureCard("bed", value);
Thanks @ayushsharma82 can you add an example to your code that uses the data at /api/printer
? There we have
{
"state": {
"text": "Operational",
"flags": {
"operational": true,
"paused": false,
"printing": false,
"pausing": false,
"cancelling": false,
"sdReady": false,
"error": false,
"ready": true,
"closedOrError": false
}
},
"temperature": {
"tool0": {
"actual": 28.61,
"target": 0.00,
"offset": 0
},
"bed": {
"actual": 28.58,
"target": 0.00,
"offset": 0
}
},
"sd": {
"ready": false
}
}
It compiles but crashes in real-life testing on an esp8266.
Uh, do you have a clue why?
No clue yet. I will check for the error later on.