Code Monkey home page Code Monkey logo

Comments (6)

nubbler avatar nubbler commented on September 27, 2024 1

ok, the problem was sitting in front of the monitor.
I editing the false SBFSpot.cfg.

Thank you for your support.

from sbfspot.

sbf- avatar sbf- commented on September 27, 2024

Complex password? Maybe some characters of your password aren´t passed. I have to check but in the meantime try with a simple password.

from sbfspot.

nubbler avatar nubbler commented on September 27, 2024

No, there are just numbers and letter.
I tried also with new user and just letters in the password, no change....

But I recognized, the test that works was with mosquitto_sub, in SBFspot.cfg was mosquitto_pub used. WHat is the difference here?

from sbfspot.

sbf- avatar sbf- commented on September 27, 2024

sub is for the client who subscribes for a topic
pub is for the client who publishes the data
There is only one publisher (SBFspot) and one or more subscribers

from sbfspot.

nubbler avatar nubbler commented on September 27, 2024

ok, understand. That means to subscibe to the broker does work, but not to publish to the broker.
But the Connection is Refused with error "not authorised".

So the error is somethere at the Broker. But the user/password should be the same for publishing or subscribtion, right?

Or what do I need to set up at broker side that he accepts a SBFSpot connection?

Sorry, I'm complete new at the MQTT Topic....

from sbfspot.

nubbler avatar nubbler commented on September 27, 2024

I tested now a little deeper:

on MQTT broker I subscribe:

mosquitto_sub -d -h [MQTT Broker IP] -t sbfspot_openhabian -u [user] -P [password]

On SBF-Spot raspi I publish with

mosquitto_pub -d -h [MQTT Broker IP] -t sbfspot_openhabian -u [user] -P [passwod] -m test -r

--> this works, message test was received at subscriber side.

But if I run SBFSpot with -mqtt argument it doesent work and brings the error:

Connection Refused: not authorised.
Error: The connection was refused.
MQTT: Failed te execute '/usr/bin/mosquitto_pub' mosquitto client installed?
Error 1280 while publishing to MQTT Broker

I checked MQTT Settings in SBFspot.cfg several times and find no error.
Host, user, password, mosquitto_pub path, Topic --> all matchs with the options I used in the comand line.
I also aranged the order of the arguments in MQTT_PublisherArgs to the comand I used in comand line. Doesn't help.

Is there anything else I can/need to check?

from sbfspot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.