Giter Club home page Giter Club logo

gadgetbridge_to_influxdb's People

Contributors

bentasker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gadgetbridge_to_influxdb's Issues

Bug Report!? docker [exited 1] Export file does not exist (with fix)

hey bentasker,
i have been tinkering around with your awesome work for a few hours now and im learning quite a lot. right now i ran into a problem where the docker container exits with "Export file does not exist"

tl: dr: change EXPORT_FILE=Gadgetbridge.db to EXPORT_FILENAME=Gadgetbridge.db in the docker-compose.yml

what i tried

  • i made sure that the file really exists (it was 0b, now itws 400kb)
  • test if its reachable: curl --user gadgetbridge:password -I http://192.168.178.3:8080/remote.php/dav/files/gadgetbridge/Gadgetbridge/Gadgetbridge.db (came back with 200 OK)
  •   image: bentasker12/gadgetbridge_to_influxdb:latest
      environment:
        - WEBDAV_URL=http://192.168.178.3:8080/remote.php/dav
        - WEBDAV_USER=gadgetbridge
        - WEBDAV_PASS=password
        - WEBDAV_PATH=files/gadgetbridge/Gadgetbridge/
        - EXPORT_FILE=Gadgetbridge.db #i even removed .db, didnt work 
        - QUERY_DURATION=86400
        - INFLUXDB_URL=192.168.178.3:8086
        - INFLUXDB_BUCKET=MAIN
        - INFLUXDB_MEASUREMENT=gadgetbridge
        - SLEEP_HOURS=0,1,2,3,4,5,6
    
    
  • i checked the python code and found that: EXPORT_FILE = os.getenv("EXPORT_FILENAME", "gadgetbridge"), but the documentation claims to use EXPORT_FILE instead of EXPORT_FILENAME

O2 not supported?

Hi,

i finally got around to install influxdb+grafana, at least some data is vislible in influxdb ๐Ÿ‘

Aside that gadgetbridge just fixed a bug (while i was writing another bug here ;)) for my xiaomi that caused "no data but battery" for the last two weeks, what's missing is the O2 value, i assume the reason are the (several thousands of lines) errors on import:

The batch item wasn't processed successfully because: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.5', 'X-Platform-Error-Code': 'invalid', 'Date': 'Mon, 26 Feb 2024 14:36:51 GMT', 'Transfer-Encoding': 'chunked'})
HTTP response body: {"code":"invalid","message":"unable to parse 'gadgetbridge,device=Xiaomi\\ Smart\\ Band\\ 7\\ 0001,type_num=0 spo2=98i 1696205380000000000000': strconv.ParseInt: parsing \"1696205380000000000000\": value out of range\nunable to parse 'gadgetbridge,device=Xiaomi\\ Smart\\ Band\\ 7\\ 0001,type_num=0 spo2=96i 1696205730000000000000': strconv.ParseInt: parsing \"1696205730000000000000\": value out of range\nunable to parse 'gadgetbridge,device=Xiaomi\\ Smart\\ Band\\ 7\\ 0001,type_num=0 spo2=96i 1696206030000000000000': strconv.ParseInt: parsing \"1696206030000000000000\": value out of range\nunable to parse 'gadgetbridge,device=Xiaomi\\ Smart\\ Band\\ 7\\ 0001,type_num=0 spo2=98i 1696206330000000000000': strconv.ParseInt: parsing \"1696206330000000000000\": 

Are those values actually invalid/too big, or is this something you can easily fix...? Would be very interesting for me, the data goes back for at least eight month, but i got diagnosed with sleep apnea in December 2023...

Also, could you give me a pointer on how to setup grafana, just adding a influxql-connection and adding the dashboard.json seems not to be enough, it complains about Status: 500. Message: database not found: telegraf, do i need to add an influxdb-source into telegraf and then "connect" grafana to telegraf...?

Kinds Regards,

/hp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.