Coder Social home page Coder Social logo

yllibed / zigbee2mqttassistant Goto Github PK

View Code? Open in Web Editor NEW
450.0 19.0 42.0 4.87 MB

GUI for Zigbee2Mqtt running in docker and HASS.IO

C# 65.54% Dockerfile 1.86% HTML 31.29% CSS 1.09% JavaScript 0.22%
zigbee2mqtt home-assistant mqtt zigbee home-automation smarthome

zigbee2mqttassistant's Introduction

Zigbee2Mqtt Assistant

Codacy Badge All Contributors Build Status Release Status Docker Pulls

This project is a Web GUI for the very good Zigbee2Mqtt software (github sources).

Features

  • If you're using zigbee2mqtt for your devices, it's a must.
  • Display zigbee devices and the status of each of them.
  • Display an interactive map of the network
  • Touchlink support
  • Automatically turn off allow join of Zigbee network - no matter how you turned it on (don't need to be turned on from Z2MA). Default is 20 minutes.
  • Flexible installation:
    • Available as a HASS.IO add-on (integration into Home Assistant). Ingress is supported too. note: can be used without Home Assistant.
    • Published as a docker images for following architectures
      • Linux AMD64 (alpine): linux-x64
      • Linux ARM32 (buster-slim): linux-arm32 (armv7+ processor required - Won't work on Raspberry Pi Zero or Zero-W!)
      • Linux ARM64 (apline): linux-arm64 (armv8+ processor required)
      • Windows 64 bits (v10.0.17763+): win-64
      • Windows ARM32 (v10.0.17763+): win-arm32
      • Also published as a multi-arch manifest: latest (or dev for development version)
  • Operations on devices:
    • Allow network join - no more need to setup virtual switches in HA just for that.
    • Rename devices
    • Remove devices from network (+ forced remove)
    • Configure device (force reconfiguration of device's reportings)
    • Bind device to another one (mostly used for Ikea TRÅDFRI devices - documentation here)
    • Visualize device health
    • OTA Upgrades
  • Based on ASP.NET Core 3.1 LTS.

Screenshots

Installation

OPTION 1 - Installing as HASS.IO Add-on

  1. Add the following repository url in HASS.IO:
    https://github.com/yllibed/hassio
    
  2. Install Zigbee2Mq2ttAssistant
  3. Configure your credentials for your MQTT server
  4. Enjoy!

OPTION 2 - Installing from docker

Run the following command by replacing <mqttserver>, <mqttusername>, <mqttpassword> with your correct values.

docker run -p 8880:80 -e "Z2MA_SETTINGS__MQTTSERVER=<mqttserver>" -e "Z2MA_SETTINGS__MQTTUSERNAME=<mqttusername>" -e "Z2MA_SETTINGS__MQTTPASSWORD=<mqttpassword>" --restart unless-stopped carldebilly/zigbee2mqttassistant

Draft note: Environment variables are currently the easiest way to set those settings. Open an issue if you need it to be in a configuration file/folder.

Docker Compose example

If you're using Docker Compose, fell free to use this. 8880 is the port where the service will be available, from the outside of the container itself.

######################################
# Zigbee2MqttAssistant (GUI Interface)
######################################
# https://github.com/yllibed/Zigbee2MqttAssistant

  zigbee2mqttAssistant:
    image: carldebilly/zigbee2mqttassistant
    container_name: zigbee2mqttAssistant
    environment:
      - Z2MA_SETTINGS__MQTTSERVER={IP_OR_HOSTNAME}
      - Z2MA_SETTINGS__MQTTUSERNAME={MQTTUSERNAME}
      - Z2MA_SETTINGS__MQTTPASSWORD={MQTTPASSWORD}
      # Set to your TimeZone when using on Linux https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      # Won't work if you're using the Windows version of the container
      - TZ=Europe/Copenhagen
    ports:
      - 8880:80
    restart: unless-stopped

Accepted for Docker-compose Manifest v.3

OPTION 3 - Installing from sources & compiling using Visual Studio

  1. Compile the solution file
  2. Adjust settings in appsettings.json for your MQTT connection

Note: it won't compile using the dotnet core build yet. For now, MSBuild is required to build it.

This method is not recommended because any change to dependencies will require you to update your development/deployment environment.

Release Channels

There is 2 channels for Zigbee2MqttAssistant: dev and stable. When a build version is considered stable enough, it will be pushed from dev to stable (there's no git branch dedicated to the stable version).

If you want to try newest features, you can get the dev branch in the following way:

  • On HASS.IO, pick zigbee2mqttassistant-dev package
  • On Docker, pick the following package/tag: carldebilly/zigbee2mqttassistant:dev

Settings

You can refer to Settings.cs file for more information on allowed settings. Here's the important settings:

Field Default Usage
BaseTopic "zigbee2mqtt" Base MQTT topic when Zigbee2Mqtt is publishing its data
HomeAssistantDiscoveryBaseTopic "homeassistant" Base MQTT topic for HASS Discovery
MqttServer "mqtt" Name or IP address of the MQTT server. Put only the name or the address of the server here. DON'T USE THE mqtt:// ADDRESS FORMAT.
MqttSecure false If should use TLS to connect to MQTT server. Valid options are true, false or "insecure". Insecure means it's using TLS, but without any server certificate check.
MqttPort 1883 (normal) or 8883 (secured) Port for MQTT server
MqttUsername "" Username for MQTT server
MqttPassword "" Password for MQTT server
LowBatteryThreshold 30 Threshold for triggering low-battery warning (%)
AllowJoinTimeout 20 Timeout for turning off allow join of Zigbee network. Set 0 to disable this feature
AutosetLastSeen false Will turn on last_Seen on Zigbee2Mqtt automatically when detected as off.
DevicesPollingSchedule */12 * * * * Schedule (cron expression) for device list refresh. Default value: every 12 minutes.
NetworkScanSchedule 0 */3 * * * Schedule (cron expression) for device list refresh. Default value: every 3 hours. This network scan can have high cost on your network: details here.

For environment variables, you can use any of the previous fields, prefixed with Z2MA_SETTINGS__. By example, you can specify the MqttPort with an environment variable in the following way:

Z2MA_SETTINGS__MQTTPORT=11883
Z2MA_SETTINGS__MQTTSECURE=INSECURE

Note: Uppercase is used here as a convention. It's actually case insensitive.

If you need to change cron expression for other values, you should use a site like https://crontab.guru/ to validate them. Attention: if you specify specific hours, take care of the time offset (timezone) inside the container!

Listening to Alternate Port / Linux Security

When running this container on Linux, it's a best practice to run containers with a non-root account. To achieve that with Zigbee2MqttAssistant, it's required to change the listening port to something else than 80, because ports number under 1024 are restricted to priviledged users.

Since it's using ASPNET Core, it's possible to change the listening port in the container to something else by using one of the following method:

  • Set the --urls parameter on the command line:

    # Command line to set alternate listening port in the container
    # using the --urls parameter
    docker run carldebilly/zigbee2mqttassistant --urls http://*:8888
  • Use the ASPNETCORE_URLS environment variable:

    # Command line to set alternate listening port in the container
    # using the ASPNETCORE_URLS environment variable
    docker run -e "ASPNETCORE_URLS=http://*:8888" carldebilly/zigbee2mqttassistant

This method can also be used to set another scheme (https://), a specific ip address or many ports at the same time. Microsoft ASPNET Core documentation.

Roadmap

  • Build a CI + publish to docker hub
  • Shorter environment variables + config file (for docker image)
  • Create a HASS.IO add-on
    • Support for HASS.IO Ingress
    • Automatic update of repo on new version
  • Support Zigbee Bindings
  • Support Docker Manifest (support for ARM + Windows)
  • Support mapping of network
  • Allow-join auto-off
  • Support Zigbee groups
  • Support for device images

Requirements

  • You need a running installation of Zigbee2Mqtt v1.5.0+

    • Also tested on v1.6.0, v1.7.0, v1.7.1 and v1.8.0, v1.11 (needed for firmware update feature)
  • Simple MQTT connection with username/password (TLS supported)

    • Client certificates not supported yet - open an issue if your need it.
  • Zigbee2Mqtt required settings:

    • Home Assistant Discovery should be activated for a better experience (to see components)

      AN ACTUAL INSTALLATION OF HOME ASSISTANT IS NOT REQUIRED

      To activate: homeassistant: true in Zigbee2Mqtt configuration

    • last_seen should be activated on Zigbee2Mqtt (any format supported). There's an option (AutosetLastSeen) to activate it automatically through MQTT.

Contributing

  • If you have suggestions or find bugs, don't hesitate to open and issue here, on Github.
  • PULL REQUESTS are welcome! Please open an issue first and link it to your PR. If you're unsure about how to implement a feature, we should discuss it in the issue first.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


VivantSenior

📖

alwashe

📖

agreenfield1

📖

neographikal

🤔 🐛

wixoff

🐛

heubi76

🐛

Remco van Geel

🤔

James Darling

🐛

Nenad Bogojevic

🐛 💻

trekker25

💬

Brendan Mullan

🤔

seaverd

🐛

timdonovanuk

🤔

Rafhaan Shah

🤔

foXaCe

🤔

Marius

🐛 🤔

Rick van Hattem

🐛

PeeJay

🐛

Jérôme Laban

💻

John Dyer

🐛

Dan Chen

💻

dystechnic

🐛

FutureCow

🐛

Tobias Nordahl Kristensen

💻 📖

tdn131

🤔

Edzilla2000

🤔

Adrian Böckenkamp

🤔 🐛

David

💻

Magnus Pernemark

💻 💬

Florian Gabsteiger

💻

Помозов Виталий

💻

Maciej Panecki

💬

This project follows the all-contributors specification. Contributions of any kind welcome!

zigbee2mqttassistant's People

Contributors

agreenfield1 avatar allcontributors[bot] avatar atxbyea avatar carldebilly avatar codacy-badger avatar dependabot-preview[bot] avatar diveflo avatar djchen avatar exetico avatar jeromelaban avatar vaital3000 avatar vivantsenior avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zigbee2mqttassistant's Issues

Explantion of tags - Zigbee2Mqtt "offline" unreliable

I have seen a few odd or inconsistent tags against devices.
Not sure if this is coming from Zigbee2Mqtt itself from the scan data, or from Zigbee2MqttAssistant...

  1. Offline device (bulb that is physically disconnected from power) shows as "very weak link" rather than offline.

image

image

BTW this device is correctly not in the graphml map diagram since its not in the network.
It is in the DB so correctly listed by Zigbee2MqttAssistant

  1. All routers are tagged as "offline".
    I think this one is Zigbee2Mqtt since I also see in the graphml diagram.

image

image

WDYT on these?

Support secrets.yaml

HA 0.99 brings support of secrets.yaml to addons.
It appears this addons still doesn't support !secret to username and password of MQTT

ARM compatibility?

Hello,

I'm using a Raspberry 4 with docker. Is this compatible?

Best regards,

Some of my groups show up as devices

In the devices list, 3 of my groups show up, e.g.:

bedroom_1_lamps_group NO COMPONENTS Maybe this device is not (yet) supported by Zigbee2Mqtt?

When I click on it to get more info, it shows:

Zigbee Id is unknown yet (did you restart recently?).
Address on Zigbee Network is 0x.
Link quality is unknown/255.
Model is unknown by unknown.
Hardware version is unknown.
This device type is unknown

My other groups dont show up in Zigbee2MqttAssistant at all. There is no difference between the group above and the ones that don't show up, in my Zigbee2Mqtt config.yaml.

Also, group management support would be great as a future enhancement :)

Unable to connect to MQTT via Docker

This straight up doesn't work in my Docker-compose environment, I see the connection going to my MQTT container, but Mosquitto rejects it:

1570614507: New connection from 172.18.0.2 on port 1883.
1570614508: Socket error on client <unknown>, disconnecting.

Not sure whether it's not passing username or password or what, correctly. But it doesn't work.

Compose settings:

  zigbee2mqtt-assistant:
    container_name: zigbee2mqtt-assistant
    image: carldebilly/zigbee2mqttassistant
    environment:
      - Z2MA_SETTINGS__MQTTSERVER=172.18.0.6
      - Z2MA_SETTINGS__MQTTPORT=1883   
      - Z2MA_SETTINGS__MQTTUSERNAM=myusername
      - Z2MA_SETTINGS__MQTTPASSWORD=mypassword
    ports:
      - 8880:80
    restart: always

hassio addon - zigbee2mqttassistant-aarch64 - no network map?

I'm using HASSIO install on RPi3; zigbee2mqttAssistant installed via addons, aarch64 version.
is it normal that I don't see the "Map" option in the menu of the assistant?
my brother's device, with regular [non aarch64] version displays network map with no problem.

configure base topic in docker

Hi, I'm trying to use version: zigbee2mqttassistant, but I see no option to set the basetopic (different from "zigbee2mqtt"). Is there any config file or something like this which can be mapped outside the container?

Cannot install in Hassio on RP3 + HASSOS 64 bits

Sorry, but i cannot install your addon.
This is the message i get in log:
19-08-24 08:57:30 ERROR (SyncWorker_3) [hassio.docker.interface] Can't install carldebilly/zigbee2mqttassistant:0.2.0-dev.58 -> 404 Client Error: Not Found ("no such image: carldebilly/zigbee2mqttassistant:0.2.0-dev.58: No such image: carldebilly/zigbee2mqttassistant:0.2.0-dev.58").

I am on a Rpi 3+ HassOS 2.12

Allow ability to configure base MQTT topic

Hi @yllibed

I am running two instances of Zigbee2mqtt in my home, which means they are running via two MQTT base topics.

It would be good to be able to set the MQTT base_topic to match the one used in Zigbee2MQTT's config.

Problem non JSON message (Xiaomi 2ch Relay)

Many features break if you set names with special characters.

      Error processing MQTT message on topic 'zigbee2mqtt/Climă parter 2/l2/set'
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: O. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
   at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevice(String friendlyName, String jsonPayload, Boolean& forceLastSeen) in d:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 59
   at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchZigbee2MqttMessage(MqttApplicationMessage msg) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 404
   at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 328

I can't generate anymore the network map.

docker installation: unable to connect to mqtt

Hi,

a very cool project!
It seems that the key is not present in the keychain (docker image):

Application started. Press Ctrl+C to shut down.
fail: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery[7]
An exception was thrown while deserializing the token.
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {97c6bac4-872b-48cb-ad74-a95997dde53e} was not found in the key ring.
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)
at Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)
Application is shutting down...
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Disconnected from MQTT server mqtt.

thanks and best regards

If device's FriendlyName contains single quote, Map is not displayed

There is a syntax error in Map.js caused by extraneous single quote in this case and that breaks display of the map.

I'd say bug comes from line

WriteLiteral("{id: '" + device.ZigbeeId + "', label: '" + device.FriendlyName + "', shape:'" + getShape(device) + "', mass:" + getMass(device) + "},\n");

Probably should be something like this (my C# is little bit rusty)

                WriteLiteral("{id: '" + device.ZigbeeId + "', label: '" + device.FriendlyName.Replace("'", @"\'") + "', shape:'" + getShape(device) + "', mass:" + getMass(device) + "},\n");

Thanks for the good work!

Permission denied - Unable to start Kestrel

Hi,
Thanks for the project. I am trying to run it as a docker container on ubuntu 18 server, using ansible to deploy it.
My parameters for container are


- name: ensure zigbee2mqttassistant is started
  docker_container:
    name: zigbee2mqttassistant
    image: "carldebilly/zigbee2mqttassistant"
    state: started
    restart_policy: always
    detach: true
    user: "mainuser"
    recreate: yes
    published_ports:
      - "8881:80"
    env:
        Z2MA_SETTINGS__MQTTSERVER: "192.168.1.1"
        Z2MA_SETTINGS__MQTTUSERNAME: "abc"
        Z2MA_SETTINGS__MQTTPASSWORD: "def"

However it does not start properly, it complains that

`
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)

at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context)

at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context)

at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)

at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)

at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)

at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken)

at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage)

at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)

at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)

at Zigbee2MqttAssistant.Program.Main(String[] args) in d:\a\1\s\Zigbee2MqttAssistant\Program.cs:line 18

crit: Microsoft.AspNetCore.Server.Kestrel[0]

  Unable to start Kestrel.

System.Net.Sockets.SocketException (13): Permission denied

at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)

at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.Sockets.Socket.Bind(EndPoint localEP)

at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport.BindAsync()

at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass21_0`1.<g__OnBind|0>d.MoveNext()

--- End of stack trace from previous location where exception was thrown ---
`

I tried several combination of paramters, restarting the host, restartint zigbee2mqtt assistant (which has homeassistant to true) etc, but no luck so far.

As far as I understood the container does not need mapped volume to the host?
Any suggestions where I can start tweaking things around to get it to run?

Memory Use (or leak) - seeing 40GB+ RAM use after Z2MA is running for a day or two.

I'm running the latest version in Docker.

I don't have much to add, nor do I understand the mechamsim. After 24+ hours, if I run top I get 40+ GB virtual memory consumed a "dotnet" process associated with Z2MA and my PC hardly responds to input (because the virutual memeory is too busy thrashing around). Best bet is to reboot before doing anything else, and even the gentle reboot process is hamstrung by the non-responsive PC and can take 20 minutes.

I recently discovered that killing the Z2MA container brings the system back to life, so reboots are less frequently needed.

Can we take a look at potential memory leaks? Z2MA is currently unusuable beyond short intervals.

As mentioned, I'm running on Docker on an x86-64 machine with plenty of memory - 32GB.

I can provide addiitonal detail if needed.

how to get rid of various warnings

I suspect I have some old devices in my mqtt database that are made by a battery script. and a webcam integration that I can't delete.
Zigbee2MqttAssistant gave several warnings, what's the right way to get rid of this?

Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/zigbee_knop_trapgat_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/zigbee_knop_trapgat_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/switch_158d0001a5e296_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/switch_158d0001a5e296_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/switch_158d0001a5e296_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/unknown_node_41_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/unknown_node_41_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/unknown_node_41_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_both_158d00027c1640_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_both_158d00027c1640_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_both_158d00027c1640_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_left_158d00027c1640_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_left_158d00027c1640_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_left_158d00027c1640_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_right_158d00027c1640_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_right_158d00027c1640_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/wall_switch_right_158d00027c1640_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d0001a5e296_click_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d0001a5e296_click_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d0001a5e296_click_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d0001a5e296_linkquality_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d0001a5e296_linkquality_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x000b57fffeb207b2_action_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x000b57fffeb207b2_action_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x000b57fffeb207b2_action_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x000b57fffeb207b2_linkquality_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x000b57fffeb207b2_linkquality_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x000b57fffeb207b2_linkquality_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_occupancy_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_occupancy_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_occupancy_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_illuminance_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_illuminance_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_illuminance_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_linkquality_battery/config'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_linkquality_battery/state'.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to qualify a message received on topic 'homeassistant/sensor/0x00158d000222de95_linkquality_battery/attributes'.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/motion in entity dafang-binary_sensor-motion.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/motion/detection in entity dafang-switch-motion_detection.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/motion/send_mail in entity dafang-switch-motion_send_mail.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/motion/tracking in entity dafang-switch-motion_tracking.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/leds/blue in entity dafang-switch-blue_led.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/leds/yellow in entity dafang-switch-yellow_led.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/leds/ir in entity dafang-switch-ir_led.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/ir_cut in entity dafang-switch-ir_cut.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/night_mode in entity dafang-switch-night_mode.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/night_mode/auto in entity dafang-switch-auto_night_mode.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/rtsp_h264_server in entity dafang-switch-rtsp_h264_server.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/rtsp_mjpeg_server in entity dafang-switch-rtsp_mjpeg_server.
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0]
Unable to find friendly name from topic myhome/dafang/motion/send_telegram in entity dafang-switch-motion_send_telegram.

Enchancement: Pairing timer

Besides the current "enable joining" button, there should be an extra button (which I recommend making as default) to enable joining only for a limited time (most of the gateways do this). This would reduce the risk of people forgetting to turn it off, or turning it off a few days later when they remember/check something.

I think there should be two buttons:

  • Short timer - with description for joining one device - Usable when adding new things to your setup
  • Long timer - with description for re-doing your setup - Usable when starting from scratch or rebuilding a larger installation

A button to enable this without a timer should be hidden in a more "advanced" section.

Potential problems: Memory leaks due to timer.

Move JS/CSS Locally or Fallback to local files

Hey,

Just a suggestion but when the internet is down the Zigbee2MqttAssistant page within hass.io has broken styling due to the fact it calls Google Fonts / jQuery / Bootstrap etc from remote sources.

If for some reason you really want to keep the remote sources, you could always implement a fallback to local files.

Thanks for all the excellent work!

BridgeStateService: Unable to find friendly name from topic

Running clean Hass.io install with zigbee2mqtt all up and running as it should.
MQTT Server is extern (loxberry). Get the following fault when I start the Assistant?

Log
warn: Zigbee2MqttAssistant.Services.BridgeStateService[0] Unable to find friendly name from topic mqtt/kontakt10 in entity 0x00158d00022b3819-sensor-linkquality.

Unable to delete old devices

HA: 0.99.2
Zigbee2Mqtt: 1.6.0
zigbee2mqttassistant: 0.2.0-dev.76

It is not possible for me to remove devices i had once used before but are now in another mesh network on a different controller (conbee II)

When removing these old devices i get the following message in the log:

Unable to qualify a message received on topic 'zigbee2mqtt/bridge/config/remove'

The device then is gone but only until i restart the Zigbee2MqttAssistant. Then everything is back as before.

Unable to connect to MQTT via Docker

I'm attempting to use this on my Synology NAS.

With the default docker run command, it uses an internal IP address for itself. Which means I can't use 127.0.0.1 to connect to the MQTT server running in a different container.

My MQTT container is set using --net=host to give it full network access.

If I set my MQTT address to the IP address of my NAS ie 192.168.1.x then I receive the following error:

warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
      Unable to connect to MQTT server 192.168.1.3.
MQTTnet.Exceptions.MqttCommunicationException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.Sockets.Socket.<>c.<ConnectAsync>b__274_0(IAsyncResult iar)
--- End of stack trace from previous location where exception was thrown ---
   at MQTTnet.Implementations.MqttTcpChannel.ConnectAsync(CancellationToken cancellationToken)
   at MQTTnet.Internal.MqttTaskTimeout.WaitAsync(Func`2 action, TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at MQTTnet.Adapter.MqttChannelAdapter.WrapException(Exception exception)
   at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync()
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
      Failed to determine the https port for redirect.

(I am not using HTTPS or SSL for MQTT)

If I set the container to use --net=host, the container fails to start because port 80 is already used by another application.

It would be good to be able to specify the port the service should use, so that --net=host can be supported as well.

This device is considered as OFFLINE by Zigbee2Mqtt

All my routers show the message in the title "OFFLINE"

lamp_moestuin_buiten
Zigbee Id is 0x001788010434cb9c.
Address on Zigbee Network is 0x70CD.
Link quality is 148/255.
Model is LTW010 by Philips.
Hardware version is 1.
This device type is Router

So they have linkquality and can also be reached using Hass.

Other i also have, the Map function looks great, but for some reason all objects keep on moving!?

MQTT Server Port

Would it be possible to create an environmental variable for the MQTT Server Port? I tried passing 192.168.0.50:11883 as I use a non-standard port and am unable to connect to my existing mqtt server. In other dockers I have had to send the mqtt server and the mqtt port as two separate variables.

Thanks for your consideration
Dan

Can't make connection with mqtt

I have insert the right mqtt server details and credentials (zigbee2mqtt works perfect on this credentials) but i get still the same error:

      Unable to connect to MQTT server mqtt://homeassistant.
MQTTnet.Exceptions.MqttCommunicationException: No such device or address ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No such device or address
   at System.Net.Dns.InternalGetHostByName(String hostName)
   at System.Net.Dns.ResolveCallback(Object context)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
   at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
   at System.Net.Sockets.Socket.DoDnsCallback(IAsyncResult result, MultipleAddressConnectAsyncResult context)
   at System.Net.Sockets.Socket.DnsCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.Sockets.Socket.<>c.<ConnectAsync>b__274_0(IAsyncResult iar)
--- End of stack trace from previous location where exception was thrown ---
   at MQTTnet.Implementations.MqttTcpChannel.ConnectAsync(CancellationToken cancellationToken)
   at MQTTnet.Internal.MqttTaskTimeout.WaitAsync(Func`2 action, TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at MQTTnet.Adapter.MqttChannelAdapter.WrapException(Exception exception)
   at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
   at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync()

Removing devices does not remove entries in database.db

First off, thanks for this GUI! It's working great and as expected.

However, when using the 'Remove' button to remove 'left-over' devices which are not present anymore, I can see the entries get removed from devices.yaml, but they are still present in database.db.
After restarting zigbee2mqtt, they reappear just without name.

Is this something you can fix, or something that needs to be fixed by KKoen?

I'm using Zigbee2mqtt addon for HASS.IO 1.6.0 and your latest Zigbee2MqttAssistant addon (0.2.0-dev.66)

Docker compose

I'm trying to write a docker compose conf with no sucess,
What missing?

   version: '3'
   services:
     zigbee2mqttassistant:
       container_name: zigbee2mqttassistant
       image: carldebilly/zigbee2mqttassistant
       ports:
         - "8880:80"
       restart: always
       environment:
         - Z2MA_SETTINGS__MQTTSERVER=""
         - Z2MA_SETTINGS__MQTTUSERNAME=""
         - Z2MA_SETTINGS__MQTTPASSWORD=""

Duplicate links between nodes in map

Some links are duplicated in the map:
image

It seems that it's only between routers (Is there a link from router A to router B and another one from B to A in the object model ?)

Support mqtt:// server syntax

Hello there,

What am i doing wrong, it says it cannot connect with my mqtt server.
This is log file,

Hosting environment: Production
Content root path: /app
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.
warn: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
Unable to connect to MQTT server mqtt://core-mosquitto.
MQTTnet.Exceptions.MqttCommunicationException: No such device or address ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No such device or address
at System.Net.Dns.InternalGetHostByName(String hostName)
at System.Net.Dns.ResolveCallback(Object context)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.DoDnsCallback(IAsyncResult result, MultipleAddressConnectAsyncResult context)
at System.Net.Sockets.Socket.DnsCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.<>c.b__274_0(IAsyncResult iar)
--- End of stack trace from previous location where exception was thrown ---
at MQTTnet.Implementations.MqttTcpChannel.ConnectAsync(CancellationToken cancellationToken)
at MQTTnet.Internal.MqttTaskTimeout.WaitAsync(Func`2 action, TimeSpan timeout, CancellationToken cancellationToken)
at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at MQTTnet.Adapter.MqttChannelAdapter.WrapException(Exception exception)
at MQTTnet.Adapter.MqttChannelAdapter.ConnectAsync(TimeSpan timeout, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectAsync(IMqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync()

This is my config:,

{
"settings": {
"basetopic": "zigbee2mqtt",
"HomeAssistantDiscoveryBaseTopic": "homeassistant",
"MqttSecure": "false",
"Mqttserver": "mqtt://core-mosquitto",
"MqttPort": "1883",
"Mqttusername": "mqtt user",
"Mqttpassword": "mqtt password",
"LowBatteryThreshold": "20"
}
}

Switch to alpine containers + dotnet 3.0

I have reviewed the code base and the docker files for this project - there is nothing apparent that would require a full-fat Debian distro.

Size-wise, the Debian image is around 300mb whereas the Alpine equivalent is around 20mb.

While this would not have any benefits on performance, it would be beneficial to keep the image as lean and bloat-free as possible

[BUG] System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.

Describe the bug

The interface doesn't show any devices and the console keeps repeating these errors:

# docker run -p 8400:80 -e Z2MA_SETTINGS__MQTTSERVER=mqtt -e Z2MA_SETTINGS__MQTTUSERNAME='' -e Z2MA_SETTINGS__MQTTPASSWORD='' --restart always carldebilly/zigbee2mqttassistant
Starting Zigbee2MqttAssistant v0.3.88+Branch.master.Sha.a34fe059880e14ed9862286d6aa30d3853b87009...
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {d76e1e81-1147-468d-abd5-ebbb7833b9e8} may be persisted to storage in unencrypted form.
Hosting environment: Production
Content root path: /app
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
      Error processing MQTT message on topic 'zigbee2mqtt/bridge/config/devices'
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevices(String payload) in d:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 322
   at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchDevicesMessage(MqttApplicationMessage msg) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 459
   at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 315
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
      Error processing MQTT message on topic 'zigbee2mqtt/bridge/config/devices'
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevices(String payload) in d:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 322
   at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchDevicesMessage(MqttApplicationMessage msg) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 459
   at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 315
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
      Error processing MQTT message on topic 'zigbee2mqtt/bridge/config/devices'
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevices(String payload) in d:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 322
   at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchDevicesMessage(MqttApplicationMessage msg) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 459
   at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 315
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
      Error processing MQTT message on topic 'zigbee2mqtt/bridge/networkmap/graphviz'
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: d. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
   at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevice(String friendlyName, String jsonPayload, Boolean& forceLastSeen) in d:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 59
   at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchZigbee2MqttMessage(MqttApplicationMessage msg) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 405
   at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 328
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
      Error processing MQTT message on topic 'zigbee2mqtt/bridge/config/devices'
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at Zigbee2MqttAssistant.Services.BridgeStateService.UpdateDevices(String payload) in d:\a\1\s\Zigbee2MqttAssistant\Services\BridgeStateService.cs:line 322
   at Zigbee2MqttAssistant.Services.MqttConnectionService.DispatchDevicesMessage(MqttApplicationMessage msg) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 459
   at Zigbee2MqttAssistant.Services.MqttConnectionService.HandleApplicationMessageReceivedAsync(MqttApplicationMessageReceivedEventArgs eventArgs) in d:\a\1\s\Zigbee2MqttAssistant\Services\MqttConnectionService.cs:line 315
fail: Zigbee2MqttAssistant.Services.MqttConnectionService[0]
      Error processing MQTT message on topic 'zigbee2mqtt/bridge/config/devices'

To Reproduce
Steps to reproduce the behavior:

  1. Start Zigbee2MqttAssistant (via Docker)
  2. See errors

Installation

  • Version of Zigbee2Mqtt: Updated 10 minutes ago, commit: e26ad2aca2eeb0aa366982481eb921ee603fb6d1
  • Version of Zigbee2MqttAssistant: Latest docker, pulled 10 minutes ago
  • Installation type: Docker
  • Docker version: Docker version 19.03.4, build 9013bf583a, amd64

Allow connecting to MQTT Brokers with Self Signed Certificates

Zigbee2MqttAssistant will not connect to an MQTT broker on the local network using TLS as it complains that the certificate is for "some.domain.com" but it is connecting to a local IP (eg: 192.168.1.10).

The exact error is: "The remote certificate is invalid according to the validation procedure"

A similar option on the Zigbee2Mqtt config is "reject_unauthorized" which allows it to work with the MQTT broker. The option in the Home Assistant MQTT broker configuration is: "tls_insecure"

Would be nice if we could get a similar option with this assistant!

MQTT server option only supports IP address?

Hi! First of all, great work!

I've realized that the 'mqttserver' option only supports an IP address, not a hostname or even a port number (also IP:PORT is not working). Is it normal / known or is it a problem on my side? 🙈

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.