Commit Graph

387 Commits

Author SHA1 Message Date
Stefan Allius
f304aa009e add quit flag to docker push 2024-06-27 21:00:17 +02:00
Stefan Allius
9e218fdf41 fix Config.class_init()
- return error string or None
- release Schema structure after building thr config
2024-06-25 23:28:34 +02:00
Stefan Allius
18f6332784 fix timer cleanup 2024-06-25 23:13:59 +02:00
Stefan Allius
26aebbcab8 fix buildx warnings 2024-06-23 23:56:37 +02:00
Stefan Allius
a9c7ea386e S allius/issue111 (#112)
Synchronize regular MODBUS commands with the status of the inverter to prevent the inverter from crashing due to unexpected packets.

* inital checkin

* remove crontab entry for regular MODBUS cmds

* add timer for regular MODBUS polling

* fix Stop method call for already stopped timer

* optimize MB_START_TIMEOUT value

* cleanup

* update changelog
2024-06-23 22:23:48 +02:00
Stefan Allius
6332976c4a S allius/issue102 (#110)
* hotfix: don't send two MODBUS commands together

* fix unit tests

* remove read loop

* optional sleep between msg read and sending rsp

* wait after read 0.5s before sending a response

* add pending state

* fix state definitions

* determine the connection timeout by the conn state

* avoid sending MODBUS cmds in the inverter's reporting phase

* update changelog
2024-06-23 15:06:43 +02:00
Stefan Allius
cc233dcb17 S allius/issue108 (#109)
* add more data types

* adapt unittests

* improve test coverage

* fix linter warning

* update changelog
2024-06-23 00:52:42 +02:00
Stefan Allius
9a9cf79aac fix unittests 2024-06-21 23:38:07 +02:00
Stefan Allius
a09d489c94 Merge branch 'main' of https://github.com/s-allius/tsun-gen3-proxy into dev-0.9 2024-06-21 19:25:37 +02:00
Stefan Allius
a3c054d2b1 Dev 0.8 (#106)
* S allius/issue102 (#103)

* hotfix: don't send two MODBUS commands together

* Update README.md

Exchange logger fw version with the real inverter fw version in the compatibility table

* Update python-app.yml

run also on pushes to issue branches
fix name for issues branches

* S allius/issue104 (#105)

* Update README.md

Exchange logger fw version with the real inverter fw version in the compatibility table

* Update python-app.yml

run also on pushes to issue branches
fix name for issues branches

* fix forwarding of MODBUS responses

* fix unit tests

* update changelog
2024-06-21 18:12:48 +02:00
Stefan Allius
2d4679a361 S allius/issue100 (#101)
* detect dead connections

- disconnect connection on Msg receive timeout
- improve connection trace (add connection id)

* update changelog
2024-06-17 23:10:54 +02:00
Stefan Allius
7d058e74fe log healthcheck infos with DEBUG level 2024-06-16 22:54:56 +02:00
Stefan Allius
373916bead add healthy method 2024-06-16 22:47:45 +02:00
Stefan Allius
f4b434cfef set new state State.received 2024-06-16 22:45:13 +02:00
Stefan Allius
d14cbe87a2 add docstrings to state enum 2024-06-16 22:43:59 +02:00
Stefan Allius
8088e6ab3c cleanup 2024-06-16 18:13:07 +02:00
Stefan Allius
4372e49a1e add HTTP server for healthcheck 2024-06-16 17:51:51 +02:00
Stefan Allius
da832232bb calc processing time for healthcheck 2024-06-16 17:51:14 +02:00
Stefan Allius
e0568291f6 use Enum class for State 2024-06-16 17:50:09 +02:00
Stefan Allius
f5e7aa4292 add aiohttp 2024-06-16 17:48:17 +02:00
Stefan Allius
5e360e1139 add wget for healtcheck 2024-06-16 17:47:46 +02:00
Stefan Allius
94f7f5faa2 complete exposed port list 2024-06-16 17:47:13 +02:00
Stefan Allius
fa7bfe9e16 log unrelease references 2024-06-16 13:29:43 +02:00
Stefan Allius
3cebab40c8 add heaithy handler 2024-06-16 13:26:05 +02:00
Stefan Allius
80183598ca cleanup 2024-06-16 13:03:33 +02:00
Stefan Allius
b688d04836 isolate Modbus fix 2024-06-16 13:00:02 +02:00
Stefan Allius
377c09bc66 Merge branch 'dev-0.9.0' of https://github.com/s-allius/tsun-gen3-proxy into s-allius/issue93 2024-06-16 12:39:56 +02:00
Stefan Allius
30a6f75430 Merge branch 'dev-0.9.0' of https://github.com/s-allius/tsun-gen3-proxy into s-allius/issue94 2024-06-16 12:23:57 +02:00
Stefan Allius
e22ad78dcd add exception handling for forward handler 2024-06-16 12:23:13 +02:00
Stefan Allius
453d8b2aa2 call modbus close hanlder on a close call 2024-06-16 11:57:51 +02:00
Stefan Allius
f9b02f3486 add a close handler to release internal resources 2024-06-16 11:56:03 +02:00
Stefan Allius
b053c7e576 Update async_stream.py
- check if processing time is < 5 sec
2024-06-16 02:08:15 +02:00
Stefan Allius
10346e888f log ConfigErr with DEBUG level 2024-06-16 01:52:34 +02:00
Stefan Allius
f629246dbd fix typo 2024-06-16 01:18:06 +02:00
Stefan Allius
dbff66affd add healthy check methods 2024-06-15 23:36:59 +02:00
Stefan Allius
ac534c20ed calculate msg prossesing time 2024-06-15 23:34:11 +02:00
Stefan Allius
ff3ed83b49 add http server for healthcheck 2024-06-15 23:29:27 +02:00
Stefan Allius
ae94cd62fc use config validation for healthcheck 2024-06-15 23:23:57 +02:00
Stefan Allius
a16a19cc2c add aiohttp 2024-06-15 23:21:15 +02:00
Stefan Allius
dd351176bd add wget for healthcheck 2024-06-15 23:20:38 +02:00
Stefan Allius
cc8674d108 add exposed ports and healthcheck 2024-06-15 23:19:10 +02:00
Stefan Allius
1e3bb31ef8 Merge pull request #90 from s-allius/s-allius/issue56
S allius/issue56
2024-06-14 00:05:48 +02:00
Stefan Allius
3209ebabde fix warnings 2024-06-13 23:44:57 +02:00
Stefan Allius
aac6cfd629 dump droped packages 2024-06-13 23:43:05 +02:00
Stefan Allius
e8d32b45a5 label debug images with debug 2024-06-13 23:41:30 +02:00
Stefan Allius
06b63f554d addapt unit test 2024-06-09 11:41:29 +02:00
Stefan Allius
53f6a5447d cleanup msg_get_time handler 2024-06-09 11:41:01 +02:00
Stefan Allius
d6093e6b11 fix pytest collect warning 2024-06-09 11:40:08 +02:00
Stefan Allius
57d6785f15 print image build time during proxy start 2024-06-09 11:22:23 +02:00
Stefan Allius
ff8adb5632 fix solarman unit tests
- fake Mqtt class
2024-06-09 11:02:43 +02:00