Sorry if this is a stupid question…when I used the ResinOS based Hassio on my RPi, I could SSH in and use the mosquitto_sub command to see the messages from my sensors. I can’t figure out how to do this on the new HassOS based system. I’ve tried at the hassio prompt (which I knew wasn’t going to work):
hassio > mosquitto_sub -h 192.168.0.10 -u redactedusername -P redactedpassword -v -t “#”
hassio: ‘mosquitto_sub’ is not a hassio command. See ‘hassio --help’.
and then I tried logging in
hassio > login
~ # mosquitto_sub -h 192.168.0.10 -u redactedusername -P redactedpassword -v -t “#”
/bin/ash: mosquitto_sub: not found
but that didn’t work either. I have to admit I don’t know much about using the host system.
Can anyone point me in the right direction? Thanks!
HassOS is a managed environment, and when you SSH into the “machine”, you’re actually connecting to an isolated container. (It’s possible to SSH in to the actual underlying system for development, however the environment is very bare-bones and it’s not recommended that you do this.) This is why you cannot manually install anything through the shell. I recommend that you use this add-on to test out MQTT.
PS. Use this link to add the community addon repo: https://github.com/hassio-addons/repository
Thank you very much. I’ll check it out. I have been using the Mosquitto add-on from the official add-ons, and didn’t realize there was another choice. Thanks for your reply and the information.
@nickrout Are you using HassOS? I have the SSH add-on set up, I use Putty to SSH in and log in as root, I get the Hassio CLI. It tells me mosquitto_sub is not a valid command. I don’t understand what you are doing to get mosquitto_sub available on the command line. I could do it as you are describing when I used the ResinOS version, but not now.
yeah there is a difference in what is available with hassOS - based on buildroot. different to installing on linux or a venv.where you have full access to a real underlying OS.