None of the above helped me to get passed the 502 gateway error.
I had to delete the lines user: and password in the mqtt: section of the configuration, restart at the prompt and bang, working properly straight after.
Perhaps there is no one-size-fits-all solution.
After trying all the options I had read, enable, enable and configure plugins. My solution has been very easy.
Zigbee2mqtt version 1.24.0-1, the only port to work for me is:
Interface:
port: 8099
Any other port I put in returns Bad gateway if I start the UI.
putting the port 8099 that appears in the documentation is the only one that has worked for me. If I change it, it stops working.
http://homeassistant.local:8123/hassio/system then āHostā 3-dots āHardwareā
Search for your device. I bought a Texas Instruments CC2531-based USB dongle, so I entered āTexasā (or ā2531ā) and found the serial port.
I had to erase all due to an error, and I had to start again. I realized one thing. Now if you configure the add-on itās a bit different.
Leave like it is by default:
*data_path
*Socat
*In mqtt you need to add this:
server: mqtt://core-mosquitto
user: your mqtt user name
password: your mqtt user password
*In the serial you need to add the port: port: /dev/ttyUSB1
(you can find them in home assistant settings, system, hardware and search for your stick name, should be at the end, and you need to find the ttyUSB and the number, could be ACM0, ttyUSB0, ttyUSB1ā¦)
AFTER THIS, go to the add-on, before start the addon, click on show in lateral bar, and start the addon. The most probably is you have the bad gateway error. Click on the lateral bar, several times at least you donāt see the error. Nothing special more to do, you need to reload the addon at least it loads correctly.
If you see the page without the bad gateway error you need to link one device at least for not loose the right load of the addon. Or you will need to reload the addon several times again.
What worked for me from your reply was the change of the server from the ālocalhostā thatās suggested everywhere, to ācore-mosquitoā which is shown as the āhostnameā for the Mosquito Broker add-on on itās Info page.
I guess that shouldāve been obvious from the name āhostnameā but all the guides out there donāt mention it at all.
Because i started this topic, at the end i remain to use ZHA with the latest firmware of conbee2
Itās working fine with all my devices, and also you can change some zigbee quircks if one of the devices are not discovered correctly.