Giter Site home page Giter Site logo

zha-map's Introduction

zha-map is DEPRECATED

With HA 2020.12.0 zha-map and zha-network-visualization-card are deprecated, as all the functionality is now included with ZHA integration: Configuration Panel -> Integrations -> ZHA -> configure -> Visualization. New version of Zigzag are working without requiring the zha-map custom component.

Build ZHA network topology map.

zha-map integration commponent for Home Assistant allow you to make a ZHA (Zigbee Home Automation) network topology map.

Requires that you are already using the ZHA integration commponent in Home Assistant.

Zigbee network mapping with zha-map can help you identify weak points like bad links between your devices.

Installation Instructions

  1. Install the zha_map custom component
  1. Add zha_map: to your configuration.yaml and restart Home Assistant
  2. Wait for a scan to complete (logs to DEBUG, or use the new zha_map service to scan on demand)
  3. Install one of the visualization cards:
  1. Add to your lovelace global config as type: module
  2. Add custom card (works best in panel mode): - type: 'custom:zha-network-visualization-card'

Usage

The Zigbee coordinator will be represented by a rectangle at the top. Any device that serves as Zigbee router (usually all devices running on Mains electricity / grid power) will represented as ovals, and Zigbee end-device (usually battery powered sensors) will be represented by as circles.

The lines between those representions show all the possible paths through Zigbee mesh. Any path with a LQI over 192 is shown as green, LQI 129-192 is shown as yellow, and anything 128 and lower is shown as red.

Related projects

zha-network-visualization-card

zha-network-visualization-card is a custom lovelace element for Home Assistant that visualizing your ZHA Zigbee network. Zigbee network mapping with zha-map can help you identify weak points like bad links between your devices. It relies on the data provided by the zha-map integration commponent.

Zigzag

Zigzag is an custom card/panel for Home Assistant that displays a graphical layout of Zigbee devices and the connections between them. Zigzag can be installed as a panel or a custom card and relies on the data provided by the zha-map integration commponent.

Zigpy

zigpy is Zigbee protocol stack integration project to implement the Zigbee Home Automation standard as a Python library. Zigbee Home Automation integration with zigpy allows you to connect one of many off-the-shelf Zigbee adapters using one of the available Zigbee radio library modules compatible with zigpy to control Zigbee devices. There is currently support for controlling Zigbee device types such as binary sensors (e.g. motion and door sensors), analog sensors (e.g. temperature sensors), lightbulbs, switches, and fans. Zigpy is tightly integrated with Home Assistant's ZHA component and provides a user-friendly interface for working with a Zigbee network.

zha-map's People

Contributors

abmantis avatar adminiuga avatar balloob avatar gamester17 avatar jkkwon83 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zha-map's Issues

Error in card

i get this error in logs

Detalles del registro (ERROR)
Logger: frontend.js.latest.202002205
First occured: 16:13:27 (1 occurences)
Last logged: 16:13:27

http://192.168.86.7:8123/community_plugin/zha-network-card/zha-network-card.js:3:11 Uncaught ReferenceError: transpose is not defined

Missing zigbee device

Logger: custom_components.zha_map.neighbour
Source: custom_components/zha_map/neighbour.py:98
Integration: ZHA Network Map (documentation)
First occurred: 8:45:12 AM (6 occurrences)
Last logged: 8:47:25 AM

[00:17:88:01:04:fd:7c:e5]: neighbour f0:d1:b8:00:00:10:c4:63 is not in 'zigbee.db'
[00:17:88:01:04:17:cc:fe]: neighbour f0:d1:b8:00:00:10:c4:63 is not in 'zigbee.db'
[00:17:88:01:04:fd:7b:b7]: neighbour f0:d1:b8:00:00:10:c4:63 is not in 'zigbee.db'

I keep getting those warnings after I removed a Osram Bulb (f0:d1:b8:00:00:10:c4:63) from the network. This should not happen since the device is not there anymore from 3 days.

Steps I did to fix the issue:

  • restarted (powercycle) all zigbee routers
  • restarted home assistant many times

Missing 'version' key

Hi,

With the latest version of HA (2021.3.3) which I have just updated to few minutes ago I'm seeing the following warning (the 2nd line):

