Page 1 of 2

Zigbee2mqtt network map

Posted: Sunday 05 April 2020 12:07
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 2639 times

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 13:04
by EddyG
Nice. I have to get a workaround because 2020.1 does not work for me (yet) because of Zwave problems.

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 13:10
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)

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 13:47
by Bigted
Domoticz 4.10717

I can see raw.json gets populated

However the custom panel under Zigbee is blank

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 13:54
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?

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:01
by eleutscher
I did also the install and facing same problem as Bigted.

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:07
by ak97
What OS and platform for Domoticz you use?

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:11
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+

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:15
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?

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:18
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

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:20
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>

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:25
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? :-)

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:32
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
}

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:36
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

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:44
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

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 14:51
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

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 15:04
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 :)

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 18:50
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?

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 18:56
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 ...

Re: Zigbee2mqtt network map

Posted: Sunday 05 April 2020 19:13
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.