Mosquitto_pub

hi, I’m looking to publish a value to a variable in a device already working in my Blynk account.
Was trying to do it using mosquitto client using this command line:

mosquitto_pub -h blynk.cloud -p 1883 -u “xxxxx” -P ‘device token’ -t ‘ds/temperature’ -m ‘21.3’

with the following response:
Connection error: Connection Refused: bad user name or password.

the device token is ok, i’m sure for i’m using it from the Blynk test connection tool and work perfectly.
i’m not sure what the user is,i tried different way, including my Blynk account user and/or leaving it void (-u “”) with no success.
do any one know what user should i use? the documentation says something about ‘device’, i also tried device name with no success.
Also, the mentioned Blynk test connection tool does not ask for user, just the token, and work well, so it seems that user should not be required. But does not work when using mosquitto_pub.
Thanks,
Luis

Send MessageClose

The users name is simply “device”
Don’t change it for anything else, is’s simply “device”.

Pete.

that’s absolutely amazing! thanks Pete, it worked perfectly.

1 Like