First to get some things clear. Im using UI5 for 3 days now and my scenes with the luup.is_night arent working anymore. My location and timezone are set to my current. Im using the is_night in a if statement and it just doesn’t work anymore ???
In the code screen i show 2 actions i tried to test. First the command with out the if statement so that the second command is execute no matter what the result is. The second part of code after the ##### line is with the if statement. After the code i also copied the results of the log and you can see that nothing is executed with the if statement.
I dont think im doing something wrong as the lua was working before in UI4
Im using a Vera 2 and i did notice that the vera background (of the webinterface) didn’t show a night picture which it did with UI4. However i dont know if it does show a night picture ?
It's a shame, we put so much effort into trying to obtain those features. I'm not sure why they removed it.
It was a nice indicator of Sunset and when return luup.is_night() was in effect, which BTW works for me in UI5.
It’s a shame, we put so much effort into trying to obtain those features. I’m not sure why they removed it.
It was a nice indicator of Sunset and when return luup.is_night() was in effect, which BTW works for me in UI5.[/quote]
Yeah, I liked it too. I suppose we could put it on our wishbug list (i.e. Vera UI too bright at night ).
([tt]luup.is_night()[/tt] appears to work for me as well.)
I cant get it why its working with everyone and not by me. Just to be sure I also did a full power-down of my Vera. (normally it runs on a backupped powersupply)
Not sure how the function works, but presumably it relies on Vera knowing your location so it can work out sunset/sunrise. Maybe a silly question, but have you entered your location?
[quote=“mcvflorin, post:11, topic:170413”]@The-Source
You should submit a trouble ticket and let me know the ticket number. This is a very strange error.[/quote]
I just created a ticket #92940.
And i enable tech support access
@racarter
In my first post i mentioned the part of location and time zone
@The-Source
At 10 AM and 2 PM it’s day, so it’s normal that code will fail.
I logged in on your Vera and it seems that the function is working OK. However, a Luup restart is required after the timezone is changed, even if the time is updated.
50 02/13/12 11:22:27.887 luup_log:0: It is day. <0x4c14>
50 02/13/12 2:23:02.612 luup_log:0: It is day. <0x4c14>
.
. Luup restart.
.
50 02/13/12 2:23:46.523 luup_log:0: It is night. <0x4c14>
50 02/13/12 2:23:57.664 luup_log:0: It is night. <0x4c14>
50 02/13/12 11:24:32.215 luup_log:0: It is night. <0x4c14>
50 02/13/12 11:24:36.861 luup_log:0: It is night. <0x4c14>
50 02/13/12 11:24:48.817 luup_log:0: It is night. <0x4c14>
50 02/13/12 11:24:58.178 luup_log:0: It is night. <0x4c14>
.
. Luup restart.
.
50 02/13/12 11:25:53.949 luup_log:0: It is day. <0x4c14>
Well its working now, strange thing that a full power cycle didn’t fix it ??? Maybe a ntp update combined with NO luup engine restart was the bugging thing
Well, it is strange but I am seeing the same problem. When I try to just test the code below I receive a “Code Failed” message
if (luup.is_night()) then
return true
else
return false
end
So I broke it down even further and just tried testing “return false” and still get the “Code Failed”. If I change ti to “return true” then I get “message sent successful”.
I might be wrong in how to restart Lua… is it just the reload button on top?