Giter Club home page Giter Club logo

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

zigbee2mqttassistant's Issues

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.

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

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

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 :)

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

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.

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!?

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!

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

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.

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?

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?

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!

[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

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!

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

ARM compatibility?

Hello,

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

Best regards,

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!

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.

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"
}
}

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.

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.

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()

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.

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.

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)

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 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=""

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

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.