123456789101112131415161718192021 |
- import os
- from lib.mqtt import create_client, update_disc, control_player, create_config
- # Define the MQTT server details
- broker = os.environ.get("broker")
- port = int(os.environ.get("port"))
- # MQTT username and password
- username = os.environ.get('username')
- password = os.environ.get('password')
- client = create_client(broker, port, username, password)
- create_config(client)
- # update_disc(client, {"type":"album", "id":"MPREb_2UBRpewr9ad"})
- # update_disc(client, {"type":"playlist", "id":"LM"})
- #
- control_player(client, "EJECT")
- #
|