fkappen Posted July 18, 2022 #1 Share Posted July 18, 2022 Hallo Zusammen, wir setzen seit zwei Wochen auf Swyx - leider sind von Haus aus keine Busylights kompatibel - dafür gibt es wohl ein kostenpflichtiges Addin... Ich bin in Powershell einigermaßen Fitt und kann hierrüber auch die Farbe der Busylights setzen - leider ist es mir noch nicht möglich den Status des Swyx Clients per Powershell auszulesen. Gibt es da eine Möglichkeit? Vielen Dank vorab! Link to comment Share on other sites More sharing options...
Most Valued User jodost Posted July 18, 2022 Most Valued User #2 Share Posted July 18, 2022 Was hast du genau vor - eine am PC angeschlossene Leuchte je nach Status ansteuern? Du könntest im Client ein Skin konfigurieren mit einer WebExtension, die rut je nach Leitungsstatus eine "URL" auf, wobei man an der Stelle auch Kommandozeilen-Aufrufe auslösen kann. Damit kannst du einfach beim Klingeln, Wählen, Abheben und Auflegen ein Script aufrufen was die Lampe steuert. Link to comment Share on other sites More sharing options...
fkappen Posted July 18, 2022 Author #3 Share Posted July 18, 2022 Ja genau - die Leuchte soll je nach Status angesteuert werden. Lassen sich über die Skins auch Powershell scripten steuern und wie genau wird das dann ausgeführt? Link to comment Share on other sites More sharing options...
Most Valued User Solution jodost Posted July 18, 2022 Most Valued User Solution #4 Share Posted July 18, 2022 Ich muss halb zurückrudern und halb dir eine andere Lösung anbieten Ich habe gerade noch mal nachgelesen, was ich bei einem Kunden in Erinnerung hatte. Da ruft das SwyxIT keine Kommandozeilen-Aufrufe auf, sondern einen speziellen keasy://-URL-Handler, den die Software registriert hat. Das müsste aber auch mit Powershell möglich sein - https://stackoverflow.com/questions/40596463/custom-protocol-handler-via-powershell-script Dann registrierst du dir das protocol busylight für dein Powershell Script und rufst dann in der WebExtension auf: busyligz://on oder busylight://off Alternativ bin ich beim googlen nach keasy auf folgendes gestoßen, was ohne Skins auskommt - vielleicht kannst du damit was basteln (aus dem VBScript heraus Systemaufrufe - und damit auch PS - sollten ja kein Problem sein): Link to comment Share on other sites More sharing options...
fkappen Posted July 19, 2022 Author #5 Share Posted July 19, 2022 Die zweite Lösung ist "mega"! Vielen Dank! Ich habe mir das in PowerShell nachgebaut. Modul in PowerShell laden: $Swyx = New-Object -ComObject "CLMgr.ClientLineMgr" Line Status auslesen: $Swyx.DispGetLine(0).DispState.ToString() Dann über eine Schleife das Busylight entsprechend setzen. Was noch schön wäre der Abgleich des DND Status wenn ein Teams Call aktiv ist. Hierbei verbleibt der LineStatus auf 0 (inaktiv) aber der RichPresenceStatus wechselt auf DND... gibt es da eine Methode? Link to comment Share on other sites More sharing options...
Most Valued User jodost Posted July 19, 2022 Most Valued User #6 Share Posted July 19, 2022 das kann dir @Tom Welligeam ehesten beantworten 🙂 Kannst Du Dein Script vielleicht hier veröffentlichen? Ich hab noch jede Menge Philips Hue Leuchtmittel rumfliegen und so einen hier: https://homematic-ip.com/de/produkt/schaltaktor-fuer-markenschalter-mit-signalleuchte auch noch Da könnte ich mir ja ins bzw. für's Arbeitszimmer auch ein Busylight bauen 🙂 Link to comment Share on other sites More sharing options...
fkappen Posted July 19, 2022 Author #7 Share Posted July 19, 2022 <# "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noexit -executionpolicy bypass -WindowStyle hidden -File C:\Scripte\SwyxBusylight.ps1 #> #Pfade $busylightpath = "C:\Program Files (x86)\Busylight for Jabra" if (!(Test-Path $busylightpath)) { Write-Warning "Busylight for Jabra nicht gefunden!" Pause } Add-Type -Path "$busylightpath\BusylightSDK.dll" $Color = New-Object -TypeName Busylight.BusylightColor $SDK = New-Object -TypeName Busylight.SDK #ComObjects $Busylight = New-Object -TypeName Busylight.sdk try { $Swyx = New-Object -ComObject "CLMgr.ClientLineMgr" } catch { Write-Warning "Swyx Client nich gefunden!" Pause } #Schleife do { #Line Status $linestate = $Swyx.DispGetLine(0).DispState.ToString() if ($linestate -in @(0)) { # Green (Ready) $Color.RedRGBValue = 0 $Color.GreenRGBValue = 255 $Color.BlueRGBValue = 0 $Busylight.Light($Color) } if ($linestate -in @(1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)) { # Red (Phone Call / DND) $Color = New-Object -TypeName Busylight.BusylightColor $Color.RedRGBValue = 255 $Color.GreenRGBValue = 0 $Color.BlueRGBValue = 0 $Busylight.Light($Color) } if ($linestate -eq "0" -and ($Swyx.DispClientConfig.DoNotDisturb.ToString()) -eq "1") { <# Blue (Teams) $Color = New-Object -TypeName Busylight.BusylightColor $Color.RedRGBValue = 0 $Color.GreenRGBValue = 0 $Color.BlueRGBValue = 255 $Busylight.Light($Color) #> # Red (Phone Call / DND) $Color = New-Object -TypeName Busylight.BusylightColor $Color.RedRGBValue = 255 $Color.GreenRGBValue = 0 $Color.BlueRGBValue = 0 $Busylight.Light($Color) } if ($linestate -eq "0" -and ($Swyx.DispClientConfig.Away.ToString()) -eq "1") { # Yellow (Away) $Color = New-Object -TypeName Busylight.BusylightColor $Color.RedRGBValue = 255 $Color.GreenRGBValue = 255 $Color.BlueRGBValue = 0 $Busylight.Light($Color) } if ($linestate -in @(3)) { # Blinking Yellow (Ringing) $Color.RedRGBValue = 255 $Color.GreenRGBValue = 255 $Color.BlueRGBValue = 0 $SDK.Blink($color, 10, 10) } Start-Sleep 1 #Write-Host (Get-Date -Format hh:mm:ss) } until ($false) 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