chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 (edited) 18 minutes ago, BillOatman said: Hi. I'm not sure what you mean by "doesn't work after 12am although the settings say it's up until 4AM". Can you please give an example of a situation that is not working? Show your current settings too please. And please reproduce the situation on your system and attach the Emby log here. But @chef I suspect this is the problem: private static bool ScheduleAllowScene(PhillipsHueSceneEmbyProfile profile) { if (string.IsNullOrEmpty(profile.Schedule)) return true; return (DateTime.Now.TimeOfDay >= TimeSpan.Parse(profile.Schedule + ":00")) && (DateTime.Now <= DateTime.Now.Date.AddDays(1).AddHours(4)); } "DateTime.Now.TimeOfDay >= TimeSpan.Parse(profile.Schedule + ":00"))" Assuming profile.Schedule is 4:00 as soon as it crosses midnight this won't be true. Yes, you are right @BillOatman, I think the code should be this: private static bool ScheduleAllowScene(SavedDevice device, PluginConfiguration config) { if (string.IsNullOrEmpty(device.SceneSchedule)) return true; return (DateTime.Now.TimeOfDay >= TimeSpan.Parse(device.SceneSchedule + ":00") && DateTime.Now.TimeOfDay <= TimeSpan.Parse("4:00:00")); } What do you think? If we parse the TimeOfDay it won;t matter which day it is it will always run until 4:00am Edited September 9, 2020 by chef Link to comment Share on other sites More sharing options...
BillOatman 501 Posted September 9, 2020 Author Share Posted September 9, 2020 (edited) 7 minutes ago, chef said: Yes, you are right @BillOatman, I think the code should be this: private static bool ScheduleAllowScene(SavedDevice device, PluginConfiguration config) { if (string.IsNullOrEmpty(device.SceneSchedule)) return true; return (DateTime.Now.TimeOfDay >= TimeSpan.Parse(device.SceneSchedule + ":00") && DateTime.Now.TimeOfDay <= TimeSpan.Parse("4:00:00")); } What do you think? That would return true between "SceneSchedule" and 4am which I think is the reverse of the intent of the setting?? Edited September 9, 2020 by BillOatman 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 Just now, BillOatman said: That would return true between "SceneSchedule" and 4am which I think is the reverse of the intent of the setting?? yeah that is what the setting should do. So that it doesn't run during the day, only after the scheduled time. That way your living room lights aren't being effected by emby all day, but after the scheduled time (ex. 7:00pm and the kids are finally to bed), when you watch a movie the lights would run the scene. Does that sound right? Link to comment Share on other sites More sharing options...
BillOatman 501 Posted September 9, 2020 Author Share Posted September 9, 2020 (edited) 5 minutes ago, chef said: yeah that is what the setting should do. So that it doesn't run during the day, only after the scheduled time. That way your living room lights aren't being effected by emby all day, but after the scheduled time (ex. 7:00pm and the kids are finally to bed), when you watch a movie the lights would run the scene. Does that sound right? Yes that sounds right! But 4am? My wife gets home from work at 2am or later and its dark until 6am generally Edited September 9, 2020 by BillOatman 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 5 minutes ago, BillOatman said: Yes that sounds right! Okay, I pushed an update in the catalog and also updated Git. We'll wait and see if it works alright now. (Glad to talk with ya Bill! Hope you're doin' well during the 2020 clusterf****). Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 (edited) 20 minutes ago, BillOatman said: Yes that sounds right! But 4am? My wife gets home from work at 2am or later and its dark until 6am generally So should we make the time to stop running scenes configurable by the user as well? @BillOatman or 6. ... Yeah 6 I'll push another change... One sec. Edited September 9, 2020 by chef Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 Oh no! when I updated the catalog I made a mistake on the version number. I wrote 1.0.19 instead of 1.0.1.9. We're gonna hear about this one... Sorry Bill. Just tell people to install 1.0.2.1 from the catalog to fix the problem, if... when it comes up... Darn! Link to comment Share on other sites More sharing options...
BillOatman 501 Posted September 9, 2020 Author Share Posted September 9, 2020 (edited) 23 minutes ago, chef said: Oh no! when I updated the catalog I made a mistake on the version number. I wrote 1.0.19 instead of 1.0.1.9. We're gonna hear about this one... Sorry Bill. Just tell people to install 1.0.2.1 from the catalog to fix the problem, if... when it comes up... Darn! Poop Happens Edited September 9, 2020 by BillOatman 1 Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 9, 2020 Share Posted September 9, 2020 4 hours ago, BillOatman said: Hi. I'm not sure what you mean by "doesn't work after 12am although the settings say it's up until 4AM". Can you please give an example of a situation that is not working? Show your current settings too please. And please reproduce the situation on your system and attach the Emby log here. But @chef I suspect this is the problem: private static bool ScheduleAllowScene(PhillipsHueSceneEmbyProfile profile) { if (string.IsNullOrEmpty(profile.Schedule)) return true; return (DateTime.Now.TimeOfDay >= TimeSpan.Parse(profile.Schedule + ":00")) && (DateTime.Now <= DateTime.Now.Date.AddDays(1).AddHours(4)); } "DateTime.Now.TimeOfDay >= TimeSpan.Parse(profile.Schedule + ":00"))" Assuming profile.Schedule is 4:00 as soon as it crosses midnight this won't be true. I have the plugin set so it starts turning on scenes after 6:30PM. In the settings it says the settings will be active until 4AM, but if I start watching a series or movie after 12am the scenes don't activate. I'll haev to wait with reproducing this until it's after midnight, but i can. Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 9, 2020 Share Posted September 9, 2020 ok, seems it's not necessary to reproduce anymore, seems you guys found the problem Thanks for looking into this!!! Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 9, 2020 Share Posted September 9, 2020 I've downloaded the new version. I will report back after 12am Thanks again! 1 Link to comment Share on other sites More sharing options...
WilhelmStroker 96 Posted September 9, 2020 Share Posted September 9, 2020 6 hours ago, chef said: Oh no! when I updated the catalog I made a mistake on the version number. I wrote 1.0.19 instead of 1.0.1.9. We're gonna hear about this one... Sorry Bill. Just tell people to install 1.0.2.1 from the catalog to fix the problem, if... when it comes up... Darn! yeah Emby keeps thinking that the dll has been updated and keeps prompting to reinstall. What's the best way to resolve it? Wait until 1.0.2.1 hits the catalogue? Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 13 minutes ago, WilhelmStroker said: yeah Emby keeps thinking that the dll has been updated and keeps prompting to reinstall. What's the best way to resolve it? Wait until 1.0.2.1 hits the catalogue? Go to the catalogue and install 1.0.2.1. Sorry for the inconvenience. I messed up. Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 9, 2020 Share Posted September 9, 2020 Had to reboot my computer for a Windows 10 update and now Emby keeps asking me to reboot the server to finish the install of the Hue plugin 1.0.19 After the reboot the message appears again I have installed 1.0.2.1 on top of it and it indicates this in the plug in settings But the message on the dashboard keeps popping up to reboot the server to finalize the install of v1.0.19 Should i just ignore the message? I've rebooted the Emby server 4 or 5 times but the result is the same Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 8 minutes ago, Bambu Utila said: Had to reboot my computer for a Windows 10 update and now Emby keeps asking me to reboot the server to finish the install of the Hue plugin 1.0.19 After the reboot the message appears again I have installed 1.0.2.1 on top of it and it indicates this in the plug in settings But the message on the dashboard keeps popping up to reboot the server to finalize the install of v1.0.19 Should i just ignore the message? I've rebooted the Emby server 4 or 5 times but the result is the same Go to the catalogue and install 1.0.2.1. Sorry for the inconvenience. I messed up Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 9, 2020 Share Posted September 9, 2020 9 minutes ago, chef said: Go to the catalogue and install 1.0.2.1. Sorry for the inconvenience. I messed up I did that, but after the reboot of Emby for that update it keeps telling me that i need to reboot to finalize installing v1.0.19 No worries! Just want to make sure i do the right thing Link to comment Share on other sites More sharing options...
BillOatman 501 Posted September 9, 2020 Author Share Posted September 9, 2020 I think you'll need ot make it 1.1.0.0. This is the hierarchy it shows now @chef 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 (edited) Sorry everyone, I can't change version numbers after it's been uploaded. I've contacted support to help me. It was a mistake. I see the issue I'll fix it! Edited September 9, 2020 by chef Link to comment Share on other sites More sharing options...
chef 3746 Posted September 9, 2020 Share Posted September 9, 2020 Version 1.1.0.0 is there. 1 Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 9, 2020 Share Posted September 9, 2020 That did the trick! No more requests for reboot after the first time Thanks for sorting this out so quickly. Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 11, 2020 Share Posted September 11, 2020 With the latest version installed (1.1.0.0) my Hue lights don't come on at all anymore now, not even before 12am I've made sure the connection to the bridge is ok. It sees the scenes and they are all filled out But nothing seems to happen now Link to comment Share on other sites More sharing options...
WilhelmStroker 96 Posted September 11, 2020 Share Posted September 11, 2020 It's still working for me but I actually removed the dll and started all over again. Link to comment Share on other sites More sharing options...
chef 3746 Posted September 11, 2020 Share Posted September 11, 2020 10 hours ago, Bambu Utila said: With the latest version installed (1.1.0.0) my Hue lights don't come on at all anymore now, not even before 12am I've made sure the connection to the bridge is ok. It sees the scenes and they are all filled out But nothing seems to happen now What time have you put in the device schedule? Link to comment Share on other sites More sharing options...
Bambu Utila 7 Posted September 11, 2020 Share Posted September 11, 2020 5 hours ago, chef said: What time have you put in the device schedule? I have it to turn on at 6:30PM Link to comment Share on other sites More sharing options...
chef 3746 Posted September 11, 2020 Share Posted September 11, 2020 Just now, Bambu Utila said: I have it to turn on at 6:30PM Okay, I'll take a look at the code, but scenes should only run after 6:30pm. That isn't happening? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now