Page 2 of 2

Re: How to make schedule conditional?

Posted: 17 Feb 2019 22:54
by micky1500
dependencies.html doesn't work for me.
I get 'Reading device data...' and nothing else. in Chrome and Edge.
The other tools work perfectly :)
Will be using your tool to clean my config.json file.
I suspect after an unexpected power outage, I have corruption. Route Map has stopped working again.
Your tool is showing more devices that don't exist than are actually real..

Re: How to make schedule conditional?

Posted: 18 Feb 2019 11:42
by piet66
PoltoS wrote:
17 Feb 2019 20:13
And one more:
configjson.js:342 Uncaught TypeError: Cannot read property 'forEach' of undefined
at configjson.js:342
at Array.forEach (<anonymous>)
at buildDevArrays (configjson.js:338)
at Object.success (configjson.js:267)
at u (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at k (jquery.min.js:2)
at XMLHttpRequest.<anonymous> (jquery.min.js:2)
I tested this function again with my own config and also with the default config.json. Both are working.
There must be a difference in your config in profiles paragraph.
Command: profile.hide_single_device_events.forEach(function(device) {
Must be an (empty) array.

Re: How to make schedule conditional?

Posted: 18 Feb 2019 11:51
by piet66
PoltoS wrote:
17 Feb 2019 20:07
Wow! Nice tool for inspection of the API content.

But I get few errors:
js/dependencies.min.js:1 Uncaught TypeError: Cannot read property 'indexOf' of undefined
at js/dependencies.min.js:1
at Array.forEach (<anonymous>)
at Object.success (js/dependencies.min.js:1)
at u (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at k (jquery.min.js:2)
at XMLHttpRequest.<anonymous> (jquery.min.js:2)

:1 Uncaught TypeError: Cannot read property 'getAttribute' of undefined
at http://192.168.0.32:8083/smarthome/user/MxInfo/:1:249
at Array.sort (native)
at srt (http://192.168.0.32:8083/smarthome/user/MxInfo/:1:147)
at window.onload (http://192.168.0.32:8083/smarthome/user/MxInfo/:1:704)
To get more info about the problem you can change in file dependencies.html the string 'js/dependencies.min.js' into 'js/dependencies.js' and reload the function.

Re: How to make schedule conditional?

Posted: 18 Feb 2019 12:07
by piet66
micky1500 wrote:
17 Feb 2019 22:54
Will be using your tool to clean my config.json file.
I suspect after an unexpected power outage, I have corruption. Route Map has stopped working again.
Your tool is showing more devices that don't exist than are actually real..
How do you want to do that? My tools don't change anything in the system. I think it's not really necessary. I don't think that removing old devices will help. There's no info about routing in config.json. Don't know where it is stored. You can display some info about device neighbours with zwave_configuration.html. Look at devices/<number>/data/neighbours.

Re: How to make schedule conditional?

Posted: 21 Feb 2019 14:27
by piet66
micky1500 wrote:
17 Feb 2019 22:54
dependencies.html doesn't work for me.
I get 'Reading device data...' and nothing else. in Chrome and Edge.
If you want me to look after this problem, I need your device and instance data.
In this case get the data by
http://<your ip>:8083/ZAutomation/api/v1/devices
and
http://<your ip>:8083/ZAutomation/api/v1/instances,
store each in a file and send it.

Which language do you use?