diff --git a/requirements.txt b/requirements.txt index 6e4b7c5..fc877b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,6 @@ geopy>=1.14.0 docopt pyyaml certifi -hbmqtt -websockets<=8.1 +amqtt>=0.10.0,<0.11.0 +websockets>=9.0 aiohttp diff --git a/setup.py b/setup.py index 6eef931..47da639 100644 --- a/setup.py +++ b/setup.py @@ -14,4 +14,5 @@ packages=["volvooncall"], install_requires=list(open("requirements.txt").read().strip().split("\n")), extras_require={"console": ["docopt"]}, + python_requires=">=3.8" ) diff --git a/volvooncall/mqtt.py b/volvooncall/mqtt.py index 2959d10..22daab2 100755 --- a/volvooncall/mqtt.py +++ b/volvooncall/mqtt.py @@ -11,7 +11,7 @@ import asyncio import certifi -from hbmqtt.client import ClientException, ConnectException, MQTTClient +from amqtt.client import ClientException, ConnectException, MQTTClient from .dashboard import Lock, Position, Sensor, BinarySensor, Switch from .util import camel2slug, whitelisted, owntracks_encrypt @@ -288,7 +288,7 @@ async def publish(self, topic, payload, retain=False): async def subscribe_to(self, topic): _LOGGER.debug("Subscribing to %s", topic) - from hbmqtt.mqtt.constants import QOS_1 + from amqtt.mqtt.constants import QOS_1 await self.client.subscribe([(topic, QOS_1)]) _LOGGER.debug("Subscribed to %s", topic) @@ -379,7 +379,7 @@ async def publish_state(self): async def run(voc, config): - logging.getLogger("hbmqtt.client.plugins.packet_logger_plugin").setLevel( + logging.getLogger("amqtt.client.plugins.packet_logger_plugin").setLevel( logging.WARNING )