2021-03-09 11:51:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration zha_map which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2021-03-09 11:51:46 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'zha_map'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'zha_map'

Looks like an easy fix. This is listed item no 1 on the Breaking Changes release notes:
https://www.home-assistant.io/blog/2021/03/03/release-20213/#breaking-changes

'NoneType' object has no attribute 'name'

Just updated and restarted home assistant and now I'm getting the following error.

Home Assistant 115.2
ZHA-MAP Version 0.3.0
'NoneType' object has no attribute 'name'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 137, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1350, in _execute_service
await handler.func(service_call)
File "/config/custom_components/zha_map/init.py", line 66, in scan_now_handler
await builder.preempt_build()
File "/config/custom_components/zha_map/init.py", line 125, in preempt_build
await self.build()
File "/config/custom_components/zha_map/init.py", line 138, in build
nei = await Neighbour.scan_device(device)
File "/config/custom_components/zha_map/neighbour.py", line 73, in scan_device
r._update_info()
File "/config/custom_components/zha_map/neighbour.py", line 64, in _update_info
self.device_type = self.device.node_desc.logical_type.name
AttributeError: 'NoneType' object has no attribute 'name'

AttributeError: 'Neighbors' object has no attribute 'NeighborTableList'

Hello,
after upgrade HA to 0.115.2 ZHA scan does not work, and I see this in HA log:

2020-09-21 13:54:46 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/zha_map/__init__.py", line 137, in build
    await self.scan_device(seed)
  File "/config/custom_components/zha_map/__init__.py", line 226, in scan_device
    nei = await Neighbour.scan_device(device)
  File "/config/custom_components/zha_map/neighbour.py", line 115, in scan_device
    await r.scan()
  File "/config/custom_components/zha_map/neighbour.py", line 131, in scan
    neighbors = val.NeighborTableList
AttributeError: 'Neighbors' object has no attribute 'NeighborTableList'
2020-09-21 13:54:46 DEBUG (MainThread) [custom_components.zha_map] Building topology starting from coordinator
2020-09-21 13:54:46 DEBUG (MainThread) [custom_components.zha_map.neighbour] [00:21:2e:ff:ff:04:d4:bb]: neighbor request Status: Status.SUCCESS. Response: Neighbors(entries=3, start_index=0, neighbor_table_list=[Neighbor(extended_pan_id=00:21:2e:ff:ff:04:d4:bb, ieee=58:8e:81:ff:fe:6b:1e:10, nwk=0x1208, struct=_NeighborPackStruct(packed=37), permit_joining=<PermitJoins.Accepting: 1>, depth=1, lqi=116), Neighbor(extended_pan_id=00:21:2e:ff:ff:04:d4:bb, ieee=08:6b:d7:ff:fe:07:7e:0d, nwk=0x8ED5, struct=_NeighborPackStruct(packed=37), permit_joining=<PermitJoins.Accepting: 1>, depth=1, lqi=249)])
2020-09-21 13:54:51 INFO (SyncWorker_42) [zoneminder.zm] Initializing runstate 1

[REQUEST] Add same PyPa workflow as the other zigpy projects

PyPa has a GitHub Action for publishing pre-built distribution packages to PyPI.

Consider adding PyPa workflow in the same unified way as other zigpy libraries, see:

and

Also, consider adding a long description to PyPi index by pointing to the README.md

Keeping this and other information the same in all zigpy libraries can help unify them.

Error in log

`Logger: homeassistant.core
First occured: 1:14:34 (4 occurences)
Last logged: 10:01:17

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/zha_map/init.py", line 137, in build
await self.scan_device(seed)
File "/config/custom_components/zha_map/init.py", line 226, in scan_device
nei = await Neighbour.scan_device(device)
File "/config/custom_components/zha_map/neighbour.py", line 115, in scan_device
await r.scan()
File "/config/custom_components/zha_map/neighbour.py", line 123, in scan
zdo_t.ZDOCmd.Mgmt_Lqi_req, idx, tries=3, delay=1
File "/usr/local/lib/python3.7/site-packages/zigpy/util.py", line 88, in retry
r = await func()
File "/usr/local/lib/python3.7/site-packages/zigpy/device.py", line 194, in request
result = await asyncio.wait_for(req.result, timeout)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
Соединение потеряно. Повторное подключение ...
`

`Logger: homeassistant.core
First occured: 1 марта 2020 г., 20:59:33 (13 occurences)
Last logged: 10:01:17

Error doing job: Exception in callback SerialTransport._read_ready()
Traceback (most recent call last):
File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.7/site-packages/serial_asyncio/init.py", line 106, in _read_ready
self._protocol.data_received(data)
File "/usr/local/lib/python3.7/site-packages/zigpy_cc/uart.py", line 140, in data_received
self._api.data_received(frame)
File "/usr/local/lib/python3.7/site-packages/zigpy_cc/api.py", line 180, in data_received
obj = ZpiObject.from_unpi_frame(frame)
File "/usr/local/lib/python3.7/site-packages/zigpy_cc/zpi_object.py", line 76, in from_unpi_frame
payload = cls.read_parameters(frame.data, parameters)
File "/usr/local/lib/python3.7/site-packages/zigpy_cc/zpi_object.py", line 149, in read_parameters
res[name] = buffalo.read_parameter(type, options)
File "/usr/local/lib/python3.7/site-packages/zigpy_cc/buffalo.py", line 69, in read_parameter
elif type == ParameterType.LIST_UINT32:
File "/usr/local/lib/python3.7/enum.py", line 349, in getattr
raise AttributeError(name) from None
AttributeError: LIST_UINT32
Соединение потеряно. Повторное подключение ...
`

Not working on Home Assistant 0.115.2

Hi,
I tried to use your component but I got an error like undefined record.device_type and so on.

It seems that that HA version use a difference version of zigpy you expected because I had to change some lineof code as the follow patch file.
fix_for_HA_0_115_2.zip

Card does not display any map, only shows date at top

Hello,

First off im using Home Assistant 0.117.2. I will state that this has not worked for me since at least .116.0 but it might have been before.

I have zha_map loading fine it seems because im also using the zigzag module and the zha_network_card module and those seem to work fine.

However, I added the card to a panel view.. but all it shows me is a date at the top (1970-01-01 00:00:00) and a search box. So it seems the module loaded, but just isnt displaying anything.

image

My config is:

views:
  - panel: true
    badges: []
    cards:
      - type: 'custom:zha-network-visualization-card'

Any ideas what might be happening here?

Thanks very much.

Hassio won't restart with zha_map: in config file

Supervisor 207
HassOS 3.11
Home Assistant 0.106.5

When I add zha_map: to my configuration.yaml file, Home Assistant will not restart the server either through the configurator or the server controls. No errors are thrown and the log is empty. Forcing a server restart caused HA to no longer boot correctly and required restoring an old snapshot.

I tried changing it to zha-map: and got the usual 'Component not found' error.

I have zha: configured through the config file if that matters. It was the only way I could get it to work as the integrations page zha component didn't work for my device (HUSBZB-1)

zha-map only finds my coordinator, but no neighbours

Hey there,

I was looking to use this component to get an idea how my Zigbee network looks like. Especially, because I have two sensors that are barely responding, so I wanted to see their path. Plus, I want to install a "mains device", so a non-battery powered Zigbee device to get the signal repeated. And I wanted to then check that the Mesh network updates as I want it to, so the two sensors are not out of reach anymore.

However, when running the scan, it only finds my coordinator, but not a single Zigbee device / neighbour. I also don't see any logs, not even after manually executing the "zha_map.scan_now" service.
The file under /config/neighbours/neighbours_00212effff05c2b1.txt still looks like this:

{
    "ieee": "00:21:2e:ff:ff:05:c2:b1",
    "nwk": "0x0000",
    "lqi": null,
    "device_type": "Coordinator",
    "manufacturer": "dresden elektronik",
    "model": "RaspBee II",
    "offline": false,
    "neighbours": []
}

It's also the only file in this folder.

Am I doing something wrong? Am I missing something?

