MQTT - Sleep as Android

On every event, Sleep as Android will publish a message to SleepAsAndroid topic in the following format:


This is a companion discussion topic for the original entry at https://docs.sleep.urbandroid.org//services/mqtt.html

I have configured Sleep as Android to send events to my MQTT broker using both a ‘remote’ URL and a local IP address. Sleep as Android appears to send events to the broker ie a notification appears showing the event being sent to MQTT; however it doesn’t seem to be received at the broker and no error messages are displayed. Has anyone got MQTT working?

Hello Benjamin, big thanks for reporting this. We did not yet test the MQTT implementation on a local server here, can you please use menu - report a bug after the event is send by SaA? That would be very helpful.

Hello Benjamin, I have now tested with a local mosquitto instance and it worked… I think the problem is the URl needs to have protocol tcp or ssl not mqtt as stated in the hint… I’m fixing this for the next BETA release, which I’m going to release now… there was also a crashing bug on disconnect which I’m fixing too so please update…many thanks for your feedback…

Hi Petr. Thanks for the update! I’ve submitted a new bug report as SaA it’s now working with a URI like tcp://192.168.0.254:1833 but not tcp://user:pass@host.ddns.net:1883 … Ben