Hello,
My Onion Omega2+ threw an error when trying to connect to Losant using the Single Command connection. I’m using this tutorial from Onion’s 2-Bullet Tuesday newsletter which explains how to setup Losant and Omega to connect.
In the middle of the tutorial, there is a one-line script that will complete the setup and connect the Omega to the Losant application that was previously set up. When i entered the script into my Omega: mosquitto_sub -t losant/[YOUR-DEVICE-ID]/command, it threw an error: Error: Connection refused.
In a different thread, I was told that I needed to enter my Device ID, Access Key, and Access Secret, which I did do as instructed by the tutorial:
Hello,
Sorry for not clarifying that the screenshot I provided was what the tutorial said should happen, and it didn’t for me. Here’s a screenshot of what happens when I do it:
I’m actually not 100% sure where the communication log is, but the device, debug, and data tabs all look the same before and after running mosquitto_sub…
mosquitto_pub takes a host argument, and if it’s missing then it uses localhost. You examples do not include -h which implies you would be talking to a local broker (possibly setup as a bridge to losant).
If that is the case, is the mosquitto local broker running.
If not then the connection refused will be the result.
If you are not running a local broker then you need to supply a host.
T