I have gotten everything to work successfully, publish and subscribe over MQTT (TLS and plain), using my main as well as organization tokens, when working direct from a client.
What I need to do is setup an MQTT broker for our device LANs. I’m using Mosquitto. I’ve gotten this to work perfectly when using my default token.
However, when I create organizational tokens, the data is able to be published and subscribed via industrial.api.ubidots.com
just fine. On the broker, I only see the data subscribed to when using the default token, not the organizational token.
Checking Ubidots directly with either token works:
$ mosquitto_sub -h industrial.api.ubidots.com -t /v1.6/devices/fin3/health.uptime -v -u <default or org token> -C 1
/v1.6/devices/fin3/health.uptime {"value": 1.0, "timestamp": 1566432993932, "context": {"text": "1 week, 6 days, 17 hours, 7 minutes"}, "created_at": 1566432994962, "id": "5d5ddee293f3c307c31220c2"}
At my local broker, using the default token for its connection to Ubidots mirrors everything in realtime, but using the organizational token on the broker outputs nothing.
I’ve tried both using an existing device that I assigned to the organization, as well as a new device assigned to the organization but created from the client using the organizational token.