Closed binderth closed 6 months ago
Alright so my logging is still lacking in some places, mostly around the HA connection. The Teams token will be auto populated by the application after you toggle mute the first time around, after which it will use the token so you do not have to request authentication from Teams every time. From the logs I can see that the Teams API is connecting fine so that end should be OK. On the HA side, could you either delete the sensor and see if it gets created again or change the name of the sensor in the conf.ini to something different and see if that gets created? That would confirm that it is on the HA side of the application that it fails, in which case re-entering the token and url might be a good idea. Otherwise I am finishing off a modification and will then add additional logging for HA, so if you you would rather wait that works too!
Alright so my logging is still lacking in some places, mostly around the HA connection.
ah! ok, I don't have HA running atm, so I used the endpoints already there from the "old" version with my Node-Red (POST: /api/states/sensor.*
). But as I'm thinking now, I guess, you've changed that? Would it be possible, if the "virtual HA new Teams"-endpoints are available?
...that's why I suggested either a "free" endpoint or mqtt messages. If it's easy, a POST with the Teams-JSON should suffice, the rest can be done after that - but teams-status-rs would be HA agnostic...?
Oh it is now a binary_sensor by default, so that could be it. Though I am using a crate/package to do the API call and not constructing it myself, so I am not really sure it something else could have changed. Otherwise I am wrapping MQTT support shortly which is probably easier to integrate into Node-Red? It should be done this week-end.
If it's easier just send the TeamsJSON via POST to a webhook. Node-Red (and many others) can cope with a post of an URL. That way, potential new JSON attributes from the Teams-API would be updated automatically.
So I finished the integration with mqtt, but... My anti-virus flags the application as a virus and so do about 12 on virustotal š£š£š£ no idea what to do with this problem.
Thanks for adding the mqtt integration. And yes, I also can see that. My company policy won't allow me to start it because of that. š¢
I was able to resolve the issue by self-signing it, though I am unsure if that will cause an issue with some group policies. If it does, I can also release the debug build as that was also does not get picked up from what I can see, very odd. https://github.com/AntoineGS/teams-status-rs/releases/tag/v0.2.1
fyi; That's still flagged by my AntiVirus...
What anti virus are you running?
After some trial and error, when I compile with the new version of Rust (1.74.0) it is much worst. I built two versions, one regular release (here) and one that is unoptimized (here), the latter is not ideal but gets flagged even less (the VirusTotal reports are on the releases). Let me know if either or both of them work for you, also anti-virus you are running can help as I will submit the application to get it reviewed with the companies that have this process.
We're running Microsoft Defender. I'll give it a try later.
I've installed it this night. Enabled the local API, but with 'new teams'.
Uncertain if it is the same issue, but the log shows the same:
2023-11-22T21:43:36.756368900+01:00 INFO teams_status - --------------------
2023-11-22T21:43:36.756476800+01:00 INFO teams_status - Application starting
2023-11-22T21:43:37.813511900+01:00 INFO teams_status::teams::api - {"meetingUpdate":{"meetingPermissions":{"canToggleMute":true,"canToggleVideo":true,"canToggleHand":false,"canToggleBlur":true,"canLeave":true,"canReact":true,"canToggleShareTray":true,"canToggleChat":true,"canStopSharing":false,"canPair":true}}}
2023-11-22T21:43:37.813598300+01:00 ERROR teams_status::teams::api - Unable to locate isVideoOn variable in JSON
2023-11-22T21:43:37.813621500+01:00 ERROR teams_status::teams::api - Unable to locate isVideoOn variable in JSON
The sensors get created in HA, so I guess URL and Token are fine.
With a test call the status doesn't change.
Running the 0.2.2 version, I do run Defender, but the app is located in the tray and doesn't seem to get flagged.
This would be a different issue, have you done this step here?
If you have, please open a new issue and I will help further!
I had to use a local ip connection for HomeAssistant instead of my Cloudflared URL. Once I set that in the config it was able to connect to HomeAssistant and the I could toggle the mic mute. Excellent work.
Yeah the new Teams does not seem to allow external connections unfortunately. Thanks for the feedback!
What I did:
output.log