Plugin: DelayLight

Try doing a hard refresh on your browser.

1 Like

You beat me to it.

1 Like

I have done that with no result.

OK. Youā€™ve probably got a deleted device in the config for that timer and I havenā€™t properly caught it in the code. Sit tight, let me do some code review here and see if I can spot the faulting point without any more data from your end. It should be easy to fix once I find it.

Did some looking & found all 8 Timers are this way & that I donā€™t see that I can set a new timer either

Sit tight. I have a hunch. Iā€™ll have code for you in a few minutes.

OK. Hereā€™s what you need to do:

  1. Download the stable branch release of the JS fileā€“right-click (not left) on the link, choose ā€œSave Link Asā€¦ā€ or your browserā€™s equivalent from the menu that pops up, and save the file to a known location. Do not change the name or file extension.
    https://raw.githubusercontent.com/toggledbits/DelayLight/stable/J_DelayLightTimer_UI7.js
  2. Go the uploader Apps > Develop apps > Luup files, click the upload button, and pick the file you just downloaded.
  3. After the upload and Luup reload finishes, do a full cache refresh on your browser as in the prior post in this topic.
  4. Try it.

This will either work, or it will give us a more specific error message. If it works, it means you have a scene in your system for which the assigned room is missing/no longer exists. If you get an error, I need the entire contents of the dialog containing the message.

I noticed today that i have the same issue

its not on any of the actual devices (child devices)
its on the main (service)

I have uploaded the file
I no longer get the error preventing the settings screen
however, i get the same error in a popup which can be dismissed

once in the settings i see what you would expect on the child devices
not the main device settings that allows you to create others

also the service itself (main device)
no longer shows the time it started at
it has an enable/disable button just like child device

i am attaching 2 screenshots (device and new-error)
service
service-error

Grab this file and send it up to your Vera: https://raw.githubusercontent.com/toggledbits/DelayLight/master/D_DelayLight_UI7.json

Then hard refresh and see what it looks like for the service/plugin device (should be back to normal). Then try going into a timer. If you get the error alert in the timer, can you open the JS console (F12 on some) and there should be a traceback in the consoleā€“I need that.

thank you sir
that did it for the service

however
i never had the error in child devices only on the service
now the service is working and shows no errors but the child devices now have the popup

worth noting is that the master shows 0 children in advanced settings

here is the console details that are relevant to delay light

2019-7-27 9:3:55 calling external function: DelayLightTimer.doSettings
J_DelayLightTimer_UI7.js:840 Error in DelayLightTimer.configurePlugin(): TypeError: Cannot read property ā€˜nameā€™ of undefined
J_DelayLightTimer_UI7.js:841 TypeError: Cannot read property ā€˜nameā€™ of undefined
at eval (J_DelayLightTimer_UI7.js:589)
at Array.forEach ()
at doSettings (J_DelayLightTimer_UI7.js:585)
at Object.launchSettings [as doSettings] (J_DelayLightTimer_UI7.js:849)
at eval (eval at Interface.callExternalFunction (interface.js?1.7.4454:8), :1:17)
at Interface.callExternalFunction (interface.js?1.7.4454:8)
at interface.js?1.7.4454:8
at Array. (core.js?1.7.4454:9)
at i (external-libs.js?1.7.4454:2)
at Object.fireWith [as resolveWith] (external-libs.js?1.7.4454:2)

OK, so definitely a scene referring to a room that doesnā€™t exist. Let me cobble up another attempt to fix it, with some additional debug so I can guide you as to which scene that is and why that may be. Stand byā€¦

i have no scenes using these
all my scenes are run by reactor
none of which interact with delay light

i only have a few vera native scenes
mostly turn a virtual switch on or off

Vera creates hidden scenes, and much can go on behind the scenes (no pun intended)

Try this version: https://raw.githubusercontent.com/toggledbits/DelayLight/stable/J_DelayLightTimer_UI7.js

Whether you get an error on this one or not, please keep the JS console open. It should spit out some very obvious messages about what itā€™s finding.

still errors out.
here is what i get when loading 1 delaylight device and clicking settings

