More on Troubleshooting Intelligent Proximity

Some time ago I wrote a post on this subject which BTW still applies today. Especially the use of the SpectrumView app on iOS. This is the most useful tools to troubleshoot Proximity issues as it give a clear indication of signal strength along with any interference that is in your environment.

Recently I was involved in some troubleshooting that on the surface seemed pretty straight forward but after some time looking a little deeper showed a reoccurring issue that went beyond the initial scope. While I am not going to go to far into the details there are some important things I learned around both how Proximity works but also interacts with other devices using Windows 10.

Turning Proximity Off:

The Proximity soft switch on the touch 10 does not disable the Proximity signal it only prevents clients connecting, see screenshot below of the Touch 10 interface switch. This is especially important if you end up with two Proximity capable devices in the same room. You will need to either turn Proximity off inside web interface or via SSH to stop the signal.

The easiest way is using the web interface to turn off the Proximity Signal. Go to Setup>Proximity and select the mode drop down and select Off and save. See below. Signal is now off.

 User Reported Issues:

Don't assume only one user is having the issue because no one else has said anything. Most of the time users will just grab the HDMI cable and get what they need done and move on. Users will mention it more to each other than you and some issues are harder than others to discover and seem limited but are much more far reaching. The only way to work this is out is test in multiple rooms with the same PC/MAC device experiencing issues. Do not immediately jump to it "must be a codec issue".

Windows 10 Audio Driver Issues:

This is pretty tricky to diagnose. The symptoms can vary quite a bit from dropping a Proximity session midway to not connecting to a codec via Proximity after coming out of hibernation. This is due to the way that Windows 10 shares access to Audio drivers and devices. Although I saw this predominately on Surface Pro and Surface Book devices other Windows 10 devices had some of the same issues. This means that it is more than likely a Windows 10 issue regardless of the hardware.

To change the exclusive-mode settings of a playback or recording device:
  • Right-click the speaker icon in the notification area, which is located on the right side of the taskbar, and select Playback Devices or Recording Devices. (As an alternative, run the Windows multimedia control panel, Mmsys.cpl, from a Command Prompt window. For more information, see Remarks in DEVICE_STATE_XXX Constants.)
  • After the Sound window appears, select Playback or Recording. Next, select an entry in the list of device names, and click Properties.
  • After the Properties window appears, click Advanced.
  • To enable applications to use the device in exclusive mode, check the box labeled Allow applications to take exclusive control of this device. To disable exclusive-mode use of the device, clear the check box. In our case we want to disable exclusive mode.
  • If exclusive-mode use of the device is enabled, you can specify whether a request for exclusive control of the device will succeed if the device is currently playing or recording shared-mode streams. To give exclusive-mode applications priority over shared-mode applications, check the box labeled Give exclusive mode applications priority. To deny exclusive-mode applications priority over shared-mode applications, clear the check box. In our case we want to deny exclusive mode applications.

Introducing Stormy the Cisco Spark Weather Bot!

If you want your daily forecast delivered to your Cisco Spark Space this might be the bot your looking for.

I have been working on Stormy for the last month and its been a fun little project but I now believe its time to release Stormy into the wild. While Stormy is not terribly sophisticated he does deliver the weather daily with access to over 200,000 cities world wide. Thanks to Stormy has access to your favorite cites.
Now, I don't believe for a second Stormy is about to change the world but its one of those handy bots that you can use to get your daily forecast delivered or as the example above shows simply ask a quick weather question. He knows no math, nor can he create a meme but he knows weather!
I am currently in the final testing stages for Stormy if you would like to try it out before it goes into the depot. Just search for Stormy inside of Spark and add it to a Spark Space or add to a conversation. He is simple to setup and just requires you to provide a city using the /city command. If you are in a Space versus a 1:1 make sure to @ mention Stormy to set your city or chat with him. See below for setting the city in a Spark Space:
If you would prefer to see temperatures in Celsius use the /unit command to update your room settings to metric. To change it back to fahrenheit use the same command with the imperial key word. The city and unit settings are on a per Space basis so if you want daily forecasts for multiple cities you can create a team and add Stormy to rooms for each city you want to see a forecast for.

This is version 1.0 of Stormy so please feel free to request features or make comments here on the blog or use the /feedback command in a room with Stormy to provide feedback. He will from time to time be unavailable for questions as I work out the final kinks (nice way to say bugs) but that should be limited.

 In future blogs I will talk more about what makes Stormy tick.


Cisco Spark bot for monitoring Spark bots. Say whaaat!

The last few weeks I have been working on and testing a new Cisco Spark bot that monitors all my other bots using a RESTful API. Its a relatively simple bot and thanks to an existing Nodejs project from Qawelesizwe Mlilo that was built  to monitor websites I was able to make a few simple changes so it is now a Spark bot that monitors other bots using a RESTful API. Qawelesizwe original project is called node-ping and is posted on GitHub. It has a number of files but the main module is node-monitor which is its own node module available on NPM. I made changes to a couple of the files on the original project with the largest change being removal of the email module to replace with my own Spark message module.

How it Works
This bot works by monitoring a website through the HTML status codes which it pings using a time interval(this is set in the websites.json file). This is very handy because if you are using Express with Nodejs all the status codes are taken care of for you, all you need to do is build a new route on your bot to handle the inquiry from the monitor bot(see the code later in the post). The monitor bot looks at the status code response and adjusts the status of you monitored bot accordingly and sends a Spark message when it changes. If you already have an existing website for your bot that is hosted with the same bot application you could use that as well, but I choose to create a new route so in the future I can deliver more JSON data with my response for future features.

Coding the Monitor Bot
The changes I made to the original node-monitor module are pretty minor. I added a new attribute to the constructor to describe the current bot state. I defaulted all bots to down state. Below is a exert of node-monitor file showing the constructor change.

Once this was done I took the rest of the node-ping sample code and added the ability to send Spark messages using a bot account instead of using email(boo, no one likes more email) and also adjusted the events to relay up and down status so when a bot comes back up the monitor bot lets me know and stops sending me Spark messages.

Sending a Spark message instead of an email used the file below. Make sure to place in your own bot token and adjust the events.js file for where you place this file.

The final change for the bot monitor application was adjusting the server.js file to add the new event for when a monitored bot comes back online.

The last change you will need to make is on the bot you want to monitor. If your using Express see below. The change involves setting up a new route to respond to the request from the bot monitor.Seeing as you may or may not use an actual website to monitor I created a REST response. In my case I give a quick JSON response but in future versions I am planning on generating some data to respond with, like rooms configured and up time stats that can be logged.

This is just the start of my monitor bot which as you can see has some rough edges but it works and just today it alerted me to a down bot which I had to address. One thing I want to do in the future is a daily bot monitor report delivered in Spark to let me know how my other bots are doing. Right now I have no way of knowing if the monitor bot has gone down so a daily report will help there as well, unless I build a bot to monitor the bot that is monitoring all my other bots, but then how would I know if that bot then went down. I know another bot........

If you want to check out the original Monitor module here is a blog post that describes it. Also here is the GitHub site.