Zigbee2mqtt network map

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Zigbee2mqtt network map

Post by ak97 »

Simple network map for zigbee2mqtt plugin using custom template page

https://github.com/kovainfo/Domoticz-zi ... etwork-map

screenshot.png
screenshot.png (309.14 KiB) Viewed 2631 times
Last edited by ak97 on Sunday 05 April 2020 13:06, edited 1 time in total.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Zigbee2mqtt network map

Post by EddyG »

Nice. I have to get a workaround because 2020.1 does not work for me (yet) because of Zwave problems.
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

EddyG wrote: Sunday 05 April 2020 13:04 Nice. I have to get a workaround because 2020.1 does not work for me (yet) because of Zwave problems.
This solution should work on previous versions of Domoticz, but I did not check)
Bigted
Posts: 68
Joined: Friday 12 December 2014 14:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Zigbee2mqtt network map

Post by Bigted »

Domoticz 4.10717

I can see raw.json gets populated

However the custom panel under Zigbee is blank
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

Bigted wrote: Sunday 05 April 2020 13:47 Domoticz 4.10717

I can see raw.json gets populated

However the custom panel under Zigbee is blank
Absolute paths are specified in the template and script. are they right?
eleutscher
Posts: 22
Joined: Thursday 15 November 2018 11:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Zigbee2mqtt network map

Post by eleutscher »

I did also the install and facing same problem as Bigted.
Zigbee, KAKU, Hue, Google, Honeywell, MotionEye, Telegram, Tasmota, Shelly, IFTTT, etc
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

What OS and platform for Domoticz you use?
eleutscher
Posts: 22
Joined: Thursday 15 November 2018 11:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Zigbee2mqtt network map

Post by eleutscher »

ak97 wrote: Sunday 05 April 2020 14:07 What OS and platform for Domoticz you use?
Domoticz v4.10935
Operating System: Raspbian GNU/Linux 9 (stretch)
Kernel: Linux 4.19.42-v7+
Zigbee, KAKU, Hue, Google, Honeywell, MotionEye, Telegram, Tasmota, Shelly, IFTTT, etc
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

Do you have a file:
/home/pi/domoticz/www/js/jquery-3.4.1.min.js

may be this file is missing in Domoticz less than v2020?
eleutscher
Posts: 22
Joined: Thursday 15 November 2018 11:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Zigbee2mqtt network map

Post by eleutscher »

ak97 wrote: Sunday 05 April 2020 14:15 Do you have a file:
/home/pi/domoticz/www/js/jquery-3.4.1.min.js

may be this file is missing in Domoticz less than v2020?
I have this one

jquery-3.3.1.min.js

so the 3.4.1 is indeed missing
Zigbee, KAKU, Hue, Google, Honeywell, MotionEye, Telegram, Tasmota, Shelly, IFTTT, etc
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

ok! that's it!

try modify file in /templates/zigbeemap/zigbeemap.html

and change
<script type="text/javascript" src="/js/jquery-3.4.1.min.js"></script>
to:
<script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script>
eleutscher
Posts: 22
Joined: Thursday 15 November 2018 11:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Zigbee2mqtt network map

Post by eleutscher »

ak97 wrote: Sunday 05 April 2020 14:20 ok! that's it!

try modify file in /templates/zigbeemap/zigbeemap.html

and change
<script type="text/javascript" src="/js/jquery-3.4.1.min.js"></script>
to:
<script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script>
Yep, I have images now! Great.
But.... I only see the orginal sensors. Your sensors. How do I get my sensors? :-)
Zigbee, KAKU, Hue, Google, Honeywell, MotionEye, Telegram, Tasmota, Shelly, IFTTT, etc
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

1. Mosquitto clients are installed?
2. dzVents support is enabled in Domoticz?
3. you must create dzVents script from readme:

Code: Select all

