Now, I’m wondering it if would be possible to access an mqtt server? We do have an instance that gets streamed different data that might be interesting.
My first idea was to make the service connect to the mqtt server, wait for relevant events and then write them to local files which the lua part is listening for. But then I was wondering if the python mqtt library is even available. I extracted the squashfs and didn’t find it. Is there even a mechanism to install python packages?
Sounds correct. An alternative (if relevant events happen frequently) is to send the data directly to the info-beamer process using UDP. See util.data_mapper(). You basically send via UDP:
root/foo:hello
and
util.data_mapper{
foo = function(value)
print(value)
end
}
would print out “hello”. Advantage is that you don’t have to generate local temporary files.
It’s not, but I just took a quick look at paho.mqtt.python’s Python lib and it seems to work without complicated installation process or further dependencies: I “brutally” placed the linked mqtt folder next to my test python script which looks like this: