diff options
| author | jwansek <eddie.atten.ea29@gmail.com> | 2026-05-13 17:18:05 +0100 |
|---|---|---|
| committer | jwansek <eddie.atten.ea29@gmail.com> | 2026-05-13 17:18:05 +0100 |
| commit | 2ba3ac837a6f3d6ce498ff5ea3c1955c70baa8c0 (patch) | |
| tree | c93011dfb4af2b224327a6d2b7756459d08f7843 | |
| parent | eb80b4c998cd971b5f271a0735e0490b288c5cc9 (diff) | |
| download | power.eda.gay-2ba3ac837a6f3d6ce498ff5ea3c1955c70baa8c0.tar.gz power.eda.gay-2ba3ac837a6f3d6ce498ff5ea3c1955c70baa8c0.zip | |
Updated README image
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rwxr-xr-x | docs/power2.png | bin | 0 -> 363787 bytes | |||
| -rw-r--r-- | mqtt-client/mqtt-client.py | 6 | ||||
| -rw-r--r-- | switch-snmp/omada-switches.conf | 5 | ||||
| -rw-r--r-- | switch-snmp/snmpOmada.py | 4 |
6 files changed, 10 insertions, 8 deletions
@@ -10,6 +10,7 @@ node-red-data/ prometheus/web.yml prometheus/web.yml mqtt-client/omada.cfg +venv/ # Byte-compiled / optimized / DLL files __pycache__/ @@ -5,7 +5,7 @@ Also logs Zigbee informtion with a Tasmota-flashed Zigbee bridge. Looking for the Mikrotik POE usage monitor/exporter? That's in [`mikrotik.py`](/switch-snmp/mikrotik.py) - + ## Setup diff --git a/docs/power2.png b/docs/power2.png Binary files differnew file mode 100755 index 0000000..0648049 --- /dev/null +++ b/docs/power2.png diff --git a/mqtt-client/mqtt-client.py b/mqtt-client/mqtt-client.py index 8c7bd23..ad6227c 100644 --- a/mqtt-client/mqtt-client.py +++ b/mqtt-client/mqtt-client.py @@ -98,17 +98,16 @@ class MQTTClient: if status_before == "OFF": print("TV was formerly off, so its being turned on, so we're going to turn the firestick on.") - set_omada_poe("Firestick", 0) print("Waiting...") - time.sleep(8) + time.sleep(6) set_omada_poe("Firestick", 1) print("Turned firestick on.") else: print("TV was formerly on, so its being turned off, so we're going to turn the firestick off.") set_omada_poe("Firestick", 1) print("Waiting...") - time.sleep(8) + time.sleep(6) set_omada_poe("Firestick", 0) print("Turned firestick off.") @@ -124,6 +123,7 @@ class MQTTClient: status_before = self.get_http_power_status("192.168.5.6", os.environ["MQTT_PASSWD"]) self.toggle_plug("TasmotaTV") threading.Thread(target = toggle_firestick, args = (status_before, )).start() + # toggle_firestick(status_before) if zigbee_id == "0x74B3" and friendlyname == "HarveyButton" and "Power" in fields.keys(): if fields["Power"] == 2: diff --git a/switch-snmp/omada-switches.conf b/switch-snmp/omada-switches.conf index e4a6888..be77cd2 100644 --- a/switch-snmp/omada-switches.conf +++ b/switch-snmp/omada-switches.conf @@ -1,4 +1,4 @@ -[192.168.69.112] +[192.168.69.28] 1 = EAP225 Wifi 2 = Tasmota Zigbee 4 = Mikrotik CRS310-8G+2S+ @@ -7,7 +7,7 @@ 24 = Frigate Pi 23 = SG2005P-PD 8 = PiKVM -11 = Type-C POE Charger +11 = Cisco 7975 22 = Cluster Pi 9 19 = Cluster Pi 5 20 = Cluster Pi 7 @@ -21,4 +21,5 @@ 1 = Fibre ONT 2 = TL-RP108GE & EAP110 3 = Firestick +4 = ES205G diff --git a/switch-snmp/snmpOmada.py b/switch-snmp/snmpOmada.py index f1546a7..d3b183c 100644 --- a/switch-snmp/snmpOmada.py +++ b/switch-snmp/snmpOmada.py @@ -44,7 +44,7 @@ def get_alternate_name(port, host): try: return port_names[port] except KeyError: - return port + return str(port) def snmp_walk(host): proc = subprocess.Popen( @@ -93,4 +93,4 @@ if __name__ == "__main__": import mikrotik points = get_points() print(points) - mikrotik.append(points)
\ No newline at end of file + mikrotik.append(points) |
