simple web data widget #15
No reviewers
Labels
No labels
bug
conflicts
documentation
DO NOT MERGE
duplicate
enhancement
good first issue
hardware
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
greg/info-orbs!15
Loading…
Reference in a new issue
No description provided.
Delete branch "webDataWidget"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Proof of concept for a simple widget to pull data from a web page
https://photos.app.goo.gl/7Fti8xcEfJkqYqjm9
sample server data that outputs data from my computer is below
This is the json from the php script
@ -0,0 +1,28 @@#ifndef WEB_DATA_WIDGET_HI am thinking I should create a "data class" to store the above items as they all go together. and it would be a lot cleaner.
@ -0,0 +1,28 @@#ifndef WEB_DATA_WIDGET_Hobviously this needs to be moved to a config
@ -81,6 +82,9 @@ void setup() {widgetSet->add(new ClockWidget(*sm));We are going to need to build a config option to order the widgets or disable unwanted ones soon.
@ -0,0 +1,91 @@screen locations should probably be configurable
@ -0,0 +1,91 @@This should probably be in a global library as it seems like it will be useful for multiple widgets.
@ -0,0 +1,91 @@I think I am liking "fingerprint" more than "stamp" as I did in weatherWidget. Thoughts?
@ -0,0 +80,4 @@m_lastUpdate = millis();} else {// Handle JSON deserialization errorSerial.println("deserializeJson() failed");we should probably build an error screen that can be displayed for cases like this
@ -0,0 +84,4 @@}} else {// Handle HTTP request errorSerial.printf("HTTP request failed, error: %s\n", http.errorToString(httpCode).c_str());Same error screen comment as above
@ -0,0 +1,91 @@these are no longer used
@ -0,0 +1,91 @@we should also check the string for newlines and break them up. But with variable font sizes x,y positioning becomes tricky