Skip to content

Commit

Permalink
remove not required code
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus committed Aug 20, 2022
1 parent 80ffc65 commit b92cead
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
6 changes: 0 additions & 6 deletions bumper/mqtt/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
# /[receiver did]/[receiver class]]/[receiver resource]/[q|p/[request id/j
# [q|p] q-> request p-> response

TOPIC_P2P = re.compile(
"iot/p2p/(?P<command>[^/]+)/(?P<sender_id>[^/]+)/(?P<sender_cls>[^/]+)/(?P<sender_resource>[^/]+)/"
"/(?P<receiver_id>[^/]+)/(?P<receiver_cls>[^/]+)/(?P<receiver_resource>[^/]+)/(?P<mode>[^/]+)/"
"(?P<request_id>[^/]+)/(?P<data_type>[^/]+)"
)


class ProxyClient:
"""Mqtt client, which proxies all messages to the ecovacs servers."""
Expand Down
16 changes: 1 addition & 15 deletions bumper/mqtt/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,22 +174,8 @@ async def authenticate(self, session: Session, **kwargs: dict[str, Any]) -> bool

if bumper.bumper_proxy_mode:
mqtt_server = await dns.resolve("mq-ww.ecouser.net")
if mqtt_server:
proxymodelog.info(
f"MQTT Proxy Mode - Using server {mqtt_server}"
)
else:
proxymodelog.error(
"MQTT Proxy Mode - No server found! Load defaults or "
"set mqtt_server in config_proxymode table!"
)
proxymodelog.exception(
f"MQTT Proxy Mode - Exiting due to no MQTT Server configured!"
)
exit(1)

proxymodelog.info(
f"MQTT Proxy Mode - Proxy Bot to MQTT - Client_id: {client_id} - Username: {username}"
f"MQTT Proxy Mode - Using server {mqtt_server} for client {client_id}"
)
proxy = ProxyClient(
client_id, mqtt_server, config={"check_hostname": False}
Expand Down

0 comments on commit b92cead

Please sign in to comment.