Commit Graph

80 Commits

Author SHA1 Message Date
d787c8b3ab
Fix issue in Hoymiles where total energy decreases
Sometimes it can be that `today_eq` is reset when the day switches but
it has not been added to `total_eq` yet. The `total_eq` should always be
non-decreasing, so return the last known value until this is corrected
(this most suredly happens during the night).

Also, allow for `login` and `update` to mutate the state of the service
to be able to update things like the last known total produced energy
value.
2023-01-15 13:41:40 +01:00
5a2889a0f2
Improve deserialization for Hoymiles
* Also deserialize the status (error) code and message
* Handle `data` fields having the value `""` in API responses if there
  is an error
* Add missing documentation for API struct fields
2023-01-15 13:23:34 +01:00
18b52cd422
Small simplification; remove already solved TODO 2023-01-15 12:26:20 +01:00
70b117d11d
Cargo update 2023-01-14 15:55:48 +01:00
2b5a64b6b0
FIx some formatting 2023-01-14 15:54:29 +01:00
01416ee136
Reduce poll interval for Hoymiles to 5 minutes 2023-01-14 13:03:26 +01:00
536b1564b9
Also set the state class in HA sensors example 2023-01-13 23:22:41 +01:00
4088c37cd2
Bump the version to 0.2.0 2023-01-13 19:47:14 +01:00
17491fad78
Update the changelog 2023-01-13 19:33:09 +01:00
745edea875
Clarify config necessary for exposing container port
If Rocket is not configured to listen on 0.0.0.0:8000, exposing port
8000 on the inside to a chosen port (2399 by default), will not work.
2023-01-13 11:57:24 +01:00
f6a3820961
Fix typo in Docker commands 2023-01-11 21:59:47 +01:00
5733a6440c
Fix (example) port in HA example 2023-01-11 21:58:33 +01:00
11d82c4ae4
Add a changelog 2023-01-11 21:55:04 +01:00
1c2fc62805
Add documentation for how to use with Home Assistant 2023-01-10 17:13:52 +01:00
4bdaa3bdac
Switch the example port to 2399 2023-01-10 17:00:20 +01:00
69f34e3243
Add Debian packaging via cargo-deb (closes: #4)
* Add the required metadata to `Cargo.toml`
* Add a systemd service unit file
* Use `Rocket.toml.example` as the default configuration
2023-01-10 16:59:20 +01:00
a0cb3dccae
Document the Docker support 2023-01-10 16:29:32 +01:00
5ed688f0fb
Add support for building and running a Docker image 2023-01-10 16:09:56 +01:00
669c9285ad
Update code styling to follow Hoymiles service 2023-01-10 15:51:53 +01:00
9c9a348a53 Merge pull request 'Implement Hoymiles service' (#6) from 1-hoymiles-service into main
Add support for retrieving solar panel data from Hoymiles.

* Add the Hoymiles service
* Update the documentation
* Add a depend on the `md-5` crate for password hashing

Reviewed-on: #6
2023-01-10 15:50:30 +01:00
0e7d339682
Update documentation and example 2023-01-10 15:49:11 +01:00
b1dfea651f
Add first version of the Hoymiles service 2023-01-10 15:38:24 +01:00
2883f52249
Switch to floats for the current power and total energy fields 2023-01-10 15:37:38 +01:00
093d062dd4
Enable more lints 2023-01-09 21:40:04 +01:00
55c3b91bbd
Split off a library crate 2023-01-09 21:39:11 +01:00
58df4bec2f
Add missing .gitignore 2023-01-09 21:35:41 +01:00
a47198ea24 Merge pull request 'Add support for multiple services' (#3) from 2-multiple-services-support into main
Reviewed-on: #3
2023-01-09 21:33:30 +01:00
3690647c76 Add service-specific configuration
Switch to a section/table for the service to make it easier.
2023-01-09 21:25:35 +01:00
87394f9fb9 Add service implementation; split off My Autarco support 2023-01-09 21:23:43 +01:00
5bf7f5d8de Initial import into Git
This project is based on [Autarco
Scraper](https://git.luon.net/paul/autarco-scraper) but will support
multiple services, not just My Autarco.
2023-01-08 15:39:14 +01:00