Some environment infos:

  • Running HA using hassio, hassio version: HassOS 4.15
  • HA version: 0.117.2 (0.117.1 also didn't work)
  • zha-map version: 0.40 (installed via HACS)

Hope somebody has an idea, thanks!
Greetings,

Andy!

Some devices are showing as offline when they are online

First off, this is absolutely awesome. Fantastic work!

So, I have installed and did my first scan. Some of my devices are showing as offline when they are online. This is one, it's a Sengled bulb. According to my ZHA devices panel, it last checked in at 2020-01-23T17:34:42 and is able to respond to commands. I have a few others that are doing the same thing. I know it's possible for sleepy devices to not wake up for a scan, but mains powered should always wake up, right?

image

image

Neighbour X is not in 'zigbee.db' warning.

Hey there,
While trying to set up the visualization map (which loads ok), I am getting this error in the logs while re-scanning the zha_map.

Logger: custom_components.zha_map.neighbour
Source: custom_components/zha_map/neighbour.py:98
Integration: ZHA Network Map (documentation)
First occurred: 2:25:59 PM (2 occurrences)
Last logged: 2:26:47 PM

[00:12:4b:00:1e:72:1a:dd]: neighbour 00:12:4b:00:1e:72:1a:6b is not in **'zigbee.db'**

I have no idea which the X device is. Might be a BASICZBR3 which i initially paired to my ZHA then fried it (due to my great electrician skills) and threw it away.

The only occurrence I find of its ieee id is in a neighbours file where three BASICZBR3 are listed (two are active).
I tried deleting the part of this device but it keeps re-appearing whenever i run the zha_map scan.
Where should i search to find and delete the residuals of this device that i wont use again?

Here is the full neighbours file:
All the other 4 devices are powered devices in my mesh which i recognize and are up and working (including my sonoff flashed gateway) - shown in comments below.

{
    "ieee": "00:12:4b:00:1e:72:1a:dd", ##BASICZBR3 
    "nwk": "0xaf2c",
    "lqi": null,
    "device_type": "Router",
    "manufacturer": "SONOFF",
    "model": "BASICZBR3",
    "offline": false,
    "neighbours": [
        {
            "ieee": "60:a4:23:ff:fe:42:5a:63", ## Gateway
            "nwk": "0x0000",
            "lqi": 9,
            "pan_id": "cc:cc:cc:cc:05:96:2b:c8",
            "device_type": "Coordinator",
            "rx_on_when_idle": "Unknown",
            "relation": "Parent",
            "new_joins_accepted": "Unknown",
            "depth": 0,
            "model": "EZSP",
            "manufacturer": "Silicon Labs",
            "offline": false,
            "supported": true
        },
        {
            "ieee": "00:12:4b:00:1e:72:1a:6b", ## UNKNOWN
            "nwk": null,
            "lqi": 0,
            "pan_id": "cc:cc:cc:cc:05:96:2b:c8",
            "device_type": "Router",
            "rx_on_when_idle": "On",
            "relation": "Child",
            "new_joins_accepted": "Unknown",
            "depth": 2,
            "model": null,
            "manufacturer": null,
            "offline": false,
            "supported": true
        },
        {
            "ieee": "00:15:8d:00:03:3b:10:72", ## XIaomi Smart Plug
            "nwk": "0x1888",
            "lqi": 0,
            "pan_id": "cc:cc:cc:cc:05:96:2b:c8",
            "device_type": "Router",
            "rx_on_when_idle": "Unknown",
            "relation": "None_of_the_above",
            "new_joins_accepted": "Unknown",
            "depth": 255,
            "model": "lumi.plug",
            "manufacturer": "LUMI",
            "offline": false,
            "supported": true
        },
        {
            "ieee": "00:12:4b:00:1e:72:8e:b1", ##BASICZBR3 
            "nwk": "0x01c3",
            "lqi": 0,
            "pan_id": "cc:cc:cc:cc:05:96:2b:c8",
            "device_type": "Router",
            "rx_on_when_idle": "Unknown",
            "relation": "None_of_the_above",
            "new_joins_accepted": "Unknown",
            "depth": 255,
            "model": "BASICZBR3",
            "manufacturer": "SONOFF",
            "offline": false,
            "supported": true
        }
    ]
}

Should i perhaps re-pair the main device of this file?
Thanks in advance.

Ha 115.2 update breaks ZHA Map

This was working on 115.1

The map no longer loads. The date in the top left corner is 1970-01-01

Logger: homeassistant
Source: custom_components/zha_map/neighbour.py:131
First occurred: 10:29:07 AM (1 occurrences)
Last logged: 10:29:07 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/zha_map/init.py", line 137, in build
await self.scan_device(seed)
File "/config/custom_components/zha_map/init.py", line 226, in scan_device
nei = await Neighbour.scan_device(device)
File "/config/custom_components/zha_map/neighbour.py", line 115, in scan_device
await r.scan()
File "/config/custom_components/zha_map/neighbour.py", line 131, in scan
neighbors = val.NeighborTableList
AttributeError: 'Neighbors' object has no attribute 'NeighborTableList'

doesn't install

HA v. 0.114.4 (on Raspberry Pi 4)
added repository:
Says Unknown
No installation option in Add-On store

AttributeError: 'Weather' object has no attribute 'neighbors'

Hello.
ZHA-MAP is not worked on 0.114.4?
I have this error:
2020-10-01 12:03:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2880318360] 'Weather' object has no attribute 'neighbors' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 125, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1308, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1343, in _execute_service await handler.func(service_call) File "/config/custom_components/zha_map/__init__.py", line 66, in scan_now_handler await builder.preempt_build() File "/config/custom_components/zha_map/__init__.py", line 125, in preempt_build await self.build() File "/config/custom_components/zha_map/__init__.py", line 138, in build nei = await Neighbour.scan_device(device) File "/config/custom_components/zha_map/neighbour.py", line 78, in scan_device await r.scan() File "/config/custom_components/zha_map/neighbour.py", line 83, in scan for neighbor in self.device.neighbors: AttributeError: 'Weather' object has no attribute 'neighbors'

Scan fails

Using pizigate.
2020-06-25 15:45:19 ERROR (MainThread) [custom_components.zha-map] failed to scan 00:15:8d:00:03:af:5f:49 device: [0x0000:0:0x0031]: Message send failure

setup directions not working in October 2020 version of Home Assistant

I'm getting this error when I try and create a custom card.
error zha-network-visualization-card
I followed the directions in the wiki as closely as I could.
I note that the terminology in the directions doesn't match the menu choices and button names in the current (2020) version of Home Assistant.
I'm betting the UI has changed since the directions were written?
For example, the is no "Configure UI" choice in the ⋮ circle, only "Edit Dashboard".
Edit Dashboard
After that, there are 2 + buttons to choose from:

  1. the upper + button is Add View
    Lovelace + button Add view

  2. the lower + button is Add Card
    Lovelace + button Add Card

Which + button do we choose in the current (2020) versions of Home Assistant?

I'm running HA in a VMWare Virtual Machine:

arch x86_64
chassis vm
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.14
installation_type Home Assistant OS
os_name Linux
os_version 5.4.69
python_version 3.8.5
supervisor 247
timezone America/Chicago
version 0.116.4
virtualenv false

Select different types of links

Would it be possible to add a facility which would allow us to select the different type of links.

Eg. All green links, or all red links?

It would allow a cleaner view when trying to optimise our networks.

'EZSPCoordinator' object has no attribute 'neighbors'

The last update with EZSP the map module is loading OK in HA but i getting this then doing one scan:

Log Details (ERROR)
Logger: homeassistant.components.websocket_api.http.connection.140197815383088
Source: custom_components/zha_map/neighbour.py:80
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:42:03 AM (1 occurrences)
Last logged: 9:42:03 AM

'EZSPCoordinator' object has no attribute 'neighbors'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 137, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1350, in _execute_service
    await handler.func(service_call)
  File "/config/custom_components/zha_map/__init__.py", line 66, in scan_now_handler
    await builder.preempt_build()
  File "/config/custom_components/zha_map/__init__.py", line 125, in preempt_build
    await self.build()
  File "/config/custom_components/zha_map/__init__.py", line 138, in build
    nei = await Neighbour.scan_device(device)
  File "/config/custom_components/zha_map/neighbour.py", line 75, in scan_device
    await r.scan()
  File "/config/custom_components/zha_map/neighbour.py", line 80, in scan
    for neighbor in self.device.neighbors:
AttributeError: 'EZSPCoordinator' object has no attribute 'neighbors'

The "old" version (pre zigpy 0.24.0 changes (#25)) looks working OK with EZSP.
I hope i have getting the updates right then its my testsetup for "Billy" and not old dev parts is left in the system.
(pip3 show zigpy Name: zigpy Version: 0.24.1
pip3 show bellows Name: bellows Version: 0.20.2)
Perhaps its one bellows issue and not ZHA-MAP.

Edit: Samantha-uks zigzag is working nice looks little like one christmas tree but nice ;-))

'Neighbor' object has no attribute 'struct'

Running 0.3.1 and HASS 0.116.0b3.

When manually running zha_map.scan_now I get the following error:

Logger: homeassistant.components.websocket_api.http.connection.140302933858576
Source: custom_components/zha_map/neighbour.py:46
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 16:40:27 (1 occurrences)
Last logged: 16:40:27
'Neighbor' object has no attribute 'struct'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 138, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1335, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1370, in _execute_service
    await handler.func(service_call)
  File "/config/custom_components/zha_map/__init__.py", line 66, in scan_now_handler
    await builder.preempt_build()
  File "/config/custom_components/zha_map/__init__.py", line 125, in preempt_build
    await self.build()
  File "/config/custom_components/zha_map/__init__.py", line 138, in build
    nei = await Neighbour.scan_device(device)
  File "/config/custom_components/zha_map/neighbour.py", line 78, in scan_device
    await r.scan()
  File "/config/custom_components/zha_map/neighbour.py", line 84, in scan
    new = self.new_from_record(neighbor.neighbor)
  File "/config/custom_components/zha_map/neighbour.py", line 46, in new_from_record
    r.device_type = record.struct.device_type.name
