8/21/2023 0 Comments Webex teams active status timeTransferring ownership / Assignments help.International intergovernmental organizations.Enforcing your trademark rights/trademark litigation.Checking registration status & viewing documents.Checking application status & viewing documents.Madrid Protocol & international protection.The nice thing is that it's also just a Raspberry Pi sitting on my network, so I can use it for other projects too, instead of just being a single purpose status light like you'd buy off the shelf. This has been working away nicely for the last couple of months and I'm very happy with it. Now it's a simple case of using the sample code from the Pimoroni page above to display whatever colour we like on the Pi. Start thread and access the current status # Access the status variable from the thread. Wxt_status_thread = StatusThread(url, headers) I know I'm using except too broadly here, but I'm not too worried about catching specific errors for a project like this. ![]() This way we can initiate the thread, and go off and do what we like and the status will continue to update in the background by checking the threading object variable. Print ("Exception occurred = ", sys.exc_info()) #Let's sleep the thread for 30 seconds before we check again Response = (requests.get(self.url, headers=self.headers).json()) So, we can implement the API check in a thread instead, and just periodically check the returned value to see if we need to change the display. However, if we do this, the request locks up the script while it waits for the response from the API, which means that if you want to use dynamic displays on the pHAT, like the 'Rainbow' effect, it will freeze while it waits for the request to return. This should respond with your current status. Status = response Webex Teams status API check Response = (requests.get(url, headers = headers).json()) I get the value from Webex Teams using the python requests library like so import requests So I used python to write a script that queries the Webex people API periodically, and sets the colour of the status light to different values depending on what status it sees.Ĭurrently I'm using the following statuses The website is also really handy since it lets you play with the APIs directly from the site itself when you're signed in. Webex Teams provides a straightforward API for getting your current status, and returns simple responses like "meeting", or "active". Pimoroni provides excellent instructions for getting started with the pHAT and pretty soon I was up and running with the examples and making the pHAT light up with all sorts of colours and patterns. Raspberry Piįirstly I got Raspberry Pi OS set up headlessly by modifying a couple of files on the SD card to have it automatically bring up SSH, and connect to my wifi network. I'm blaming the terrible solder joints on my cheap soldering iron. I picked up the following parts from The Pi Hut Ĭonstruction was very straightforward, just requiring a bit of header soldering, and pretty soon I had the nifty little device below. ![]() I figured it would be a good time to give one a try. I've never had a use for a Raspberry Pi Zero, but was always really impressed with the level of functionality you get for a tiny price tag, especially the W version with built in WiFI. I also wanted a project to help fill some time while the world was on pause due to Covid-19. Since the door to my makeshift office opens up behind me, I wanted a way to signal to others in the house that I'm on a call to cut down on unexpected visitors during work calls. I spend much of my time on Webex Teams video calls during the day. That means I've been working out of my apartment for the last few months, and I've completely taken over our spare room with my desk. There's no real reason for us to go back, so there's not much incentive to risk returning to the office. ![]() I don't expect we'll be going back to the office for quite a while. Personally I've been very lucky that my job can be carried out entirely remotely and so I've been working from home full time since early March. The world has changed a lot in the last few months.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |