isNightTime and isDayTime inverted?!

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Freemann
Posts: 94
Joined: Thursday 24 November 2016 14:55
Target OS: Linux
Domoticz version: >=Béta
Location: Netherlands
Contact:

isNightTime and isDayTime inverted?!

Post by Freemann »

Struggling for a few hours with this very simple function;

Code: Select all

function IsDark()
            local dark
            if (domoticz.time.isNightTime ) then 
                dark = "True"
            else 
                dark = "False"
            end
            return dark
end
It constantly returns an inverted value.
Here(Netherlands) is night and the current script constantly returns; dark = False
Then I tested the same script but then with isDayTime and then it returns; dark = True

Added 2 notifies;

Code: Select all

        function IsDark()
            local dark
            domoticz.notify("isNightTime: "..tostring(domoticz.time.isNightTime))
            domoticz.notify("isDayTime: "..tostring(domoticz.time.isDayTime))
            if (domoticz.time.isNightTime ) then 
                dark = "True"
            else 
                dark = "False"
            end
            return dark
        end
with the following result;
Screenshot - 23_12_2017 , 20_25_48.png
Screenshot - 23_12_2017 , 20_25_48.png (4.63 KiB) Viewed 1053 times
I'm I doing something wrong? Or .... ?
Domotica/graphs "freak" :)
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam

https://www.frijduurzaam.nl
User avatar
jvdz
Posts: 2445
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: isNightTime and isDayTime inverted?!

Post by jvdz »

Are you running the latest Beta which has a confirmed DayTime/NightTime bug?

Jos
Freemann
Posts: 94
Joined: Thursday 24 November 2016 14:55
Target OS: Linux
Domoticz version: >=Béta
Location: Netherlands
Contact:

Re: isNightTime and isDayTime inverted?!

Post by Freemann »

I'm running 3.8794 so the second best Beta there is.

ok... seeying it;
https://github.com/domoticz/domoticz/co ... 8f8abb3de7

My update policy is to update on an version diff of atleast 20 points, so I didn't look for this small update....

My bad...

Update is running :roll:
Domotica/graphs "freak" :)
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam

https://www.frijduurzaam.nl
Freemann
Posts: 94
Joined: Thursday 24 November 2016 14:55
Target OS: Linux
Domoticz version: >=Béta
Location: Netherlands
Contact:

Re: isNightTime and isDayTime inverted?!

Post by Freemann »

OK, everything is working as expected. Thanks for you notice on the bug/update!
Domotica/graphs "freak" :)
NUC8i3BEH(8gb/250gb),
Lubuntu 19.04,
Aeotec Z-Stick S2(Gen5)
HarmonyElite
HUE(5 bulbs, 2 blooms)
NetAtmo(complete setup)
MiLight iboxV6(2 MiLightBulbs)
IP-Cam

https://www.frijduurzaam.nl
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest