Stefan Allius
18f6332784
fix timer cleanup
2024-06-25 23:13:59 +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
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
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
8088e6ab3c
cleanup
2024-06-16 18:13:07 +02:00
Stefan Allius
e0568291f6
use Enum class for State
2024-06-16 17:50:09 +02:00
Stefan Allius
b688d04836
isolate Modbus fix
2024-06-16 13:00:02 +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
53f6a5447d
cleanup msg_get_time handler
2024-06-09 11:41:01 +02:00
Stefan Allius
1deab4be6a
fix imports
2024-06-09 11:01:04 +02:00
Stefan Allius
9985917ad2
add more type annotations
2024-06-08 23:15:38 +02:00
Stefan Allius
851bd54d8f
Merge branch 'dev-0.9.0' of https://github.com/s-allius/tsun-gen3-proxy into s-allius/issue56
2024-06-08 00:08:54 +02:00
Stefan Allius
0b2631c162
beautify some traces
2024-06-07 19:27:36 +02:00
Stefan Allius
c59bd16664
change log level for some traces
2024-06-05 22:01:48 +02:00
Stefan Allius
039a021cda
cleanup trace output
2024-06-04 21:55:57 +02:00
Stefan Allius
8204cae2b1
improve logging output
2024-06-03 19:52:37 +02:00
Stefan Allius
d27fe09006
reduce size of trace file
...
- trace heartbeat and regular modbus pakets
only with log level DBEUG
- don't forwar akc pakets from tsun to inverter
since we answered in before
2024-05-31 20:03:21 +02:00
Stefan Allius
66657888dd
add log_level support for modbus commands
2024-05-28 19:32:20 +02:00
Stefan Allius
de1c48fa62
add keyword for timeout to argument list
2024-05-21 18:58:10 +02:00
Stefan Allius
3ac48dad1f
cleanup
2024-05-20 18:33:01 +02:00
Stefan Allius
eff3e7558b
increase test coverage
2024-05-20 16:53:26 +02:00
Stefan Allius
9ac1f6f46d
add Modbus retrasmissions
2024-05-19 21:17:16 +02:00
Stefan Allius
f30aa07431
don't frwd received modbus req directly
...
- use always the fifoto sent valid req to the inverter
- code cleanup
2024-05-19 13:42:29 +02:00
Stefan Allius
282a459ef0
add Modbus response forwarding
2024-05-19 12:23:58 +02:00
Stefan Allius
f4da16987f
add fifo and timeout handler for modbus
2024-05-18 20:18:15 +02:00
Stefan Allius
036af8e127
move the Modbus instance to the parent class
2024-05-13 19:49:00 +02:00
Stefan Allius
1658036a26
store modbus params always on the server side
2024-05-12 23:09:51 +02:00
Stefan Allius
e43a02c508
improve modbus parsing
...
- parse Modbus messages well if another msg
follows in the receive buffer
2024-05-11 23:40:46 +02:00
Stefan Allius
dd438bf201
add comment
2024-05-09 23:38:34 +02:00
Stefan Allius
93e82a2284
move state variable to the parent class
2024-05-09 18:22:08 +02:00
Stefan Allius
5a0456650f
avoid sending modbus cmds in critical states
2024-05-09 14:20:57 +02:00
Stefan Allius
a869ead89a
add MAX_DESIGNED_POWER (only readable by Modbus)
2024-05-09 14:16:15 +02:00
Stefan Allius
2ec0a59cd3
add modbus long int support
2024-05-08 23:48:41 +02:00
Stefan Allius
3fd528bdbe
improve logging
2024-05-07 21:20:12 +02:00
Stefan Allius
e15387b1ff
fix modbus trace
2024-05-07 19:41:07 +02:00
Stefan Allius
02d9f01947
don't send AT or Modbus cmds on closed connections
2024-05-07 18:32:56 +02:00
Stefan Allius
d5010fe053
parse modbus corect if we have received more than one message
2024-05-07 17:56:54 +02:00
Stefan Allius
f804b755a4
improve modbus trace
2024-05-06 23:18:47 +02:00
Stefan Allius
fa2626ec7a
add modbus resp handler
2024-05-05 20:14:51 +02:00
Stefan Allius
a2f67e7d3e
use async_write() instead of flush_send_msg()
2024-05-03 18:23:08 +02:00
Stefan Allius
f78d4ac310
remove flush_send_msg()
2024-05-03 18:22:31 +02:00
Stefan Allius
5fdad484f4
add flush_send_msg() implementation
2024-05-03 00:03:02 +02:00
Stefan Allius
dba3b458ba
add Modbus support
2024-05-02 23:59:55 +02:00
Stefan Allius
6eebd0c852
make timestamp handling stateless
2024-04-29 22:48:41 +02:00