Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Teams Presence Error #864

Open
RickHellwege opened this issue Feb 8, 2024 · 7 comments
Open

Sync Teams Presence Error #864

RickHellwege opened this issue Feb 8, 2024 · 7 comments

Comments

@RickHellwege
Copy link

Describe the bug
"Sync Teams Presence" does not seem to be working. The Hue API seems stable since I can manually set the color using PresenceLight picker, but Sync Team Presence (manual and automated) does nothing.

Error Log:
{"Timestamp":"2024-02-08T17:00:00.8440565-05:00","Level":"Information","MessageTemplate":"PresenceLight Running in Teams Mode - MainWindow.xaml:InteractWithLights Line: 575","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":575,"FilePath":"D:\a\presencelight\presencelight\src\DesktopClient\PresenceLight\MainWindow.xaml.cs","MemberName":"InteractWithLights","Application":"PresenceLight"}}

Further details

  • OS: Windows11 22H2 22621.3007
  • PresenceLight App Type (Desktop, Blazor): Desktop
  • PresenceLight Build (Nightly, Store, etc): Store
  • PresenceLight Version (The # in About): 5.8.2
  • Did you clear settings.json? : Yes
  • ASP.NET Core version : 8.0.1
@isaacrlevin
Copy link
Owner

@RickHellwege Can you provide your settings file?

@RickHellwege
Copy link
Author

settings.json

@LanceMcCarthy
Copy link

Hi @isaacrlevin, I hope you and the family are doing well!

I was just testing with Rick, and I can also replicate the issue. It seems to be specifically a problem with the "sync teams presence" function. Here's why I think it's a good place to start

  • ✅ If I change the color manually, it works
  • ✅ If I change my Team status, the app automatically detects the status change,
  • But:
    • ❌ Automatic detection of the status change does not change the light bulb color
    • ❌ Using the "sync teams presence" button does not change the light bulb color

Does the automatic presence functionality also call the "Sync Teams Presence" function? If yes, then I would start there. Rick saw a runtime error in the same area.

Note: I am using LIFX and Wiz, problem seems unrelated to hardware selection. Here's my settings file (with creds obfuscated) https://gist.github.com/LanceMcCarthy/123396bc78a75efe6ed9e4fffba06b43

@LanceMcCarthy
Copy link

another point that is probably helpful, notice the origin of the error. Although mine says LifxService.SetColor() error, Rick's shows HueService.SetColor() error, it seems like a light-service agnostic problem.

The cool thing is I can manually trigger the error using the SetColor() button

public async Task SetColor(string color, string activity = "")

image

@isaacrlevin
Copy link
Owner

Thanks @LanceMcCarthy I wonder if the issue is with a light that it cannot find. Can you send me one of your log files? FWIW I need to clean up the error handling/logging badly

@LanceMcCarthy
Copy link

LanceMcCarthy commented Feb 21, 2024

You know something, there is a light in the network that needs to be reconnected... but it is not the light I use for this.

Could it just have a problem with any problematic light in the same fabric (sorry for using new trendy term for defining the same group of devices on the same layer 😆)

Edit- I'll be able to work on this in the morning, and generate logs for you. I did just make an effort to fix the broken light and re-added it to the original fabric. So we'll see

@LanceMcCarthy
Copy link

@isaacrlevin I started fresh, logged out of all the services and only reconnected to LIFX

I doubt this is light-service specific, because Rick is using Hue and I'm using LIFX.

Log output:

{"Timestamp":"2024-02-21T09:21:52.2348829-05:00","Level":"Information","MessageTemplate":"Load Settings Initialized - MainWindow.xaml:LoadSettings Line: 127","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":127,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"LoadSettings","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:21:52.5834803-05:00","Level":"Information","MessageTemplate":"Load Settings Successfull - MainWindow.xaml:LoadSettings Line: 137","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":137,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"LoadSettings","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:21:52.6038958-05:00","Level":"Information","MessageTemplate":"Light Mode Set: Graph - MainWindow.xaml:CallGraph Line: 180","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":180,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"CallGraph","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:21:52.9309841-05:00","Level":"Information","MessageTemplate":"Light Mode: Graph","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.Index","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:21:53.1642002-05:00","Level":"Information","MessageTemplate":"Getting Graph Data: Profile, Image, Presence - GraphWrapper:GetBatchContent Line: 96","Properties":{"SourceContext":"PresenceLight.Core.GraphWrapper","LineNumber":96,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\PresenceLight.Core\\GraphServices\\GraphWrapper.cs","MemberName":"GetBatchContent","Application":"PresenceLight"}}

{"Timestamp":"2024-02-21T09:21:57.0386359-05:00","Level":"Information","MessageTemplate":"Wiz Light Retrieval Initialized","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.Wiz","Application":"PresenceLight"}}

{"Timestamp":"2024-02-21T09:21:57.2499316-05:00","Level":"Error","MessageTemplate":"Error occurred Finding Wiz Lights","Exception":"System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at PresenceLight.Razor.Components.Pages.Wiz.GetLights()","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.Wiz","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:21:57.2658300-05:00","Level":"Error","MessageTemplate":"Error Occurred loading Wiz","Exception":"System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at PresenceLight.Razor.Components.Pages.Wiz.GetLights()\r\n   at PresenceLight.Razor.Components.Pages.Wiz.OnInitializedAsync()","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.Wiz","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:22:09.0110710-05:00","Level":"Error","MessageTemplate":"Error Occurred Setting Color - LifxService:SetColor Line: 175","Exception":"System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at PresenceLight.Core.LIFXService.SetColor(String availability, String activity, String lightId, String apiKey)","Properties":{"SourceContext":"PresenceLight.Core.LIFXService","LineNumber":175,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\PresenceLight.Core\\Lights\\LifxServices\\LifxService.cs","MemberName":"SetColor","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:22:09.0119976-05:00","Level":"Error","MessageTemplate":"Error occurred Setting Color - MainWindow.xaml:SetColor Line: 269","Exception":"System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at PresenceLight.Core.LIFXService.SetColor(String availability, String activity, String lightId, String apiKey)\r\n   at PresenceLight.Core.LifxServices.SetColorHandler.Handle(SetColorCommand command, CancellationToken cancellationToken)\r\n   at PresenceLight.MainWindow.SetColor(String color, String activity) in D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs:line 241","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":269,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"SetColor","Application":"PresenceLight"}}

{"Timestamp":"2024-02-21T09:22:09.0405623-05:00","Level":"Information","MessageTemplate":"PresenceLight Exiting - MainWindow.xaml:OnExitClick Line: 460","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":460,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"OnExitClick","Application":"PresenceLight"}}

{"Timestamp":"2024-02-21T09:22:13.6727400-05:00","Level":"Information","MessageTemplate":"Load Settings Initialized - MainWindow.xaml:LoadSettings Line: 127","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":127,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"LoadSettings","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:22:14.0926225-05:00","Level":"Information","MessageTemplate":"Load Settings Successfull - MainWindow.xaml:LoadSettings Line: 137","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":137,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"LoadSettings","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:22:14.1063580-05:00","Level":"Information","MessageTemplate":"Light Mode Set: Graph - MainWindow.xaml:CallGraph Line: 180","Properties":{"SourceContext":"PresenceLight.MainWindow","LineNumber":180,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\DesktopClient\\PresenceLight\\MainWindow.xaml.cs","MemberName":"CallGraph","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:22:14.2343676-05:00","Level":"Information","MessageTemplate":"Getting Graph Data: Profile, Image, Presence - GraphWrapper:GetBatchContent Line: 96","Properties":{"SourceContext":"PresenceLight.Core.GraphWrapper","LineNumber":96,"FilePath":"D:\\a\\presencelight\\presencelight\\src\\PresenceLight.Core\\GraphServices\\GraphWrapper.cs","MemberName":"GetBatchContent","Application":"PresenceLight"}}
{"Timestamp":"2024-02-21T09:22:14.3871014-05:00","Level":"Information","MessageTemplate":"Light Mode: Graph","Properties":{"SourceContext":"PresenceLight.Razor.Components.Pages.Index","Application":"PresenceLight"}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants