Compare commits

..

35 Commits

Author SHA1 Message Date
Stefan Allius
b752144e94 Merge branch 'main' of https://github.com/s-allius/tsun-gen3-proxy into dev-0.10 2024-08-10 14:15:19 +02:00
Stefan Allius
e56aa5d709 Version 0.10.0 no longer displays the version string (#154)
Fixes #153
2024-08-10 14:01:09 +02:00
Stefan Allius
416fe16609 Fetch all history for all tags and branches 2024-08-09 23:08:12 +02:00
Stefan Allius
d8aee5f789 code cleanup 2024-08-09 23:01:16 +02:00
Stefan Allius
04ec8ac8a7 bump aiohttp to version 3.10.2 2024-08-09 23:01:02 +02:00
Stefan Allius
39577b2415 disable MODBUS_POLLING for GEN§PLUS in example config 2024-08-09 22:59:47 +02:00
Stefan Allius
8fc1e83b42 prepare release 0.10.0 2024-08-09 22:14:20 +02:00
Stefan Allius
13f9febb47 Do no build on *.yml changes 2024-08-09 22:12:17 +02:00
Stefan Allius
d891e486e7 Code coverage for SonarCloud (#150)
* cleanup code and unit tests

* add test coverage for SonarCloud

* configure SonarCloud

* update changelog
2024-08-09 17:45:53 +02:00
Stefan Allius
155b6d4e67 Make test code more clean (#149)
* cleanup
2024-08-09 00:02:01 +02:00
Stefan Allius
24ece4fece make test code more clean (#148) 2024-08-08 20:27:39 +02:00
Stefan Allius
a779c90965 don't send MODBUS request when state is not up (#147)
* adapt timings

* don't send MODBUS request when state is note up

* adapt unit test
2024-08-08 19:46:27 +02:00
Stefan Allius
e33153fc1f build multi arch images with sboms (#146) 2024-08-08 18:55:17 +02:00
Stefan Allius
2a5e3b6507 Update sonarcloud.yml 2024-08-08 00:57:52 +02:00
Stefan Allius
6c6ce3e0a8 Update sonarcloud.yml 2024-08-08 00:46:31 +02:00
Stefan Allius
83a33efa18 Update sonarcloud.yml 2024-08-08 00:42:36 +02:00
Stefan Allius
25e55e4286 Update sonarcloud.yml 2024-08-08 00:40:14 +02:00
Stefan Allius
b3f1d97c3d Update sonarcloud.yml 2024-08-08 00:27:35 +02:00
Stefan Allius
4d1a5fbd21 Create sonarcloud.yml (#143) 2024-08-08 00:16:39 +02:00
Stefan Allius
6dbd9bc85f print coloured logs 2024-08-06 20:08:22 +02:00
Stefan Allius
47f7580184 MQTT timestamps and protocol improvements (#140)
* add TS_INPUT, TS_GRID and TS_TOTAL

* prepare MQTT timestamps

- add _set_mqtt_timestamp method
- fix hexdump printing

* push dev and debug images to docker.io

* add unix epoche timestamp for MQTT pakets

* set timezone for unit tests

* set name für setting timezone step

* trigger new action

* GEN3 and GEN3PLUS: handle multiple message

- read: iterate over the receive buffer
- forward: append messages to the forward buffer
- _update_header: iterate over the forward buffer

* GEN3: optimize timeout handling

- longer timeout in state init and reveived
- got to state pending only from state up

* update changelog

* cleanup
2024-08-04 19:43:09 +02:00
Stefan Allius
b8e44b7379 bump aiomqtt and schema to latest release (#137) 2024-07-27 20:36:17 +02:00
Stefan Allius
95954fa84e S allius/issue134 (#135)
* add polling invertval and method ha_remove()

* add client_mode arg to constructors

- add PollingInvervall

* hide some topics in client mode

- we hide topics in HA by sending an empty register
  MQTT topic during HA auto configuration

* add client_mode value

* update class diagram

* fix modbus close handler

- fix empty call and cleanup que
- add unit test

* don't sent an initial 1710 msg in client mode

* change HA icon for inverter status

* increase test coverage

* accelerate timer tests
2024-07-27 19:37:40 +02:00
Stefan Allius
3c656e8c63 Merge branch 'dev-0.10' of https://github.com/s-allius/tsun-gen3-proxy into dev-0.10 2024-07-24 22:37:09 +02:00
Stefan Allius
387c014763 reset inverter state on close
- workaround which reset the inverter status to
  offline when the inverter has a very low
  output power on connection close
2024-07-24 22:36:51 +02:00
Stefan Allius
19916453f2 Update README.md (#133) 2024-07-23 23:38:48 +02:00
Stefan Allius
7f81799dd9 S allius/issue131 (#132)
* Make __publish_outstanding_mqtt public

* update proxy counter

- on client mode connection establishment or
  disconnecting update tje counection counter
2024-07-23 21:54:01 +02:00
Stefan Allius
dc4728122e S allius/issue128 (#130)
* set Register.NO_INPUTS fix to 4 for GEN3PLUS

* don't set Register.NO_INPUTS per MODBUS

* fix unit tests

* register OUTPUT_COEFFICIENT at HA

* update changelog

* - Home Assistant: improve inverter status value texts

* - GEN3: add inverter status

* on closing send outstanding MQTT data to the broker

* force MQTT publish on every conn open and close

* reset inverter state on close

- workaround which reset the inverter status to
  offline when the inverter has a very low
  output power on connection close

* improve client modified
- reduce the polling cadence to 30s
- set controller statistics for HA

* client mode set controller IP for HA
2024-07-22 23:27:17 +02:00
Stefan Allius
6f35c47254 S allius/issue125 (#127)
* fix linter warning

* move sequence diagramm to wiki

* catch asyncio.CancelledError
2024-07-15 21:45:45 +02:00
Stefan Allius
92a5fd22b8 S allius/issue120 (#126)
* add config option to disable the modbus polling

* read more modbus regs in polling mode

* extend connection timeouts if polling mode is disabled

* update changelog
2024-07-14 17:04:05 +02:00
Stefan Allius
f3dd87e03c make the maximum output coefficient configurable (#124) 2024-07-11 19:31:30 +02:00
Stefan Allius
112c7e66f2 S allius/issue117 (#122)
* add shutdown flag

* add more register definitions

* add start commando for client side connections

* add first support for port 8899

* fix shutdown

* add client_mode configuration

* read client_mode config to setup inverter connections

* add client_mode connections over port 8899

* add preview build

* add documentation for client_mode

* catch os error and log thme with DEBUG level

* update changelog
2024-07-10 20:43:03 +02:00
Stefan Allius
c7a33b4a35 MODBUS: the last digit of the inverter version is a hexadecimal number (#121) 2024-07-10 20:28:12 +02:00
Stefan Allius
da8f39c401 Update README.md
describe the new client-mode over port 8899 for GEN3PLUS
2024-07-08 20:31:36 +02:00
Stefan Allius
e4ff17e600 S allius/issue117 (#118)
* add shutdown flag

* add more register definitions

* add start commando for client side connections

* add first support for port 8899

* fix shutdown

* add client_mode configuration

* read client_mode config to setup inverter connections

* add client_mode connections over port 8899

* add preview build
2024-07-08 19:08:58 +02:00

Diff Content Not Available