diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2023-11-04 00:03:42 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2023-11-04 00:03:42 +0000 |
commit | a09c97c4182885d3f62735b45ebe76f5a3a9f8dd (patch) | |
tree | 76b1330a71c3ad8237d788c2e6fc78afa29e37c9 /devices.py | |
parent | 29eb6dd5be90204e9251eef942b7b994ff4d2423 (diff) | |
download | power.eda.gay-a09c97c4182885d3f62735b45ebe76f5a3a9f8dd.tar.gz power.eda.gay-a09c97c4182885d3f62735b45ebe76f5a3a9f8dd.zip |
Changed mikrotik interface to use SSH instead, worked on client side
Diffstat (limited to 'devices.py')
-rw-r--r-- | devices.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -9,9 +9,7 @@ import os if not os.path.exists(os.path.join("/app", ".docker")): import dotenv dotenv.load_dotenv(dotenv_path = "power.env") - HOST = "srv.athome" -else: - HOST = None +HOST = None async def get_energy_for(host, username = None, password = None): device = await tasmotadevicecontroller.TasmotaDevice().connect(host, username, password) @@ -53,7 +51,7 @@ def poll_watt_all(): def poll_kwh_all(): loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) - with database.PowerDatabase(host = HOST) as db: + with database.PowerDatabase() as db: for host, username, password, description in db.get_tasmota_devices(): while True: try: |