Anyone had luck using this with NodeMCU?


#1

I have a NodeMCU that is controlling my stereo amplifier. I’m currently using CloudMQTT as a broker to broadcast MQTT messages to it (volume up, turn on, etc.) and everything works fine.

I’d like to use gbridge instead, but I am stuck trying to get the NodeMCU to connect to gbridge, though.

I think the issue is that gbrige uses TLS and I can’t for the life of me figure out how to get TLS set up on the NodeMCU or the certificate onto the device (I’m using Arduino platform to load the code).

Has anyone done this successfully?

Thanks in advance


#2

Do you have an example of your integration of CloudMQTT with the NodeMCU module?

AFAIK, most of the examples rely on an unencrypted MQTT connection inbetween the NodeMCU module and CloudMQTT. This is currently possible with gBridge, too - but not a good practice.


#3

Hi thanks for your reply. In the end I ended up using mosquitto on a pi as a bridge between gbridge and the device. Seems to work well. Thanks!


#4

Hi Sasharh, I have been through the whole process you have been through, but battled to setup the mqtt bridge with a password to gbridge, could you upload your mosquitto.conf to either here or a pastebin, I would greatly appreciate it. thank you


#5

And Peter, I don’t really care for encryption, how do I access the broker without encryption, just the username and pass.


#6

Hi Luca,

Yeah, I know. I went through the same thing.

Note - get the username / password from your ‘account’ in gbridge - not the ones that you use to log into your account. I also changed the MQTT password (different than the account password).

In my Mosquitto.conf (in conf.d folder), I added this entry for gbridge, with mosquitto as a bridge between my nodemcu and gbridge.

connection gbridge
address mqtt.gbridge.io:8883
topic gbridge/u969/d2951/onoff in home/livingroom/amp (before I had this as anything * both ways, but it didn’t work. Obviously this is just for inbound from gbridge, if you want to send the other way you have to add another line for ‘out’ instead of ‘in’)
try_private false
start_type automatic
remote_username blahblah (get this from gbridge account on the website - not your gbridge account name, the mqtt name)
remote_password (same)
clientid (can be whatever)
bridge_cafile /etc/ssl/certs/ca-certificates.crt

PS - there is guidance on how to access gbridge without encryption in the gbridge docs.

Hope this helps.

Sash