2019-7-27 9:35:46 calling external function: DelayLightTimer.doSettings
J_DelayLightTimer_UI7.js:840 Error in DelayLightTimer.configurePlugin(): TypeError: Cannot read property ā€˜nameā€™ of undefined
J_DelayLightTimer_UI7.js:841 TypeError: Cannot read property ā€˜nameā€™ of undefined
at eval (J_DelayLightTimer_UI7.js:589)
at Array.forEach ()
at doSettings (J_DelayLightTimer_UI7.js:585)
at Object.launchSettings [as doSettings] (J_DelayLightTimer_UI7.js:849)
at eval (eval at Interface.callExternalFunction (interface.js?1.7.4454:8), :1:17)
at Interface.callExternalFunction (interface.js?1.7.4454:8)
at Interface.cpanelCallJavascriptFunction (interface.js?1.7.4454:25)
at Interface.handleClickOnCpanelTabItem (interface.js?1.7.4454:24)
at Interface.handleDeviceCpanelTopNavigationFunctionality (interface.js?1.7.4454:24)
at HTMLDivElement. (interface.js?1.7.4454:24)

Yes, but are there any messages BEFORE that?

WAITā€¦ the line number of the error message will have changed if you uploaded the correct latest. If doesnā€™t look like you got the file in place.

my appologies
i probably did not wait long enough after the upload
i just did another force refresh on the browser
now it loads ok

as requested below is the output
i had forgotten about the geosensor scenes as they disapear once used in your mobile

also, the 2 rooms listed numerically 19 and 27 do exist but they contain no devices just the scenes. also they have names zzz- geofence and zzz - Welcome Home, they are visible in the scene editor/window

2019-7-27 9:46:23 calling external function: DelayLightTimer.doSettings
J_DelayLightTimer_UI7.js:462 *** SCENE #1 Welcome Home Porch Light ASSIGNED TO NON-EXISTENT ROOM 19
J_DelayLightTimer_UI7.js:462 *** SCENE #57 Welcome Home Late Lights ASSIGNED TO NON-EXISTENT ROOM 19
J_DelayLightTimer_UI7.js:462 *** SCENE #58 Welcome Home Early Lights ASSIGNED TO NON-EXISTENT ROOM 19
J_DelayLightTimer_UI7.js:462 *** SCENE #138 Home on Unlock when Away/Night ASSIGNED TO NON-EXISTENT ROOM 19
J_DelayLightTimer_UI7.js:462 *** SCENE #146 - Patrick Enter Geofence ASSIGNED TO NON-EXISTENT ROOM 27
J_DelayLightTimer_UI7.js:462 *** SCENE #147 - Patrick Exit Geofence ASSIGNED TO NON-EXISTENT ROOM 27
J_DelayLightTimer_UI7.js:462 *** SCENE #148 - Michelle Enter Geofence ASSIGNED TO NON-EXISTENT ROOM 27
J_DelayLightTimer_UI7.js:462 *** SCENE #149 - Michelle Exit Geofence ASSIGNED TO NON-EXISTENT ROOM 27
J_DelayLightTimer_UI7.js:462 *** SCENE #159 - Alex Enter Geofence ASSIGNED TO NON-EXISTENT ROOM 27
J_DelayLightTimer_UI7.js:462 *** SCENE #162 - Alex Exit Geofence ASSIGNED TO NON-EXISTENT ROOM 27
J_DelayLightTimer_UI7.js:462 *** SCENE #164 - Sam Enter Geofence ASSIGNED TO NON-EXISTENT ROOM 27
J_DelayLightTimer_UI7.js:462 *** SCENE #165 - Sam Exit Geofence ASSIGNED TO NON-EXISTENT ROOM 27

Key. Totally key. THANK YOU. Proper fix forthcomingā€¦

no, thank you
you make great plugins/apps
and you are very responsive to everyone
without your apps and support many people would no longer have their vera

1 Like

It is truly a pleasure for me to be able to do fun stuff like this and have the community benefit.

Now, one more pass at it, just to make sure. This is the ā€œfinalā€ fix. Grab the latest stable branch version (same link as before). It should say ā€œ19239ā€ in the pluginVersion at the top of the file, and line 868 (just above the bottom) should read uuid: uuid.

Not only should you not get an error, but it should blend the device-less rooms correctly on the menu.