Sign inSign up

vchrisb/e3dc-rest

By vchrisb

Updated almost 6 years ago

Image
0

6.5K

vchrisb/e3dc-rest repository overview

e3dc-rest

a simple REST API to access a E3DC system

Docker

export E3DC_IP_ADDRESS='192.168.1.99'
export E3DC_USERNAME='[email protected]'
export E3DC_PASSWORD='Passw0rd'
export E3DC_KEY='secretkey'
export ADMIN_PASSWORD='admin'
docker run --name e3dc-rest -p 8080:8080 -e E3DC_IP_ADDRESS -e E3DC_USERNAME -e E3DC_PASSWORD -e E3DC_KEY -e ADMIN_PASSWORD="admin" vchrisb/e3dc-rest

Kubernetes

Create Secret:

kubectl create secret generic e3dc-secret --from-literal=username='[email protected]' --from-literal=password='password' --from-literal=ip_address='192.168.1.99' --from-literal=key='password' --from-literal=admin_password='admin'

Deploy with Ingress Controller:

kubectl apply -f ingress.yml -f service-ingress.yml -f deplyoment.yml

Use

curl http://admin:admin@localhost:8080/api/poll
curl -H "Content-Type: application/json"  -X POST -d '{"powerLimitsUsed": true,"maxChargePower": 1000,"maxDischargePower": 1300,"dischargeStartPower": 65}' http://admin:[email protected]:8080/api/power_settings
curl http://admin:admin@localhost:8080/api/power_settings 

Tag summary

Content type

Image

Digest

Size

32 MB

Last updated

almost 6 years ago

docker pull vchrisb/e3dc-rest