Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vlcty/teslawallbox
Simple Golang interface for Gen 3 Tesla wallboxes
https://github.com/vlcty/teslawallbox
emobility tesla wallbox
Last synced: about 1 month ago
JSON representation
Simple Golang interface for Gen 3 Tesla wallboxes
- Host: GitHub
- URL: https://github.com/vlcty/teslawallbox
- Owner: vlcty
- License: mit
- Created: 2021-10-31T15:38:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T17:57:08.000Z (about 2 years ago)
- Last Synced: 2024-01-27T05:05:30.280Z (11 months ago)
- Topics: emobility, tesla, wallbox
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TeslaWallbox
Simple Golang interface for Gen 3 Tesla wallboxes.
The following things are provided:
- Fetch version information from the wallbox like serial number and firmware version
- Fetch lifetime stats like dispensed energy, total uptime, how often the contactors were closed
- Fetch vitals like voltage, current, temperatures etcPlanned features:
- Translation of EVSE states to meaningfull values
- Translation of config states to meaningfull values## Install
Just like any other go module:
```
go get -u github.com/vlcty/TeslaWallbox
```## Sample code
``` go
package mainimport (
"fmt"
"github.com/vlcty/TeslaWallbox"
)func main() {
wallboxIP := "10.10.0.39"version, versionError := teslaWallbox.FetchVersion(wallboxIP)
stats, statsError := teslaWallbox.FetchLifetimeStats(wallboxIP)
vitals, vitalsError := teslaWallbox.FetchVitals(wallboxIP)if versionError != nil {
panic(versionError)
} else {
fmt.Printf("Version:\n%+v\n", version)
}if statsError != nil {
panic(statsError)
} else {
fmt.Printf("Stats:\n%+v\n", stats)
}if vitalsError != nil {
panic(vitalsError)
} else {
fmt.Printf("Vitals:\n%+v\n", vitals)
}
}
```## Tested with
Firmware versions:
- 21.29.1
- 21.36.5
- 22.7.0Only tested with the 3 phase electricity grid in the EU. Other grid systems may not work. Tesla can revoke access to the internal API at any given time.