Code Monkey home page Code Monkey logo

deflux's People

Contributors

fasmide avatar fixje avatar runger1101001 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

jan666 rvk01

deflux's Issues

Unable to retrieve data from deconz

Dear deflux team,

I have installed deflux on my RaspberrPi4 running on Raspbian (Bullseye).

When I try to acquire an API key or retrieve data from the websocket (after manually retrieving the API key using POSTMAN), deflux always reports an error:

time=2024-06-10T12:39:04.022+02:00 level=ERROR msg="Failed to fetch sensors: %s" !BADKEY="unable to decode deCONZ /sensors response: invalid character '<' looking for beginning of value"

or

time=2024-06-10T12:36:37.184+02:00 level=ERROR msg="Could not create websocket reader: %s" !BADKEY="unable to populate sensor cache: unable to decode deCONZ /sensors response: invalid character '<' looking for beginning of value"

My config files looks like:

deconz:
  addr: http://192.168.3.118:80/`
  apikey: "[snip]"
  wsaddr: "ws://192.168.3.118:443"
influxdb:
  url: http://localhost:8086
  token: [snip]
  org: CHI
  bucket: zigbee
fillvalues:
  enabled: false
  initialfill: true
  fillinterval: 30m0s
  lastseentimeout: 2h0m0s

(the port ":80" worked for the API key generation)

Go reports
go version go1.22.4 linux/arm64

Is this a configuration mistake on my side or more an issue in deflux?

Add -config paramter

It would be nice if I could specify the config file via -config parameter.

Would make it much easier to run it as cronjob (/home/deflux/go/bin/deflux -1 -config /home/deflux/deflux.yml)

...or start it as daemon via daemon -fr /home/deflux/go/bin/deflux -config /home/deflux/deflux.yml (on FreeBSD)

without writing to /etc/.

Additional data age field

Add another field in the database for each measurement:

  • Name: age_secs
  • Value: the time difference in seconds between the insertion time (deflux takes current system time) and the lastupdated field of the sensor state

This allows more specific queries, especially to detect possibly outdated values inserted with the -1 mode.

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.