PLEG Lights on during evening

Oooooops… PLEG wasnt armed… i did not see it (and did not know)… its working now

I have my PLEG working since a few days,

Today I decided I want to place a report to show what I have made.
But when I click the report button, there isn’t a popup showing the report.
Could there be a mistake in the PLEG?
on PLTS the report button works, but there’s nothing to display.
Reloading the page, browser or Vera did’nt help.

The only other change I have made is that since friday I have a ‘smart’ meter thats connected to my vera-lite! ;D

What browser are you using? The report function works OK on Google Chrome but has some issues with other browsers.

I was working on Firefox, Chrome and I.E.
But I did’nt use it to often.

Untill today.
:frowning:

I just have updated PLEG to version 2.6
[url=http://forum.micasaverde.com/index.php/topic,14155.msg107082.html#msg107082]http://forum.micasaverde.com/index.php/topic,14155.msg107082.html#msg107082[/url]

It didn’t do the trick, it was worth a try

???

You can help me by doing the following. Different browsers do this differently … so I will explain only for Chrome.

Open the Vera Control Page.
Place the Mouse in the Page and type Control Shift I
This will open up a new window.
It should be showing the Console tab. If not select it.
Now Go back to the Vera Page.
Click the Report button.
Send me any Info from the Console page.

I did it with Chrome:
This is the result from the console:

“2013-04-01 14:51:08: deviceButtonClicked ended with error (js_button clicked): TypeError: undefined is not a function”.

Can you close the browser.
Open the browser to the Vera Control Page.
Do the Control Shift I to open the Console.
Then do the report again.
I need to see the entire Java Console transaction to see why the code is not being found.

Also If you open the Source Tab And tell me what was loaded from the folder labeled:

port_3489

I would expect to see:
J_ProgramLogicC.js
J_ProgramLogicEG.js

This is the output when I loaded the Vera page:

GET http://192.168.2.152/cmh/lang/LANG.js?*1.5.622-1-07054035* 404 (Not Found) 192.168.2.152:34
GET http://192.168.2.152/cmh/js/common/debug.js?*1.5.622-1-07054035* 404 (Not Found) 192.168.2.152:34
2013-04-01 15:41:56: start parsing user_data cpanel_data.js:13652
2013-04-01 15:41:56: Parsing ud cpanel_data.js:13652
2013-04-01 15:41:56: Including script: http://192.168.2.152/port_3480/toolbox.js cpanel_data.js:13652
2013-04-01 15:41:57: end parsing user_data cpanel_data.js:13652
Resource interpreted as Script but transferred with MIME type text/plain: “http://192.168.2.152/port_3480/toolbox.js”. cpanel_data.js:77
2013-04-01 15:41:57: Timezones loaded cpanel_data.js:13652
GET http://192.168.2.152/cmh/skins/default/icons/DayTime.png 404 (Not Found) jquery-1.6.js:2050
GET http://192.168.2.152/cmh/skins/default/icons/iconVSwitch.png 404 (Not Found) jquery-1.6.js:2050
GET http://192.168.2.152/cmh/skins/default/icons/DayTime.png 404 (Not Found) jquery-1.6.js:2050
GET http://192.168.2.152/cmh/skins/default/icons/iconVSwitch.png 404 (Not Found) jquery-1.6.js:2050
2013-04-01 15:41:57: start parsing lu_status cpanel_data.js:13652
2013-04-01 15:41:57: Starting parseLu without data_version. cpanel_data.js:13652
2013-04-01 15:41:57: setting icon error: TypeError: Cannot read property ‘Service’ of undefined cpanel_data.js:13652
2013-04-01 15:41:57: setting icon error: TypeError: Cannot read property ‘Service’ of undefined cpanel_data.js:13652
2013-04-01 15:41:57: 17:41:57:890 end parsing lu_status cpanel_data.js:13652
GET http://192.168.2.152/cmh/skins/default/icons/DayTime_100.png 404 (Not Found) jquery-1.6.js:2050
GET http://192.168.2.152/cmh/skins/default/icons/DayTime.png 404 (Not Found) jquery-1.6.js:2050
2013-04-01 15:41:57: Sysinfo loaded cpanel_data.js:13652
2013-04-01 15:41:58: Version status: require_upgrade=0 cpanel_data.js:13652
2013-04-01 15:41:59: Not assigned cameras: cpanel_data.js:13652
2013-04-01 15:42:01: start parsing lu_status cpanel_data.js:13652
2013-04-01 15:42:01: Starting parseLu. cpanel_data.js:13652
2013-04-01 15:42:01: 17:42:1:439 end parsing lu_status cpanel_data.js:13652
2013-04-01 15:42:02: start parsing lu_status cpanel_data.js:13652
2013-04-01 15:42:02: Starting parseLu. cpanel_data.js:13652
2013-04-01 15:42:02: 17:42:2:671 end parsing lu_status cpanel_data.js:13652
2013-04-01 15:42:03: start parsing lu_status cpanel_data.js:13652
2013-04-01 15:42:03: Starting parseLu. cpanel_data.js:13652
2013-04-01 15:42:03: 17:42:3:892 end parsing lu_status cpanel_data.js:13652
2013-04-01 15:42:11: start parsing lu_status cpanel_data.js:13652
2013-04-01 15:42:11: Starting parseLu. cpanel_data.js:13652
2013-04-01 15:42:11: 17:42:11:427 end parsing lu_status cpanel_data.js:13652

Yep,
on the sources tab there is a folder called port_3489 containing: J_ProgramLogicC.js and J_ProgramLogicEG.js

ps. I’m running the Vera version: 1.5.622 .

Looks like the upgrade blew away the icons for the Virtual Switch and Day or Night Plugins.
You can re-install them to get their icons back.

I do not see any other errors … I guess I will have to do an update to see if I can duplicate.
Looks like MCV may have changed something relative to JavaScript buttons … that’s the error … and Report is implemented as a JavaScript buttons.

Hello Richard,

After a a few weeks playing around with my new Vera, I have reset it to the factory settings.
Just to get all the errors out of the system.

I reinstalled all de devices and apps.

After that I reconfigured PLEG, and now the report button works again ;D

Forgot to post my PLEG report as attachment ::slight_smile:

Your logic looks good … are you still having a problem ? can you describe the problem ?
What would help me if you do the following:

Turn On Debug for the PLEG.
In the Advanced Tab set the Debug variable to 1. Then the big red Save.

Start recording vera log:
http://YourVeraIPAddress/cgi-bin/cmh/log.sh?Device=LuaUPnP
Exercise your Logic demonstrating the failure.
Save the log.

Send me the Log … telling me what happened and what you expected. Also send the report if you change anything.

If you want to review your log locally … edit the log and delete the line near the top that says:

pageScroll();                            

That will stop the auto scrolling to the bottom … allowing you time to review the log.

[hr]
The 2.6 patch will eliminate the unused action.
[hr]
Set the Debug variable back to 0 when you are done debugging.

Hello Richard,

I don’t have any problem right now.
(When you learn to understand how PLEG works :P)

The only thing that kept me busy was the Aeon Labs 4in1 sensor.
It did’nt update the temperature and the lightlevel.

I have fixed that by adding a PLEG condition who Poll’s the sensor every 15min.

Thanks for the help anyway!!

Oh, one last thing:
can I start a scene from the ‘action’ Tab???

(should I close this topic ???)

The last post before I close this topic. The motionsensor I have isn’t always responding the right way (lightlevel).
So I decidid to use the day or night plugin for that part.
And because a still had some problems with the PLEG I made, I re-wrote it.

Now it al works as I want it, I put it here as a example for others:
(some words are in Dutch)

Triggers:

Day Day or Night indicates Day time.
Night Day or Night indicates Night time.
Doorclosed_Wk Deur_WK armed is not tripped
Dooropened_Wk Deur_WK armed is tripped
Movement_Wk Pr_Wk armed is tripped
Nomovement_Wk Pr_Wk armed is not tripped
Keepon_On_Wk Licht_aan_WK is turned on
Keepon_Off_Wk Licht_aan_WK is turned off
LEDareon_Wk LED_Tv is turned on
LEDareoff_Wk LED_Tv is turned off

Conditions:

Lighton_Wk (Night) and ((LEDareoff_Wk) and (Dooropened_Wk or Movement_Wk))
Lightoff_Wk ((Day) and (LEDareon_Wk) and (Keepon_Off_Wk)) or ((Doorclosed_Wk and Nomovement_Wk) and (Keepon_Off_Wk and LEDareon_Wk))

Actions:

Actions for Condition: Lighton_Wk
Start LED WK SetTarget newTargetValue=1 (This Virtual switsch starts a scene that puts on all the lights)

Actions for Condition: Lightoff_Wk
Start LED WK SetTarget newTargetValue=0 (The following turn’s the Virtual switch and all the lights off)
LED_Bank SetLoadLevelTarget newLoadlevelTarget=0
LED_Kast_VensterbankSetTarget newTargetValue=0
LED_Krabpaal SetLoadLevelTarget newLoadlevelTarget=0
LED_Tuner SetLoadLevelTarget newLoadlevelTarget=0
LED_Tv SetTarget newTargetValue=0

Greetings

Andre