Git Product home page Git Product logo

go-edistribucion's Introduction

e-Distribucion API

Go API to read Endesa energy meters info.

Ported from Python to Go using https://github.com/trocotronic/edistribucion.

You'll need an account in https://www.edistribucion.com to use this module.

Building the command line client

make

Using the client

Export the edistribicion.com username and password as environment variables:

export EDISTRIBUCION_USERNAME="username here"
export EDISTRIBUCION_PASSWORD="password here"

Run the client without arguments:

./bin/contadores
<Your CUPS address will be here>
Potencia actual:  0.2
Potencia contratada:  5.75
Porcentage:  3,48%
Estado ICP:  Abierto
Totalizador:  14.811

Database store

There's a sample client that stores received metrics in a sqlite database.

export EDISTRIBUCION_USERNAME="username here"
export EDISTRIBUCION_PASSWORD="password here"
make
./bin/edistribucion-store -db edistribucion.sqlite

Related

go-edistribucion's People

Contributors

rubiojr avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

go-edistribucion's Issues

panic: runtime error: index out of range [0] with length 0

Hi! I'd like to use this adapter but I get some errors:

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/rubiojr/go-edistribucion.(*Client).Login(0xc000080550)
	/root/go-edistribucion/edistribucion.go:314 +0x84e
main.main()
	/root/go-edistribucion/cmd/edistribucion/main.go:18 +0xce

Any idea?
go version go1.20.5 linux/amd64

At the end I want to send the result to ioBroker, maybe you can push me in another direction if this adapter here is not maintained anymore. Thanks!

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.