Closed ydogandjiev closed 3 years ago
That looks good, but it seems you haven't turned on the presence switch, by default this will be off
. Clicking on it, should change its state and you'll get the device auth request in the console.
ps: you'll notice 5 other switched, they are there for homekit if you want to configure automation that way. You can ignore these. You need to use the
Presence Indicator
one.
Thanks @estruyf! That did the trick. Now if I can only convince the Microsoft tenant admins to allow your app (or the one I registered myself in the tenant) then I can finally get this baby working!
@ydogandjiev be aware that it requires admin consent hopefully that changes in the future.
Hi
I have just installed the Plugin. I am not getting the prompt either with the indications you are making.
{ "name": "Presence Indicator", "appId": "14d99f8a-70da-4d2b-ae0c-b021e91bfd21", "interval": 1, "startTime": "9:00", "endTime": "20:00", "weekend": true, "statusColors": { "available": { "red": 0, "green": 144, "blue": 0 }, "away": { "red": 255, "green": 191, "blue": 0 }, "busy": { "red": 179, "green": 0, "blue": 0 }, "donotdisturb": { "red": 149, "green": 0, "blue": 0 } }, "lightType": "switch", "debug": false, "accessory": "presence-switch" }
I clicked on the switch, which then pulls all the FHEM status but I only get
[Presence Indicator] Failed to retrieve an accessToken: undefined
@Spanishu the input looks fine. Please open another issue if the issue persists.
Things to test:
@estruyf figured it ;) Now I need admin access (work at MSFT) and I am not sure where to get it.
Great to hear! What was the problem?
For the consent, this is something to check with someone that can manage your Azure AD. Might be that MS disabled to approve your own MS Graph consents.
@estruyf I will check. There is an app https://github.com/isaacrlevin/PresenceLight Which does something similar however does not integrate with Homebridge. This app does work for me (technically) however does not allow me to do the simple think I look for. Turn on a light when I am "red".
@Spanishu thank you for sharing.
v1.0
API endpoint and not the beta
one anymore. Shouldn't make a difference.@estruyf AppID: I did use a different one but changed it back to the one you have provided. That is when I got at least the option to enter the code. The App that I mention requires me to login in if I am not mistaken (need to install it again). I think from then it pulls the permissions and keeps them ( I had it running and I logged in only once!)
Just checked and I have the following parameter ClientID ClientSecret Instance RedirectUri CallbackPath ApiScopes
Starting the app it took me to the login screen on the browser. Not sure it helps to further investigate. If
After installing the plugin, configuring it as instructed, and restarting my Homebridge server all I see in the logs is:
I don't get any sign in prompts as expected. Restarting the server several times yielded the same results.
Here is the full config:
Any idea what I might be missing? How do I go about debugging this issue?