All Projects → azuwis → Zigbee2mqtt Networkmap

azuwis / Zigbee2mqtt Networkmap

Home Assistant Custom Card to show Zigbee2mqtt network map

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Zigbee2mqtt Networkmap

Home Assistant Configs
Config files used for my install of Home Assistant. This is no longer maintained as I started my install over, and have been using the UI for configuration.
Stars: ✭ 73 (-25.51%)
Mutual labels:  home-assistant
Homeassistant Config
Configuration for @brianjking & @KinnaT's Home Assistant Installation
Stars: ✭ 80 (-18.37%)
Mutual labels:  home-assistant
Home Card
A quick glance of the state of your home in Home Assistant Lovelace UI.
Stars: ✭ 94 (-4.08%)
Mutual labels:  home-assistant
Monitor docker
Monitor Docker containers from Home Assistant
Stars: ✭ 76 (-22.45%)
Mutual labels:  home-assistant
Ha Average
Average Sensor for Home Assistant
Stars: ✭ 79 (-19.39%)
Mutual labels:  home-assistant
Kiosk Mode
🙈 Hides the Home Assistant header and/or sidebar
Stars: ✭ 92 (-6.12%)
Mutual labels:  home-assistant
Restriction Card
🔒 Apply restrictions to Lovelace cards
Stars: ✭ 72 (-26.53%)
Mutual labels:  home-assistant
Addon Grocy
Grocy - Home Assistant Community Add-ons
Stars: ✭ 97 (-1.02%)
Mutual labels:  home-assistant
Flex Horseshoe Card
Flexible Horseshoe card for Home Assistant Lovelace UI. A card with a flexible layout, a horseshoe-like donut graph, multiple entities or attributes, graphics and animations!
Stars: ✭ 80 (-18.37%)
Mutual labels:  home-assistant
My Appdaemon
My apps, my helpfiles, all about AppDaemon for Home Assistant
Stars: ✭ 94 (-4.08%)
Mutual labels:  home-assistant
Hassio Addons
The repository for my Home Assistant Supervisor Add-ons.
Stars: ✭ 71 (-27.55%)
Mutual labels:  home-assistant
Hassctl
Simple command line utility to help debug Home Assistant configuration
Stars: ✭ 77 (-21.43%)
Mutual labels:  home-assistant
Home Assistant Config
🏠 Home Assistant configuration
Stars: ✭ 92 (-6.12%)
Mutual labels:  home-assistant
Hass Bha Icons
Additional icons for Home Assistant to accompany the MDI icons
Stars: ✭ 75 (-23.47%)
Mutual labels:  home-assistant
Frigate
NVR with realtime local object detection for IP cameras
Stars: ✭ 1,329 (+1256.12%)
Mutual labels:  home-assistant
Addon Wireguard
WireGuard - Home Assistant Community Add-ons
Stars: ✭ 72 (-26.53%)
Mutual labels:  home-assistant
Noctis
🐵 Dark Blue Theme for Home Assistant
Stars: ✭ 83 (-15.31%)
Mutual labels:  home-assistant
Hass Xiaomi Miot
Auto integrate xiaomi devices by miot-spec for HomeAssistant
Stars: ✭ 93 (-5.1%)
Mutual labels:  home-assistant
Addon Homebridge
 Homebridge - Community Hass.io Add-on for Home Assistant
Stars: ✭ 96 (-2.04%)
Mutual labels:  home-assistant
Power Wheel Card
An intuitive way to represent the power and energy that your home is consuming or producing. (A custom card for the Lovelace UI of Home Assistant.)
Stars: ✭ 93 (-5.1%)
Mutual labels:  home-assistant

zigbee2mqtt-networkmap

Lovelace Custom Card for Home Assistant to show the Zigbee2mqtt network map with vue-d3-network.

Demo

Screenshot

Home Assistant setup

Update Zigbee2mqtt to version 1.5.1 or later, earlier version may not work.

This instruction is for Home Assistant 0.107 and later.

For 0.106 and earlier instruction can be found here.

Backend setup

In configuration.yaml:

sensor:
  - platform: mqtt
    name: Zigbee2mqtt Networkmap
    # if you change base_topic of Zigbee2mqtt, change state_topic accordingly
    state_topic: zigbee2mqtt/bridge/networkmap/raw
    value_template: >-
      {{ now().strftime('%Y-%m-%d %H:%M:%S') }}
    # again, if you change base_topic of Zigbee2mqtt, change json_attributes_topic accordingly
    json_attributes_topic: zigbee2mqtt/bridge/networkmap/raw

Frontend setup (manual)

Download zigbee2mqtt-networkmap.js and put it into <config-directory>/www/ directory.

Enable Lovelace YAML mode.

In configuration.yaml:

lovelace:
  mode: yaml
  resources:
    - url: /local/zigbee2mqtt-networkmap.js?v=0.6.0
      type: module

In ui-lovelace.yaml:

views:
  - title: Zigbee Network
    panel: true # this renders the first card on full width, other cards in this view will not be rendered
    cards:
      - type: custom:zigbee2mqtt-networkmap
        entity: sensor.zigbee2mqtt_networkmap
        # the following are optional:
        mqtt_base_topic: zigbee2mqtt # if you change base_topic of Zigbee2mqtt, change it accordingly
        force: 3000 # decrease it to get smaller map if you have many devices
        node_size: 16
        font_size: 12
        link_width: 2
        height: 400 # height of the card
        # use this css config or use whatever css tech to change look and feel,
        # the same variable can also be used in Home Assistant themes, see https://www.home-assistant.io/components/frontend/#defining-themes
        css: |
          :host {
            --zigbee2mqtt-networkmap-node-color: rgba(18, 120, 98, .7);
            --zigbee2mqtt-networkmap-node-fill-color: #dcfaf3;
            --zigbee2mqtt-networkmap-node-pinned-color: rgba(190, 56, 93, .6);
            --zigbee2mqtt-networkmap-link-color: rgba(18, 120, 98, .5);
            --zigbee2mqtt-networkmap-hover-color: #be385d;
            --zigbee2mqtt-networkmap-link-selected-color: rgba(202, 164, 85, .6);
            --zigbee2mqtt-networkmap-label-color: #127862;
            --zigbee2mqtt-networkmap-arrow-color: rgba(18, 120, 98, 0.7);
            --zigbee2mqtt-networkmap-node-coordinator-color: rgba(224, 78, 93, .7);
            --zigbee2mqtt-networkmap-node-router-color: rgba(0, 165, 255, .7);
          }

Frontend setup (HACS)

When installing the plugin via HACS, the path that the JS asset must be loaded from will be slighlty different. Your ui-lovelace.yaml config will look like this:

resources:
  # Note: the `community_plugin` root and `type` is `module`. Also, no `?v=` query string as HACS
  #   will make sure that the most recent version is always loaded.
  - url: /hacsfiles/zigbee2mqtt-networkmap/zigbee2mqtt-networkmap.js
    type: module

The views: setup will be identical to the non HACS install.

Upgrade

Replace <config-directory>/www/zigbee2mqtt-networkmap.js with new one, and change version string in configuration.yaml:

resources:
  - url: /local/zigbee2mqtt-networkmap.js?v=0.6.0 # change `v=0.5.0` to `v=0.6.0`
    type: module

And then refresh the browser.

FAQ

Q: How can I customize device names in the map?

A: The names showed in the map are given by Zigbee2mqtt, you need to configure Zigbee2mqtt to customize them, see https://www.zigbee2mqtt.io/information/configuration.html for the friendly_name option.

Additionaly, HomeAssistant will automatically use the same names when MQTT auto discovery is enabled, see https://www.zigbee2mqtt.io/integration/home_assistant.html

Q: Some of my devices are detached.

A: This is probably a Zigbee2mqtt issue, see https://github.com/Koenkk/zigbee2mqtt/issues/2436 for discussion.

Changelog

[0.6.0] - 2019-12-02

  • Fixed TypeError if device type is not available, thank @ChrisScheffler
  • Support HACS

[0.5.0] - 2019-08-27

  • Recalculate width/height on window resize
  • Make the arrows sharper
  • Use css variables to allow theming
  • Allow config extra css styles

[0.4.0] - 2019-08-23

  • Workaround empty map problem in Firefox.

[0.3.0] - 2019-08-22

  • Filter all dead links.

[0.2.0] - 2019-08-22

  • Filter links with address 0x0000000000000000.

[0.1.0] - 2019-08-15

  • Initial release.

Development

Install nodejs and yarn, clone the repo and install dependances:

git clone https://github.com/azuwis/zigbee2mqtt-networkmap.git
cd zigbee2mqtt-networkmap
yarn install

Compiles and hot-reloads for development

yarn serve

And open the demo at http://localhost:8080/ using web browser.

Or use Home Assistant for development, in configuration.yaml:

resources:
  # - url: /local/zigbee2mqtt-networkmap.js
  #   type: module
  - url: http://localhost:8080/zigbee2mqtt-networkmap.js
    type: js

Compiles and minifies for production

yarn build

Lints and fixes files

yarn lint
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].