inverter was included

This commit is contained in:
Nils Reiners
2025-09-16 12:52:27 +02:00
parent 2186c4d7db
commit 5319a299be
14 changed files with 143 additions and 14 deletions

22
make_tunnel.py Normal file
View File

@@ -0,0 +1,22 @@
from sshtunnel import SSHTunnelForwarder
# ---- KONFIG ----
SSH_HOST = "192.168.1.146" # Raspberry Pi im 192.168.1.x Netz
SSH_PORT = 22
SSH_USER = "pi"
PASSWORD = 'raspberry' # oder Passwort als String
REMOTE_IP = "10.0.0.10" # Wärmepumpe im 10.0.0.x Netz
REMOTE_PORT = 502 # Modbus/TCP Port
def make_tunnel(port):
tunnel = SSHTunnelForwarder(
(SSH_HOST, SSH_PORT),
ssh_username=SSH_USER,
ssh_password=PASSWORD,
remote_bind_address=(REMOTE_IP, REMOTE_PORT),
local_bind_address=("127.0.0.1", port),
)
tunnel.start()
return tunnel