Git Product home page Git Product logo

Comments (5)

paalders avatar paalders commented on August 19, 2024 1

If you run dsmr-reader in a docker container you can change the nginx configuration within the container using the docker console. You can create the htpasswd file, uncomment the things mentioned in the nginx dsmr-webserver config and restart the dsmr container. This will probably break when updating the docker container, but fine for a temporary workaround :)

Don't forget to update the datalogger to add the password if you make use of the API! I already had my own python script to get data from the smart-meter so adding the auth data to the request was very easy. I haven't looked into whether the datalogger supports the auth out-of-the-box. But even then, it's easy to modify the datalogger python code, in the file 'dsmr-reader/dsmr_datalogger/scripts/dsmr_datalogger_api_client.py' update the following code (I've added the auth line):

response = requests.post(
        api_url,
        auth=('USERNAME', 'PASSWORD'),
        headers={'X-AUTHKEY': api_key},
        data={'telegram': telegram},
)

from dsmr-reader-docker.

xirixiz avatar xirixiz commented on August 19, 2024

Sure, should be easy. I`ll look into it.

from dsmr-reader-docker.

JBS5 avatar JBS5 commented on August 19, 2024

I'm curious if you have already looked into this?

from dsmr-reader-docker.

JBS5 avatar JBS5 commented on August 19, 2024

Thanks for your suggestion!
I am using Traefik and added basic auth to the rule file:

    [frontends.dsmr.auth.basic]
      removeHeader = true
      users = [
        "XX"
      ]  

from dsmr-reader-docker.

xirixiz avatar xirixiz commented on August 19, 2024

The problem is that the creator of dsmr reader isn't that familiar with Docker. Don't get me wrong, he did a great job creating this application, but it's a pain in the ass to use with Docker. Currently I`m looking into his code to see if I can create a pull request to make it more easy to use with Docker.

from dsmr-reader-docker.

Related Issues (20)

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.