File: hub.py

package info (click to toggle)
python-aiopvapi 3.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 684 kB
  • sloc: python: 3,123; xml: 850; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 557 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from pprint import pprint

from aiopvapi.helpers.aiorequest import AioRequest
from aiopvapi.hub import Hub


async def get_firmware(hub_ip):
    request = AioRequest(hub_ip)
    hub = Hub(request)
    await hub.query_firmware()

    print("MAIN PROCESSOR")
    print(hub.main_processor_version)

    print("RADIO")
    print(hub.radio_version)


async def get_user_data(hub_ip):
    request = AioRequest(hub_ip)
    hub = Hub(request)
    await hub.query_firmware()

    print("UserData")
    print("hub name: {}".format(hub.hub_name))
    pprint(hub._raw)