Community Hass.io Add-on: MQTT Server & Web client

hassio-repository
hassio-addon
Tags: #<Tag:0x00007f1b9604bdd0> #<Tag:0x00007f1b9604bc68>

#122

It can not (yet) it will have support for that kind of customizing in the next version


#123

Ok thank you, worth the wait then


#124

MQTT server won’t install:

Fresh image flashed to sd card for rpi1.

Error:
hassio.docker.interface] Can't install hassioaddons/mqtt:0.1.1 -&gt; 404 Client Error: Not Found ("no such image: hassioaddons/mqtt:0.1.1: No such image: hassioaddons/mqtt:0.1.1").


#125

That usually indicate that you have no more free space on the device, 32GB are recommended for the SD card.


#126

I know that the card is only 8Gb, but I think is more than anaf for small project.

Any idea?

core-ssh:~# df -h
Filesystem                Size      Used Available Use% Mounted on
overlay                   6.6G      1.5G      4.8G  23% /
tmpfs                    64.0M         0     64.0M   0% /dev
tmpfs                    89.3M         0     89.3M   0% /sys/fs/cgroup
/dev/root                78.4M     78.4M         0 100% /dev/init
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /ssl
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /addons
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /backup
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /share
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /data
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /config
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /etc/resolv.conf
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /etc/hostname
/dev/mmcblk0p8            6.6G      1.5G      4.8G  23% /etc/hosts
shm                      64.0M         0     64.0M   0% /dev/shm
tmpfs                    64.0M         0     64.0M   0% /proc/keys
tmpfs                    64.0M         0     64.0M   0% /proc/latency_stats
tmpfs                    64.0M         0     64.0M   0% /proc/timer_list
tmpfs                    64.0M         0     64.0M   0% /proc/sched_debug
tmpfs                    89.3M         0     89.3M   0% /sys/firmware

#127

Great Add-on.

I’m just wondering if this will work with the SmartThings bridge?


#128

I have no idea, but it looks like that kan publish to any broker, so it should work


#129

v0.2.0

  • :sparkles: Adds HA Authentication to web interface
  • :fire:Remove apache2-utils
  • :arrow_up:Update nginx-mod-lua to v1.14.1.-r0
  • :arrow_up:Update nginx to v1.14.1-r1
  • :sparkles: Adds the posibility to add custom mosquitto configuration

Full changelog


#130

I had the previous version working but the new version won’t start.

Log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

-----------------------------------------------------------
 Hass.io Add-on: MQTT Server & Web client v0.2.0

 Mosquitto MQTT Server bundled with Hivemq's web client

 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
 amd64 / Debian GNU/Linux 9 (stretch) / HA 0.82.1 / SU 139 / beta
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 11-patches.sh: executing... 
patching file /app/index.html
[cont-init.d] 11-patches.sh: exited 0.
[cont-init.d] 20-mqtt_broker.sh: executing... 
/var/run/s6/etc/cont-init.d/20-mqtt_broker.sh: line 109: CUSTOM_CONFIG: unbound variable
[cont-init.d] 20-mqtt_broker.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

My Options are:

{
  "log_level": "info",
  "certfile": "",
  "keyfile": "",
  "web": {
    "enabled": true,
    "ssl": false
  },
  "broker": {
    "enabled": false,
    "enable_ws": false,
    "enable_mqtt": false,
    "enable_ws_ssl": false,
    "enable_mqtt_ssl": false,
    "allow_anonymous": false
  },
  "mqttusers": [
    {
      "username": "!secret ssh_user",
      "password": "!secret ssh_pass",
      "readonly": true,
      "topics": [
        "#"
      ]
    }
  ]
}

image

What am I doing wrong?


#131

v0.2.1

  • :ambulance:Fix startup issues if the broker is disabled.

Full Changelog


#132

:tada: Release MQTT v0.2.2

  • :hammer:Enable AppArmor

Changelog https://github.com/hassio-addons/addon-mqtt/compare/v0.2.1...v0.2.2


#133

I used to have it working with Smartthingsbridge, but things broke when upgrading to latest HA and attempting to use the MQTT integration instead of configuration.yaml. I never could figure it out, so I went back to the old Mosquitto Broker hass.io addon and got that working with the new HA integration within 15 minutes. If you figure out how to connect to Smartthingbridge with this add-on, I’d love to hear how!

If you do try it with Smartthingsbridge, remember to change your hass.io add-on config and enable the non-ssl mosquitto port, which is 1883.


#134

Not sure if you found a solution but I ran into the same problem and came to the same conclusion as you. The add-on is taking several minutes to finish loading, and by that time, HA gives up connecting to the broker and doesn’t create any of my MQTT sensors. I never solved the problem with this add-on, but I switched back to the official Mosquitto Broker hass.io addon and got that working with the new HA integration within 15 minutes. If you can’t figure it out, I recommend switching back.


#135

The addon is in a different container so if it’s running, you could just restart Home Assistant - that won’t cause the addon to restart… that might make it work for you…


#136

Yes exactly thats the issue. I was never able to resolve this but i have recognized the issue only shows up if you restart the host system if you only restart HA itself it does work. As i was used to often restart the complete system (running on raspberry) after changes to the config so i was i regularly running into that issue.
I don`t know if there is another way to avoid that other than only rebooting HA or rebooting HA after the base system was rebooted once more. (i switched to this addon cause of the webinterface)


#137

That is a good workaround, but then I need to remember to restart Home Assistant if I ever reboot the Pi.

I wish there was a way to delay HA from attempting to connect to MQTT. The Homekit component has a service called homekit.start that you can write an automation to run that service x minutes after booting.That would be an easier workaround that I could set and forget.

Just wondering, do you restart Home Assistant via the UI (Configuration >> General >> Server Management >> Restart)? I’ve tried using that in the past but it never restarted correctly, from what I can tell.


#138

That is how I restart but in the ssh addon you can do a hassio ha restart


#139

can’t run this addon anymore, receive the below in log

2018/11/27 20:57:57 [warn] 720#720: *1 [lua] ha-auth.lua:65: authenticate(): Authentication against Home Assistant failed!, client: 192.168.1.16, server: _, request: "GET / HTTP/1.1", host: "192.168.1.12:5713"
192.168.1.16 - pi [27/Nov/2018:20:57:57 +0100] "GET / HTTP/1.1" 401 29 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 OPR/56.0.3051.104"

#140

From version 0.2.0 you use a Home Assistant user for the website


#141

Got it. Thanks