AttributeError: 'Neighbor' object has no attribute 'struct'```

Some devices show without connections

Hi!

I installed this the other day together with the network visualization card. Not sure if this is an issue with this repo or the card but my Aqara temp and window sensors show up on the map, but without connections to anything.

Is it supposed to be like that?

HACS

Would it be possible to make this HACS compliant? As far as i can tell, it just needs to move from dev to master. But i am not certain, as there is a closed issue in the HACS repo also.
hacs/integration#965

'Neighbor' object has no attribute 'device_type'

Home Assistant 0.115.2

ZHA with ConBee II

2020-11-13 12:18:17 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1839371576] 'Neighbor' object has no attribute 'device_type'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 137, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1350, in _execute_service
    await handler.func(service_call)
  File "/config/custom_components/zha_map/__init__.py", line 66, in scan_now_handler
    await builder.preempt_build()
  File "/config/custom_components/zha_map/__init__.py", line 125, in preempt_build
    await self.build()
  File "/config/custom_components/zha_map/__init__.py", line 138, in build
    nei = await Neighbour.scan_device(device)
  File "/config/custom_components/zha_map/neighbour.py", line 78, in scan_device
    await r.scan()
  File "/config/custom_components/zha_map/neighbour.py", line 84, in scan
    new = self.new_from_record(neighbor.neighbor)
  File "/config/custom_components/zha_map/neighbour.py", line 46, in new_from_record
    r.device_type = record.device_type.name
AttributeError: 'Neighbor' object has no attribute 'device_type'

LQI reported false in neighbor files

HA latest on real core (venv), coordinator is Tasmotized ZbBridge in ZHA mode. Neighbor files report false LQI versus ZHA data (and real world distance) e.g. device with LQI=255 reports 0 :-(
No big problem of course but very nice ZigZag reports false colors for LQI :-)
Done some zha_map service rescans but no luck...
If needed can show LQI differences in neighbor file vs ZHA data.
Best, JR

Scan looped for "TRADFRI control outlet"

Hi,
zha_map.scan service scan all devices in my network, but from unknown reason it continuously scan "TRADFRI control outlet" again and again.

command for raw WS return 0 devices

hass-cli raw ws zha_map/devices

image

and error is created in logs:

2020-02-16 19:08:15 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 101, in read_http_response
    status_code, reason, headers = await read_response(self.reader)
  File "/usr/local/lib/python3.7/site-packages/websockets/http.py", line 139, in read_response
    status_line = await read_line(stream)
  File "/usr/local/lib/python3.7/site-packages/websockets/http.py", line 213, in read_line
    line = await stream.readline()
  File "/usr/local/lib/python3.7/asyncio/streams.py", line 496, in readline
    line = await self.readuntil(sep)
  File "/usr/local/lib/python3.7/asyncio/streams.py", line 588, in readuntil
    await self._wait_for_data('readuntil')
  File "/usr/local/lib/python3.7/asyncio/streams.py", line 473, in _wait_for_data
    await self._waiter
concurrent.futures._base.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 630, in _wrap_awaitable
    return (yield from awaitable.__await__())
  File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 547, in __await_impl__
    extra_headers=protocol.extra_headers,
  File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 290, in handshake
    status_code, response_headers = await self.read_http_response()
  File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 103, in read_http_response
    raise InvalidMessage("did not receive a valid HTTP response") from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response 

When I unplugged that device, scan finished, and devices are visible in WS call

2020-02-16 20:00:46 WARNING (MainThread) [custom_components.zha_map] Couldn't scan 08:6b:d7:ff:fe:07:7e:0d neighbours
2020-02-16 20:00:46 DEBUG (MainThread) [custom_components.zha_map] Finished neighbour scan pass. Failed: [08:6b:d7:ff:fe:07:7e:0d]
2020-02-16 20:00:46 DEBUG (MainThread) [custom_components.zha_map] 00:15:8d:00:03:f1:3b:15 (LUMI lumi.weather) was not found in the neighbours tables 

part of the log, full is in attachement

2020-02-16 19:58:59 DEBUG (MainThread) [custom_components.zha_map] continuing neighbour scan. Neighbours discovered: [08:6b:d7:ff:fe:07:7e:0d]
2020-02-16 19:59:16 DEBUG (MainThread) [custom_components.zha_map.neighbour] [08:6b:d7:ff:fe:07:7e:0d]: 'Mgmt_Lqi_req' timedout
2020-02-16 19:59:16 DEBUG (MainThread) [custom_components.zha_map] Saving /config/neighbours/neighbours_086bd7fffe077e0d.txt
2020-02-16 19:59:16 DEBUG (MainThread) [custom_components.zha_map] continuing neighbour scan. Neighbours discovered: [08:6b:d7:ff:fe:07:7e:0d]
2020-02-16 19:59:33 DEBUG (MainThread) [custom_components.zha_map.neighbour] [08:6b:d7:ff:fe:07:7e:0d]: 'Mgmt_Lqi_req' timedout
2020-02-16 19:59:33 DEBUG (MainThread) [custom_components.zha_map] Saving /config/neighbours/neighbours_086bd7fffe077e0d.txt
2020-02-16 19:59:33 DEBUG (MainThread) [custom_components.zha_map] continuing neighbour scan. Neighbours discovered: [08:6b:d7:ff:fe:07:7e:0d]
2020-02-16 19:59:50 DEBUG (MainThread) [custom_components.zha_map.neighbour] [08:6b:d7:ff:fe:07:7e:0d]: 'Mgmt_Lqi_req' timedout
2020-02-16 19:59:50 DEBUG (MainThread) [custom_components.zha_map] Saving /config/neighbours/neighbours_086bd7fffe077e0d.txt
2020-02-16 19:59:50 DEBUG (MainThread) [custom_components.zha_map] continuing neighbour scan. Neighbours discovered: [08:6b:d7:ff:fe:07:7e:0d]
2020-02-16 20:00:07 DEBUG (MainThread) [custom_components.zha_map.neighbour] [08:6b:d7:ff:fe:07:7e:0d]: 'Mgmt_Lqi_req' timedout
2020-02-16 20:00:07 DEBUG (MainThread) [custom_components.zha_map] Saving /config/neighbours/neighbours_086bd7fffe077e0d.txt
2020-02-16 20:00:07 DEBUG (MainThread) [custom_components.zha_map] continuing neighbour scan. Neighbours discovered: [08:6b:d7:ff:fe:07:7e:0d]
2020-02-16 20:00:24 DEBUG (MainThread) [custom_components.zha_map.neighbour] [08:6b:d7:ff:fe:07:7e:0d]: 'Mgmt_Lqi_req' timedout 

My versions:

HA is 0.105.4
zha_map is latest 

Devices and logs:
neighbours.zip
home-assistant.log

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.