I’m looking for a way to store payloads in database and I’ve read on this forum that good way to do it is to subscribe to MQTT topic. I have LoRa stack installed by default docker installator. Host machine is Debian. I have MQTT up and running on default 1883 port.
I can see data in web ui:
Try subscribing to ‘application/#’ in case you got the application id wrong (it should be in the URL of the page you were viewing before).
Or for that matter just subscribe to ‘#’ and see everything including the raw encrypted packets to/from gateways and various housekeeping. Unless you have a huge number of devices nearby it won’t be an extreme flood and will give you some sense of what is / isn’t working.
Perhaps you connected to the wrong broker? You aren’t specifying to presumably it assumes localhost and a default port.
And don’t run mosquitto_sub as root. There’s no reason to - at most the broker would need privileged port access. The client does not; any permission issues are between the client and broker and related plug-ins, not between the client and the host os.
Thanks, but unfortunately it doesn’t help
Results of subscribing to ‘#’ are also empty (in debug mode there is only ‘sending CONNECT’…)
I run mosquitto_sub on Debian host OS, maybe it should be run from inside of one of docker containers? (but I can’t find ‘mosquitto_sub’ command there…)
I’ve just found out that I can successfully subscribe to MQTT from outside (another machine) with mosquitto_sub -v -t ‘#’ -h some.external.IPv4.address, but surprisingly it doesn’t work from within machine where LoraServer is hosted…
I really got stuck
mosquitto_sub works perfectly from outside the server, but within it - no data. Checking with nmap -p 1883 I can see that from outside this port looks open, from inside it’s… filtered. And these filters are applied by LoRa/docker containers - is there any way to change them?