I had a couple of hours on the train to try out the Unicorn (its great) - i have added an MQTT version of the scroller text at:
Thought some people might find it useful,
Andy
I had a couple of hours on the train to try out the Unicorn (its great) - i have added an MQTT version of the scroller text at:
Thought some people might find it useful,
Andy
Exactly what I’m looking for.
I havn’t managed to get it working yet, but it’s my first project.
Thanks for getting me started.
Just to update - there is now also a 3D printed case as part of the MQTT scroller github …
and Fusion360 files if anyone wants to edit - eg make it a little deeper…
Andy
Mind if I link your great project from the Github docs @Smithee11 ? :)
It would be an honour :)
Andy
Hi Andy, this looks amazing. The reason I bought the GU was to try and interface it with my Home Assistant. This appears to be exactly what I need. I’m a novice tinkerer so need to get my head around MQTT but I’m sure I’ll get there eventually - Thank you so much.
Pete
Home Assistant has a nice MQTT integration - so you could use HA to send our messages :)
This is cool! how do i send my own messages to the broker which then display on the unicorn, MQTT newbie here. is there a tutorial?
Thank you for this code! Got it up and running.
I have an Mosquitto “server” running on a spare Pi 4 and the scroller code working a charm on my Galactic Unicorn.
However, I am trying to figure out how to have a clock show up between published messages.
Would love any help!
Hi,
How did you configure your mosquitto server ? I installed mosquitto on my RPI4, setup an account and password for it. The Galacic Unicorn connects to my wifi, connects to my RPI4, and disconnects. Did you need to do anything beside generate /etc/mosquitto.d/pwfile ? I can send messages to every linux host running the mosquitto client using the same account I created for the Galactic Unicorn.
Here’s an output from stdout:
Checking WiFi integrity.
Got reliable connection
Connection failed.
Connection lost (read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?))
Any Ideas ?
An answer to your question is I would research to see if MicroPython would support a scheduler script that will kick off a script, run a timer in the background, kill the script running in the foreground and start another one. I am not sure if you can do that with a Pico. If we can’t then we need to add a timer to each module that will exit the script after a set amount of time, and we need to write a script that will sequentially call each script ending with the last script will be rerunning the scheuler script.
I would prefer it if we can create a scheduler script that will run in the background, wake up, fire off a script, and go back to sleep for a set amount of time, wake up, start a new script and repeat…
This is super useful and can push updates for weather and 3d printer progress via home assistant.
I have very little knowledge of coding but I think there is 2 improvments that could make it even more useful. It looks like it grabs everything from the topic, so could we modify it to pull a colour/action (like scroll/center) for the message?
It also seems to check the retain flag but then doesn’t seem to use it. Could that be used to hold a message until the next so maybe we could push the time last and it sticks.
Hi @paulcdb
Please see my modified code.
I have allowed for the first word of the message to be a known colour to change the background colour.
It also plays an 8-bit tune when the message scrolls.
You could use the example of where I am looking for a key word in the start of the string to make other changes to how it displays the message.
I have started changing the code so you can listen to multiple topics.
So I use topic one messages to play them silently and topic two messages to play the music as the message scrolls.
I could add a third that would show a static smaller message.
I am still trying to find a way to show the time/weather in the time’s nothing is being received. But I have not had much luck there yet.
I have a Time to MQTT python script if that helps - GitHub - digitalurban/THE: eInk mini MQTT Information Display for Time, Headlines and Environmental Data
(for summer time the hour needs a +1),
Andy
Hi… I have the MQTT Scroller working with my Galactic Unicorn. I created mqtt ticker data from rss streams from Slashdot, Weather conditions at my r/c air club field, pretty soon I’ll add my home weather station. I’m using Mosquitto as a MQTT broker. Does the scrolling message scroll once or does it scroll twice ? I was checking my mosquitto logs to see if there are duplicate messages sent. One issue I’m having is if the message is long the complete message is displayed twice and the connection to the mosquitto message broker drops. The galactic unicorn resets the connection and reconnects.
Short messages are displayed twice as well but the Galactic Unicorn does not disconnect.
Hi,
I was thinking about changing the 8-bit tune to a Morse Code audio message for CT .._, (Start of Message) adding scroll command to pause and resume the scroll. Also adding a color foreground message to the background massage by adding a - in between the two. If a - does not follow the background color then the default is used.
The MQTT Scroller is working well. I am using it with my SwitchDoc Skyweather 2 weather station. I wrote my own MQTT broadcaster for it that executes via cron, gets the latest weather data record every 30 minutes from the MySQL database, parses the data and formats a weather message and send it to my PI based webserver that also runs Mosquitto… and broadcasts the message out. Next rainy day I’ll simplify the 8 bit music, cut it down to 1 voice, and play Morse Code Prosign CT before each new message. The Scroll pause/resume will need to be special characters embedded in the message. The pause is going to be a timed value that once reached will resume the scroll.
Maybe work on canned sprite animation too ?