Tobias Lindberg
e032d8b3e4
Merge pull request #74 from tobiasehlert/feature-mqtt-addition-of-power
...
adding of MQTT power int
2021-06-24 08:11:20 +02:00
Tobias Lindberg
991e483f48
bumping new version v1.9.0
...
updating CHANGELOG
v1.9.0
2021-06-14 14:48:10 +02:00
Tobias Lindberg
6773a19bd8
removing punctuation in error message
...
resolve #61
2021-06-07 13:31:36 +02:00
Tobias Lindberg
8ef9e23da6
Merge pull request #71 from gaussmeter/API_TOKEN_DISABLE
...
allow command auth disable via API_TOKEN_DISABLE
2021-06-07 13:17:42 +02:00
Tobias Lindberg
f66997421a
Merge pull request #73 from tobiasehlert/dependabot/go_modules/github.com/eclipse/paho.mqtt.golang-1.3.5
...
Bump github.com/eclipse/paho.mqtt.golang from 1.3.4 to 1.3.5
2021-06-07 13:15:00 +02:00
dependabot[bot]
cd18843c83
Bump github.com/eclipse/paho.mqtt.golang from 1.3.4 to 1.3.5
...
Bumps [github.com/eclipse/paho.mqtt.golang](https://github.com/eclipse/paho.mqtt.golang ) from 1.3.4 to 1.3.5.
- [Release notes](https://github.com/eclipse/paho.mqtt.golang/releases )
- [Commits](https://github.com/eclipse/paho.mqtt.golang/compare/v1.3.4...v1.3.5 )
---
updated-dependencies:
- dependency-name: github.com/eclipse/paho.mqtt.golang
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-07 07:22:13 +00:00
Tobias Lindberg
7d93e5042a
Merge pull request #72 from tobiasehlert/dependabot/docker/golang-1.16.5
...
Bump golang from 1.16.4 to 1.16.5
2021-06-04 11:25:20 +02:00
dependabot[bot]
bd3affab6c
Bump golang from 1.16.4 to 1.16.5
...
Bumps golang from 1.16.4 to 1.16.5.
---
updated-dependencies:
- dependency-name: golang
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-06-04 09:21:34 +00:00
Leland Sindt
1f8089631c
allow command auth disable via API_TOKEN_DISABLE
2021-06-03 18:27:13 -05:00
Tobias Lindberg
73ed43a515
adding of MQTT power int
2021-06-01 14:07:58 +02:00
Tobias Lindberg
141b63ecb8
bumping new version v1.8.0
...
updating CHANGELOG
v1.8.0
2021-06-01 10:19:05 +02:00
Tobias Lindberg
c41d1a45ba
Merge pull request #69 from tobiasehlert/bug-43
...
Remove charges and drives that have null on end_date
2021-06-01 10:07:06 +02:00
Tobias Lindberg
258e8e4e70
Merge pull request #58 from alecdoconnor/patch-4
...
Update Charges, Drives, and Updates API to Allow Empty Responses as Valid
2021-06-01 09:59:40 +02:00
Tobias Lindberg
e874f25470
bumping new version v1.7.1
...
updating CHANGELOG
v1.7.1
2021-06-01 09:55:50 +02:00
Tobias Lindberg
d8135a6546
Merge branch 'main' of https://github.com/tobiasehlert/teslamateapi into main
2021-06-01 09:54:15 +02:00
Tobias Lindberg
c02c60eb5b
Bump github.com/gin-gonic/gin from 1.7.1 to 1.7.2
...
#63 by dependabot
2021-06-01 09:52:59 +02:00
Tobias Lindberg
7f5ecfa260
Bump various workflow versions
...
- bump actions/cache from 2.1.5 to 2.1.6 (#67 by dependabot)
- bump docker/build-push-action from 2.4.0 to 2.5.0 (#66 by dependabot)
- bump docker/setup-qemu-action from 1.1.0 to 1.2.0 (#65 by dependabot)
- bump docker/metadata-action from 3.1.0 to 3.3.0 (#64 by dependabot)
2021-06-01 09:51:45 +02:00
Tobias Lindberg
b0eaa0ae21
Merge pull request #62 from tobiasehlert/dependabot/github_actions/docker/metadata-action-3.2.0
...
Bump docker/metadata-action from 3.1.0 to 3.2.0
2021-06-01 09:28:19 +02:00
dependabot[bot]
afed21f0a8
Bump docker/metadata-action from 3.1.0 to 3.2.0
...
Bumps [docker/metadata-action](https://github.com/docker/metadata-action ) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/docker/metadata-action/releases )
- [Commits](https://github.com/docker/metadata-action/compare/v3.1.0...v3.2.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-24 07:17:41 +00:00
Tobias Lindberg
5aec424900
bumping new version v1.7.0
...
updating CHANGELOG
v1.7.0
2021-05-20 08:15:40 +02:00
Tobias Lindberg
cbe1f5892d
changing if false statements and commenting out unused functions
2021-05-19 19:54:43 +02:00
Tobias Lindberg
7baecf3a61
moving defer to when error check has passed
...
go-staticcheck: should check returned error before deferring commandAllowListFile.Close() (SA5001)
2021-05-19 19:53:54 +02:00
Alec O'Connor
8843c64089
Update v1_TeslaMateAPICarsCharges.go
...
Typo
2021-05-19 13:46:31 -04:00
Tobias Lindberg
a9feeee228
Merge pull request #60 from tobiasehlert/feature-10-logging-commands
...
Feature 10 logging commands
2021-05-19 19:36:06 +02:00
Tobias Lindberg
7754bdcc28
bumping new version v1.6.2
...
updating CHANGELOG
v1.6.2
2021-05-19 19:22:35 +02:00
Tobias Lindberg
ef40a91e8d
adding sql when end_date is not null to charges
2021-05-19 19:10:05 +02:00
Tobias Lindberg
695dc389ad
Merge pull request #51 from alecdoconnor/patch-3
...
Prevent fatal error when detailed charge malformed
2021-05-19 18:51:21 +02:00
Tobias Lindberg
10a5f96173
Merge pull request #59 from tobiasehlert/dependabot/go_modules/github.com/lib/pq-1.10.2
...
Bump github.com/lib/pq from 1.10.1 to 1.10.2
2021-05-19 18:46:06 +02:00
dependabot[bot]
16fe362c81
Bump github.com/lib/pq from 1.10.1 to 1.10.2
...
Bumps [github.com/lib/pq](https://github.com/lib/pq ) from 1.10.1 to 1.10.2.
- [Release notes](https://github.com/lib/pq/releases )
- [Commits](https://github.com/lib/pq/compare/v1.10.1...v1.10.2 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-17 07:16:22 +00:00
Alec O'Connor
61b2ac0967
Update v1_TeslaMateAPICarsUpdates.go
...
Continuing updates on Updates API
2021-05-12 17:17:35 -04:00
Alec O'Connor
d65dff5aa3
Update v1_TeslaMateAPICarsDrives.go
...
Continuing updates on Drives API
2021-05-12 17:16:44 -04:00
Alec O'Connor
ed1dc4dbb8
Update Charges API to Allow Valid Empty Response
...
API should fail gracefully if an empty response is sent.
Example reason: an API consumer should be able to traverse the pages until empty data is returned.
Note: currently this is not possible, since a generic error will be thrown if the data set is empty (including on a fresh install of TeslaMate) or if there is an invalid charge in the response. It's impossible to know if all data points were traversed or if an error exists on a single charge (See: https://github.com/tobiasehlert/teslamateapi/issues/43 )
2021-05-12 17:13:56 -04:00
Tobias Lindberg
679d2a89e1
Merge pull request #57 from tobiasehlert/dependabot/github_actions/docker/build-push-action-2.4.0
...
Bump docker/build-push-action from 2 to 2.4.0
2021-05-12 08:27:35 +02:00
Tobias Lindberg
b2a199afb3
Merge pull request #56 from tobiasehlert/dependabot/github_actions/docker/setup-qemu-action-1.1.0
...
Bump docker/setup-qemu-action from 1 to 1.1.0
2021-05-12 08:27:30 +02:00
Tobias Lindberg
992b166837
Merge pull request #55 from tobiasehlert/dependabot/github_actions/docker/metadata-action-3.1.0
...
Bump docker/metadata-action from 3 to 3.1.0
2021-05-12 08:27:25 +02:00
Tobias Lindberg
addb3a430d
Merge pull request #54 from tobiasehlert/dependabot/github_actions/docker/setup-buildx-action-1.3.0
...
Bump docker/setup-buildx-action from 1 to 1.3.0
2021-05-12 08:27:21 +02:00
Tobias Lindberg
64d8aba1ef
Merge pull request #53 from tobiasehlert/dependabot/github_actions/docker/login-action-1.9.0
...
Bump docker/login-action from 1 to 1.9.0
2021-05-12 08:27:16 +02:00
dependabot[bot]
f5910e951e
Bump docker/build-push-action from 2 to 2.4.0
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 2 to 2.4.0.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v2...v2.4.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-12 05:52:53 +00:00
dependabot[bot]
ac2f6ff477
Bump docker/setup-qemu-action from 1 to 1.1.0
...
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action ) from 1 to 1.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases )
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v1.1.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-12 05:52:49 +00:00
dependabot[bot]
fbbdb240f9
Bump docker/metadata-action from 3 to 3.1.0
...
Bumps [docker/metadata-action](https://github.com/docker/metadata-action ) from 3 to 3.1.0.
- [Release notes](https://github.com/docker/metadata-action/releases )
- [Commits](https://github.com/docker/metadata-action/compare/v3...v3.1.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-12 05:52:44 +00:00
dependabot[bot]
4bd0c74412
Bump docker/setup-buildx-action from 1 to 1.3.0
...
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action ) from 1 to 1.3.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases )
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v1.3.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-12 05:52:40 +00:00
dependabot[bot]
4b17952b31
Bump docker/login-action from 1 to 1.9.0
...
Bumps [docker/login-action](https://github.com/docker/login-action ) from 1 to 1.9.0.
- [Release notes](https://github.com/docker/login-action/releases )
- [Commits](https://github.com/docker/login-action/compare/v1...v1.9.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-12 05:52:35 +00:00
Tobias Lindberg
82b7326b5d
Merge pull request #52 from tobiasehlert/dependabot/github_actions/crazy-max/ghaction-docker-meta-v3
...
Bump crazy-max/ghaction-docker-meta from v2.4.0 to v3
2021-05-11 11:00:35 +02:00
Tobias Lindberg
ceafad0f0b
Update build.yml
...
Replacing crazy-max/ghaction-docker-meta with docker/metadata-action
2021-05-11 10:59:50 +02:00
dependabot[bot]
cf681dc7e6
Bump crazy-max/ghaction-docker-meta from v2.4.0 to v3
...
Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta ) from v2.4.0 to v3.
- [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases )
- [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v2.4.0...2af9c6a52b5431eea749f0e923b7503b84813f77 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-11 05:54:07 +00:00
Alec O'Connor
27646b2058
Prevent fatal error when detailed charge malformed
...
Following up on https://github.com/tobiasehlert/teslamateapi/issues/43
*Reason*
A detailed charge is malformed if the end_date is missing in SQL. It's also possible a charge that is in progress will be missing this value as well, in which case this detailed charge isn't populated with data.
*Better Solutions* (long term)
Adjust error handling across the API:
- *Opt 1:* Instead of `ValidResponse` being a boolean, replace with `ResponseError`. Change the if statement at the bottom of each file to check for the `ResponseError`'s existence instead of `if ValidResponse {...} else {...}`. Remove all log.Fatal(err) so that the API can still return responses gracefully, and set status to 200 OK since the response will still technically be HTTP valid. Break execution of further steps and return the meaningful ResponseError in the API
- *Opt 2:* For simplicity, create a functions like this and call it (along with an early `return`) wherever a fatal error is currently used (or `ValidResponse` never set to true). Then remove `ValidResponse` entirely and adjust the `if` statement at the bottom of every API file to only run the first condition.
```
func TeslaMateAPIHandleErrorResponse(c *gin.Context, s string) {
log.Println("[error] TeslaMateAPICarsChargesDetailsV1 " + c.Request.RequestURI + " error in execution! " + s)
c.JSON(http.StatusOK, gin.H{"error": s})
}
func TeslaMateAPIHandleSuccessResponse(c *gin.Context, j JSONData) {
log.Println("[info] TeslaMateAPICarsChargesDetailsV1 " + c.Request.RequestURI + " executed successful.")
c.JSON(http.StatusOK, j)
}
```
If you're interested, I'd be happy to put together a sample PR
2021-05-10 09:54:30 -04:00
Tobias Lindberg
739f56e1be
bumping new version v1.6.1
...
updating CHANGELOG
v1.6.1
2021-05-10 09:41:02 +02:00
Tobias Lindberg
6e56848eaf
Merge pull request #47 from alecdoconnor/patch-3
...
Skip Malformed Rows (those missing an end_date)
2021-05-10 09:31:15 +02:00
Tobias Lindberg
616864d75a
Merge pull request #49 from tobiasehlert/dependabot/docker/golang-1.16.4
...
Bump golang from 1.16.3 to 1.16.4
2021-05-10 09:22:47 +02:00
Tobias Lindberg
07fa314001
Merge pull request #46 from tobiasehlert/dependabot/go_modules/github.com/eclipse/paho.mqtt.golang-1.3.4
...
Bump github.com/eclipse/paho.mqtt.golang from 1.3.3 to 1.3.4
2021-05-10 09:22:37 +02:00