return {
	on = {
		customEvents = {
			'CreateZigbeeMap' -- event triggered by emitEvent
		}
	},
	data = {},
	logger = {},
	execute = function(domoticz, triggeredItem)
	    
	    function SendCommand()
            cmd = "/home/pi/domoticz/www/templates/zigbeemap/zigbeemap.sh"
            domoticz.utils.osExecute(cmd)
        end  
	    
		if (triggeredItem.isCustomEvent) then
			domoticz.utils._.print(triggeredItem.data)
			SendCommand()
		end
	end
}
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

may be need add eXecute attribute for /home/pi/domoticz/www/templates/zigbeemap/zigbeemap.sh:

Code: Select all

chmod +x /home/pi/domoticz/www/templates/zigbeemap/zigbeemap.sh
Bigted
Posts: 68
Joined: Friday 12 December 2014 14:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Re: Zigbee2mqtt network map

Post by Bigted »

ak97 wrote: Sunday 05 April 2020 14:20 ok! that's it!

try modify file in /templates/zigbeemap/zigbeemap.html

and change
<script type="text/javascript" src="/js/jquery-3.4.1.min.js"></script>
to:
<script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script>
That solved the issue for me

Image
eleutscher
Posts: 22
Joined: Thursday 15 November 2018 11:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Zigbee2mqtt network map

Post by eleutscher »

ak97 wrote: Sunday 05 April 2020 14:32 1. Mosquitto clients are installed?
2. dzVents support is enabled in Domoticz?
3. you must create dzVents script from readme:

}[/code]
1. Yes
2. Yes
3. Maybe stupid question :-)
Where should the file be located?
a. /home/pi/domoticz/scripts/dzVents/scripts or
b. /home/pi/domoticz/scripts/dzVents/generated_scripts

and what is the extension?
a. lua
b. dzvents

Thanks for your time/help
Zigbee, KAKU, Hue, Google, Honeywell, MotionEye, Telegram, Tasmota, Shelly, IFTTT, etc
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

eleutscher wrote: Sunday 05 April 2020 14:51
ak97 wrote: Sunday 05 April 2020 14:32 1. Mosquitto clients are installed?
2. dzVents support is enabled in Domoticz?
3. you must create dzVents script from readme:

}[/code]
1. Yes
2. Yes
3. Maybe stupid question :-)
Where should the file be located?
a. /home/pi/domoticz/scripts/dzVents/scripts or
b. /home/pi/domoticz/scripts/dzVents/generated_scripts

and what is the extension?
a. lua
b. dzvents

Thanks for your time/help
1. Open Domoticz web-interface
2. Setup -> More Options -> Events
3. Create dzVents envent
4. Copy&Paste content of script :)
eleutscher
Posts: 22
Joined: Thursday 15 November 2018 11:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Zigbee2mqtt network map

Post by eleutscher »

ak97 wrote: Sunday 05 April 2020 15:04
1. Open Domoticz web-interface
2. Setup -> More Options -> Events
3. Create dzVents envent
4. Copy&Paste content of script :)
[/quote]

That is what I did. But still no luck. Could it be because ! am still on dzVents version: 2.4.24?
Zigbee, KAKU, Hue, Google, Honeywell, MotionEye, Telegram, Tasmota, Shelly, IFTTT, etc
ak97
Posts: 39
Joined: Saturday 03 February 2018 18:42
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Contact:

Re: Zigbee2mqtt network map

Post by ak97 »

eleutscher wrote: Sunday 05 April 2020 18:50 That is what I did. But still no luck. Could it be because ! am still on dzVents version: 2.4.24?
Here is what I found:
https://www.domoticz.com/wiki/Domoticz_ ... ents_3.0.0

Yes, dzVents must be a 3.0 and above
Maybe there is another way to call the script to create a network map, but I did not think about it. generating an event when opening a page is the easiest solution for me ...
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Zigbee2mqtt network map

Post by EddyG »

ak97 wrote: Sunday 05 April 2020 13:10
EddyG wrote: Sunday 05 April 2020 13:04 Nice. I have to get a workaround because 2020.1 does not work for me (yet) because of Zwave problems.
This solution should work on previous versions of Domoticz, but I did not check)
I am on version 4.10717 and in that version CustomEvents where not implemented yet.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests