Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


MQTT support
#3
Hi

I had a quick look at this, as I am also interested in remote access, and it is straighforward to set up.

I installed an MQTT broker on the Moode machine, and added a user and password

   https://www.vultr.com/docs/how-to-instal...untu-16-04

Then adjusted the python script in the following link to use the local broker

      https://funprojects.blog/2016/12/13/house-music/

Code:
client.subscribe("MoodeRadio")
...

client = mqtt.Client()
client.username_pw_set("my_username", "my_password")
client.connect("localhost",1883,60)


I can then play a radio station from a different debian-based machine, by installing "mosquitto-clients" and running
Code:
mosquitto_pub -t "MoodeRadio" -m "http://51.15.169.131:80/stream/3/"  -u my_username -P "my_password" -h moode_player_ip_address

You could use the Python script as a starting point for adding the features you want, and then create a systemctl service file so the script is started at boot.

My interest in this is that I have been thinking about creating a standalone screen, connected to some small board, to display status and control the player. There are some very cheap TFT touchscreens

   https://www.ebay.es/itm/240x320-2-4-SPI-...EBIDX%3AIT

Adrian.
Reply


Messages In This Thread
MQTT support - by normand - 11-19-2019, 02:51 AM
RE: MQTT support - by TheOldPresbyope - 11-19-2019, 04:30 AM
RE: MQTT support - by adrii - 11-19-2019, 11:59 AM
RE: MQTT support - by normand - 11-19-2019, 12:54 PM
RE: MQTT support - by Tim Curtis - 11-19-2019, 02:07 PM
RE: MQTT support - by TheOldPresbyope - 11-19-2019, 02:33 PM
RE: MQTT support - by DRONE7 - 11-22-2019, 07:28 AM
RE: MQTT support - by CallMeMike - 11-23-2019, 07:51 AM
RE: MQTT support - by normand - 11-23-2019, 04:42 PM
RE: MQTT support - by normand - 03-03-2020, 12:08 AM
RE: MQTT support - by normand - 03-16-2020, 11:39 PM

Forum Jump: