Ultimately, I want the watch to periodically query from InfluxDB, but as a simple(r) test, I first want to include the ESP InfluxDB library and use it to write the watch's battery level and step-count stats to InfluxDB.
Once I've got that working I'll then look at querying
#5 | Make HTTP requests less frequently |
Activity
14-Jun-23 19:22
assigned to @btasker
14-Jun-23 19:24
To make the Influx library available, in Arduino's IDE I've gone to
Sketch
->IncludeLibrary
->Manage Libraries
and then searched for and installedESP8266 InfluxDB
(supports ESP32 too)Library details are at https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino
14-Jun-23 21:01
mentioned in commit sysconfigs/watchy-code@f5849d0e389342ee62e4a655ce7788cbf21baf47
Message
Adding InfluxDB stats writes (disabled) misc/watchy-experimentation#3
This adds a (now disabled) call to write stats to InfluxDB.
However, the write is currently failing without ever touching the network.
Need to either read through the library code to see what might be causing it or switch approach and build a HTTP request manually.
14-Jun-23 21:27
mentioned in commit sysconfigs/watchy-code@ef667ec21395810c14a0216b6cb01500b1827f2c
Message
Enable writing of stats into InfluxDB misc/watchy-experimentation#3
Now, call me old-fashioned, but I'm of the mind that it helps if you TURN WIFI ON before attempting to write into the local network.
Points are confirmed to have arrived at their destination
14-Jun-23 21:30
The watch is now writing points into InfluxDB roughly every minute
14-Jun-23 22:08
mentioned in commit sysconfigs/watchy-code@f87eef7156567a1e71143fb891b4fde8aeb7f222
Message
Update database name and remove debug output misc/watchy-experimentation#3
Probably best not to scrawl "oops" across the watchface any time that a write can't be completed.
This also updates the database being written into from
testing_db
to the DB that I actually want the stats in.14-Jun-23 22:11
We're up and running, I'm going to mark this as done.
Will raise a seperate ticket for querying data from InfluxDB
14-Jun-23 22:14
mentioned in issue #4
16-Jun-23 07:59
mentioned in issue #5
16-Jun-23 07:59
marked this issue as related to #5