Comments (10)
I would also love it if there where Docker images for TWC, that would be even more portable!
from twcmanager.
Update:
I now have made the RS-485 connection to the TWC. Everything works fine (except for the OCPPControl error)!
Another thing is that I noticed that the timestamps in the log where 2 hours behind. Also scheduled times where not adhered to. So I have added this bind mount in the docker-compose.yaml so it can read the time from the host.
volumes:
- /etc/localtime:/etc/localtime:ro
Concluding: just some minor things, but overall you made a great step by providing this application as a Docker image to make this more portable and maintainable/upgradable for everybody.
Perhaps this is also an approach to decouple the additional modules from the core and and put these in containers as well (and communicate via e.g. MQTT). That is e.g. how Home Assistant is doing this.
Anyway, thanks so much for the work!
from twcmanager.
Great feedback, thanks @bikeymouse
The OCPP error is a known issue - it's related to a module that hasn't been included in the development tree yet - the problem is that rather than publishing the latest version of TWCManager to Docker Hub, we're currently publishing the latest GitHub build. I'll need to do some proper release management to provide versioned docker images, for the moment you're getting the latest and greatest (and most experimental) code.
I'll get localtime added to the docker-compose.yml file as I think this is the best approach. Also, you're 100% right about git clone
being overkill here, I'll replace it with an appropriate wget/curl of the file from github instead.
Really appreciate your feedback, it helps a lot to improve the Docker installation experience.
from twcmanager.
I like the idea @nean-and-i, thanks for raising this. For some the benefit of having an effectively isolated python environment for this project would be an advantage.
Given the steps above are nicely documented, would it make sense to add this as a Makefile target, eg make virtualenv
? That way people could choose on a per-installation basis whether to install it systemwide or via virtualenv?
from twcmanager.
Any change a docker-image will become a available any time soon?
from twcmanager.
Any change a docker-image will become a available any time soon?
Yes, this is something that we could get up and running quickly. Would you be running this inside Docker on an RPi? I'd need to find the right base image to work from (I know Raspberry Pi OS has a stretch image but not a buster image for arm, but stretch has Python 3.5 bundled so I might need something more modern), perhaps there's an appropriate alpine arm image to start from. I'd also have to work out exactly what we'd need to do to mount the serial interface within the container. Give me a few days to work on the early stages of a docker image and I'll report back.
from twcmanager.
Hi, that sounds great!
I would start to use this on Docker on my RPI 3B with Buster.
If that all works fine, eventually I think I would migrate it to my "production" Intel NuC system that has ProxMox where I also try to run everything as much as possible on VM's with Docker-containers.
Docker makes installing/updating and maintaining everything so much easier.
I use Docker-compose so all the configuration/start-up options, like mapping USB-ports into the container, are also consistently configured in the docker-compose.yaml files. If you would provide these as well, that probably would save a lot of installation-related questions on the forum ;-)
You may want to look at ESPHome, that is also a python 3.6 application and runs well in docker on a RPI and other platforms. They build their own base-images, based on a Debian Buster image, see their docker file here
from twcmanager.
Hi @bikeymouse,
I've added and performed limited testing on a Docker container for TWCManager. Unfortunately my install doesn't fully support doing this so I can't do full end to end testing.
I've added some documentation around how it works to:
https://github.com/ngardiner/TWCManager/blob/main/docs/README.md
Would be happy to get your feedback once you have a chance to try it out, thanks!
from twcmanager.
Hi, I've done some quick testing:
First of all, thanks for your great effort! I was waiting with installation for the Docker support, so really great to have that now.
So now I plugged in my RS-484 USB-stick and gave it a go. It is not wired to the TWC yet (hopefully be doing that this weekend), but I already could test if it starts and if the web-interface get's up. And it does!, yeah!
So really easy this way, good work!
Only some minor feedback:
- At start-up I do get this error message:
ImportError: No module named 'lib.TWCManager.Control.OCPPControl', when importing Control.OCPPControl, not using Control.OCPPControl
Which is strange because in the config.json it is configured as disabled:
"OCPP": {
"enabled": false,
"serverPort": 9000
}
About the installation manual:
- The Docker-installation suggests to do a complete git clone but all you really need is the docker-compose.yaml
- As the config.json is by default created in /etc/twcmanager on the host, you can edit this without the need to start the container in interactive mode, as the installation suggest.
- I myself like not use /etc/twcmanager on the host to store data from Docker-containers, but rather do this in a ./data subdirectory or use a volume instead of a bind mount.
To be really platform independent, perhaps best is to use a volume (in which case the previous remark should be ignored).
from twcmanager.
Closing this off as I've (finally) updated the Docker documentation to just pull down the docker-compose.yml
file, and localtime has been added some time back
from twcmanager.
Related Issues (20)
- Tesla API doesn´t work any more HOT 1
- External control / Start, Stop, Disable HOT 3
- Unable to start/access web interface after update. HOT 11
- Clean install error - TWC 1.3.1 stable version - urllib3 (2.2.0) or chardet (4.0.0) doesn't match a supported version! HOT 10
- MQTT - Unsupported callback API version: version 2.0 added a callback_api_version HOT 2
- Actual status of the new Tesla API integration - for noobs HOT 9
- Car API not available - can't stop charging HOT 52
- regular expression in line 1050 of Vehicle/TeslaAPI.py needs to be changed HOT 2
- car_api_charge() and enforcePolicy() prevent car from sleeping HOT 2
- Implement Fleet API vehicle_data rate limiting HOT 22
- A "disconnected" car is never charged when it is plugged in later HOT 2
- Charging at single phase on a 3 phase connection causes incorrect power consumption. HOT 12
- MySQL logging HOT 1
- "Tesla Vehicle Command Protocol required" HOT 19
- Exception in thread paho-mqtt-client-MQTT.EMS if mqtt
- POSTGRESQL DB
- Charge limit set to 60% instead of stop charging. Charging never starts again
- Incorporation of Teslemetry Authentication into TWCManager HOT 3
- When to reset stopAskingToStartCharging?
- Useless start-charge commands HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twcmanager.