kservices / gBridge

gBridge.io allows you to control (almost) anything with Google Assistant, by translating voice commands to MQTT messages.
https://about.gbridge.io
MIT License
173 stars 44 forks source link

mosquito_sub Connection Refused: not authorised. #41

Open sander816 opened 4 years ago

sander816 commented 4 years ago

i just found out about kappelt, but i have no idea what i am doing wrong with my first test device:

i try to subscribe to my topic: mosquitto_sub --username gbridge-ux --pw xxx --capath /etc/ssl/certs/ --host mqtt.gbridge.io --port 8883 --topic gBridge/u146/x/onoff

but i keep getting Connection Refused: not authorised.

what am i doing wrong here?

thucar commented 4 years ago

I set up my first gbridge integration yesterday. I had no issues getting everything to work with my Node-Red. However, I managed to create an endless loop in my Node-Red logics and I disabled gbridge MQTT connection from NodeRed side late last night.

This morning when I fixed the loop issue, I went and enabled the MQTT connection again. However, it no longer manages to connect to mqtt.gbridge.io server. I've now went and changed my MQTT password multiple times on the gbridge.io website, but no luck getting it up and running again.

Nov 22 06:50:20 home Node-RED[706]: Could not connect to device, handshake timeout
Nov 22 06:50:30 home Node-RED[706]: 22 Nov 06:50:30 - [info] [mqtt-broker:gBridge] Connection failed to broker: NR@mqtts://mqtt.gbridge.io:8883

Is there an issue with the server maybe?

thucar commented 4 years ago

Also, not sure if it matters but I'm on a paid subscription

sander816 commented 4 years ago

From within domoticz, with the plug-in, it worked, yesterday. Will test later today

Chrischi- commented 4 years ago

I have the same problem.

My system has been running for weeks without any problems. But since yesterday it is no longer possible to connect to the broker.

thucar commented 4 years ago

Ok, looks to be a server issue indeed then.... for time being, I've switched over to NORA.

Chrischi- commented 4 years ago

I think I'll switch to nora, too.

my last contact with the nora developer worked within hours.

sander816 commented 4 years ago

what is nora?

nonsintetic commented 4 years ago

same problem here, stopped working. Guessing server needs a nudge

thucar commented 4 years ago

@sander816 Nora is very similar to gbridge - https://github.com/andrei-tatar/node-red-contrib-nora but without a MQTT server of its own.

Mallinanga commented 4 years ago

Same here… When I try to debug the connection to the hosted MQTT server it errors out with: "Error: Connection refused"

mosquitto_sub -u gbridge-u[USER] --pw [PASSWORD] -p 8883 --capath /etc/ssl/certs -t gBridge/# -d -v -h mqtt.gbridge.io

drbeat commented 4 years ago

yep. seems like the mqtt server has some issues. i tried contacting kappelt but no luck yet

fastiuk commented 4 years ago

I am experiencing the same problem too. Locally MQTT works fine, but can't connect to gBridge. By the way, here are logs from mosquitto daemon:

1574524331: Connecting bridge (step 1) kappelt-gbridge (mqtt.gbridge.io:8883)
1574524331: Connecting bridge (step 2) kappelt-gbridge (mqtt.gbridge.io:8883)
1574524331: Error creating bridge: Protocol error.

Also, here is my mosquitto config file:

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

connection kappelt-gbridge
address mqtt.gbridge.io:8883
bridge_attempt_unsubscribe true
bridge_protocol_version mqttv311
cleansession true
remote_username gbridge-u3016
remote_password <pass>
remote_clientid gbridge-u3016-yevfast

topic cmnd/# both 0 "" gBridge/u3016/
topic cmndstat/# out 0 "" gBridge/u3016/
#you might need to change the path of the CA files
#This one is valid for most Debian based systems
bridge_capath /etc/ssl/certs/
bridge_tls_version tlsv1.2
bryangerlach commented 4 years ago

The server has been down for a couple days now. We might have to find alternatives.

Chrischi- commented 4 years ago

Simply switch to NORA.

I also donated something to the developer @andrei-tatar with PayPal to support his efforts.

drbeat commented 4 years ago

The server has been down for a couple days now. We might have to find alternatives.

it is just one day that the service is not working. stop spreading fear.

bryangerlach commented 4 years ago

The server has been down for a couple days now. We might have to find alternatives.

it is just one day that the service is not working. stop spreading fear.

It has been 2 days for me (Thursday, Friday, and now Saturday). Its not spreading fear, it's stating facts. Since I'm paying for the service, I would like it to work or at least have some kind of response from the person getting my money. I would prefer not to switch to a different service, but it doesn't hurt to consider my options.

drbeat commented 4 years ago

well you are right that the communication is definitely bad. and as a customer you should be informed of the status but i still think that it will be corrected i may be blind

fastiuk commented 4 years ago

The server has been down for a couple days now. We might have to find alternatives.

it is just one day that the service is not working. stop spreading fear.

It has been 2 days for me (Thursday, Friday, and now Saturday). Its not spreading fear, it's stating facts. Since I'm paying for the service, I would like it to work or at least have some kind of response from the person getting my money. I would prefer not to switch to a different service, but it doesn't hurt to consider my options.

It happens with all services, not only this. We are used to convenient online services and that situation just another side of the medal. So that is some kind of ok. But, at least we had to be informed, cause I thought that the problem is on my side and I spent some time on it to try to fix it.

SpaceCadet-Code commented 4 years ago

Its been a few days for me too as well since I was able to connect to the service. I was trying to troubleshoot "Connection issues" which lead me finally to this topic.

glsf91 commented 4 years ago

It is working again.

thucar commented 4 years ago

That's awesome. @peterkappelt - could you shed some light on the cause for this disruption? Is it something that we might expect to happen again in the future or was this just a series of unfortunate events which are not likely to happen again?

Do not get me wrong. I applaud anyone who is developing Open Source software. I'm a firm believer in Open Source and in supporting the developers while doing so. It is just that I need to assess the potential risks as well. I do smart home setups for a living, so if I tell my customers "I will be using this piece of software, it will cost you XX/month in buying the developer coffee every month." Then it will become exponentially more difficult to sell them on it if I need to add a clause, "oh, by the way it might not work for a few days every now and then."

Chrischi- commented 4 years ago

@thucar In this case there is also gbridge for businesses. https://about.gbridge.io/business I assume that there are some SLAs here.

thucar commented 4 years ago

Thanks @Chrischi- Ii have been looking at that option as well. I only just discovered gBridge and am in the testing phase right now, trying to determine its reliability. I did go over their terms of service and they explicitly specify that the software is supplied "As is" with no warranty on up time and availability. If the conditions for businesses differ, then that would be great.

Generally I'm not really looking to use gBridge as SaaS as such. I'm not interested in the overhead that comes with managing gBridge subscriptions for my customers, even if I added my own fee to the service.

I prefer "set it and forget it" type of approach where I set up a working system for the customer and if there are any subscription based components, make sure the customer is aware of them and on how to keep the subscriptions going. Then get paid once for services provided.

That said, if the business solution comes with up time guarantees, then that's definitely something to consider. So far I have not managed to get any response to my e-mail.