If you're reading this your probably interested in being alerted anytime anyone locally or remotely (via RDP) logs into your Windows box. This script requires Pushover on a mobile device to receive notifications. The script can be easily modified to support several other notification services such as Boxcar or Prowl.
- cURL for Windows (Binaries available): http://curl.haxx.se
- Pushover on an Android or iPhone
- I am using Windows 7. Theoretically it should work on any version of Windows (Desktop and Server). The Task Scheduler instructions below may vary slightly for each version of Windows but should be easy enough to figure out.
- Save the below code to a file named LoginPushover.bat. Modify the curl_path, curl_insecure, pushover_token, pushover_user accordingly.
- Test to make sure the script is working properly in its current state before adding a Scheduled Task trigger. To do this, simply double click on LoginPushover.bat file. Within a few seconds your Pushover should alert your phone. If you do not receive an alert, go back an double check the pushover_token, pushover_user, and curl_path url. For additional testing, uncomment the pushover_insecure line. This will bypass the local SSL Certificate check.
- Open Task Scheduler (All Programs - Accessories - System Tools).
- Click "Create Task" on the right sidebar.
- General Tab: Give it a name and a description
- Triggers: Three in total
- New - Begin New Task: At log on
- New - Begin New Task: On connection to user session - Connection from remote computer
- New - Begin New Task: On connection to user session - Connection from local computer
- Actions: New - Action: Start a Program - Program/script: Browse to location of LoginPushover.bat
- Press OK to set the task
- Everything is setup. Whenever anyone logs in (remotely via RDP, or locally) an alert will be sent to your mobile device running Pushover.
:: :: Author: Josh Grochowski (josh dot kastang at gmail dot com) :: Last Modified: 10/7/2012 :: License: MIT :: @echo off :: Set curl_path to the location of curl.exe on your local machine. :: Windows does not come with curl preinstalled, goto http://curl.haxx.se to download set curl_path=C:\bin\curl.exe :: Uncomment the below line if you do not have an SSL Cert generated for curl. :: Note: This is not recommended, you should generate an SSL Cert. If you are unable :: to, or using this for testing, uncomment the below line and it will force an insecure connection :: set curl_insecure=-k ::Pushover specific information set pushover_token=YOUR_PUSHOVER_TOKEN_HERE set pushover_user=YOUR_PUSHOVER_USER_TOKEN_HERE set pushover_url=https://api.pushover.net/1/messages set pushover_message=%username% logged into %computername% @echo on ::Pushes the message to the Pushover API which will push it to any device using Pushover. %curl_path% %curl_insecure% ^ -F "token=%pushover_token%" ^ -F "user=%pushover_user%" ^ -F "message=%pushover_message%" ^ %pushover_url%
I've taken an interest in the CetonTV project. The project allows any device capable of supporting XBMC (or M3U streams) to stream live TV via the Ceton InfiniTV 4. Prior to this project surfacing, the InfiniTV4 was crippled by only streaming to Windows based systems running Windows Media Center or a Microsoft Media Center Extenders (XBox 360) -- The cheapest MCE device prior to this project was ~$200. Around a month ago however, I heard of a neat little device called the MK802. I picked one up from DealExtreme (on DX, it goes under the name AK802, but is actually the MK802). After nearly a month of waiting it finally arrived. Initial tests were positive and detailed below.
- Bypass XBMC for the time being. The CetonTV not only has an XBMC addon, but also has a web interface. I found that the overhead of XBMC produced negative results during my initial tests. I contribute this mostly to XBMC for ARM Processors still being in alpha stages. In order to bypass XBMC, an external media player that supports M3U8 streams will need to be used. I chose to use MX Player which is available from the Google Play store. The CetonTV web interface has a mobile and desktop version. The mobile version seems to be tailored specifically for iOS devices (which it works flawless on, but more on that in another post). When using the MK802, use the desktop version of the web interface. When playing a feed from the web interface on the default android browser, it will ask how to play the M3U8 file: select MX Video and in a few seconds you will be streaming live TV via the MK802.
- It supports 720P (@ 2000kbps) live streaming. This seems to be the current upper end of what the device will support. Don't get me wrong - this still produces a fantastic image. I have it pushing to a LCD TV and it looks great. I believe it due to the lack of CPU support by the manufacturer (which developers are evidently working on) and Wifi only support (A USB->Ethernet dongle may be possible). I'm going to work on a hardwired USB->Ethernet connection next to if I can stream @3000-6000K to produce an even cleaner image.
- It gets warm. The MK802 gets very warm after a only a few minutes of streaming @ 780P. After streaming for ~20 minutes, the device was very warm to the touch. I assume the device is built to handle higher then normal temperatures given the size of it. I have read a few posts online showing the A10 melting the outerplastic housing of the MK802, but still continue to function. On my TODO list is to pickup another one of the devices and put a small heatsink on the CPU and see how far I can push it before it becomes unstable.
I'm very happy with the MK802 so far. Especially with it being in such early development. Other then the Raspberry Pi (Still have ~8 weeks before delivery), the MK802 is the cheapest device I know of capable of streaming 720P (with 1080P on its way) video. I'm curious to see how the Raspberry Pi handles CetonTV given that the MK802 hardware beats the Pi in almost all regards.
In an attempt to consolidate my postings, all content from Kastang.net has been merged with Kastang.com.
One issue I had with Windows 7 Media Center (7MC) was figuring out how to set individual rules for series recordings. It's easy (and well documented on Microsoft's website) to set general recording defaults for all Series (Tasks -> Settings -> TV -> Recorder -> Recording Defaults). For me at least, having a single recording rule for a every series I record is impractical.
How to set "Series Based" recording rules:
From The 7MC Main Screen: TV -> Recorded TV -> View Scheduled -> [Sort by Series] -> [Select Series] -> Series Settings
I was unable to find the steps listed above documented anywhere on Microsoft's Media Center site - either it doesn't exist or the instructions are buried in an obscure place.
After navigating through a maze of options, a variety of recording rules for the individual series become available:
- Show Type: Live, New, New&Rerun
- Channels: Any Channel, HD Only, HD Preferred, SD Only, SD Preferred, [X] Channel Only
- Airtime: Anytime, Around [X] Time
- Keep: Until Space Needed, Latest Recordings, Until I Watch, Until I Delete,
- Keep up to: 1, 2, 3, 4, 5, 6, 7, 10, As Many as Possible
- Stop: On Time, [X] Minutes After, When Possible
The settings above provide everything needed to fine tune series based recordings.
Last Thursday (July 28th) I received my Ceton Infinitv 4. The Infinitv 4 is a CableLabs certified device that has the ability to record and/or stream up to 4 signals simultaneously via Windows Media Center. The Infinitv requires a CableCARD to function properly. In theory; obtaining and activating a CableCARD should take a half hour at most.
On Friday (July 29th), I went to my local Comcast facility to pickup a CableCARD. When asked for a CableCARD, the representative said that Self Install CableCARD kits (SIK) did not arrive, but they would be available August 1st. (August 1st is the date the FCC mandated that cable companies have to provide CableCARD SIK to customers.) I find it particularity interesting that every other cable company has adopted SIK kits months ago, yet Comcast chose to wait until the mandated deadline to provide kits to customers. Though disappointed, I would have waited until Monday. Before I left though, the representative told me to head to another Comcast center that would have the SIK kits available today. Great news! .. Or not.
I went home and found the address for the Comcast Center - After a 20 minute drive I arrived to find the address listed on Comcast's website is not for a service center, but rather an administrative building. After traveling another 15 minutes I found the actual service center (the address of which I am STILL not able to locate on Comcast website). After waiting in line for 15 minutes I asked the employee for a SIK CableCARD. The employee (rudely) told me they would not give one out until Monday - even after I explained what my local Comcast branch told me. Evidently there is zero communication between any offices for official policies.
I went home (another half hour drive) and contacted @ComcastBill on Twitter. I have always had good luck with Comcast Twitter support - they generally offer solutions quickly without having to deal with normal phone support. I was told by @ComcastBill that SIK kits would not be available until August 1st due to "provisioning". I have an issue with this "provisioning" statement. CableCARDs have existed years. This is by no means a new technology. Also, there is doubtful to be ANY significant flux is CableCARD demand due to an obscure FCC guideline that a handful of people know about. So far, I have wasted about 2 hours worth of driving and gas because a Comcast employee told me another branch would have SIK available on Friday.
By this time, I realized that it was going to be impossible to receive a CableCARD until August 1st. That's fine though; SIK Kits will be available Monday. Since Comcast has taken their time with this implementation, I expected a nice kit and an automated activation number to call. Oh how wrong I was...
Obtaining the CableCARD Aug. 1st:
On Monday, I went down to my local Comcast Sales location and requested an M-Card SIK. The "SIK" provided by Comcast consisted of 1 CableCARD and 4 pages of (ink jet) printed instructions contained within a plastic bag. The card I was given was obviously used. It showed signs of marking and scratches on it. At this point, I didn't care if it the card was new or used as long as it worked. The instruction manual consisted of a cover page, 2 pages for TiVO specific instructions, and 1 page for "other devices". I find it amazing that I couldn't get my hands on a CableCARD until the 1st because of a 4 page instruction manual (of which, 1 was needed). In reality, the entire instruction manual could have been condensed into 1 4"x6" note card that said "Call this number:" The entire process took 10 minutes to obtain the card.
The "instruction manual" I was given was dated 7/12/2011 - The manual was completed nearly three weeks before the August 1st deadline -- Why couldn't Comcast give SIK kits out early again...?
When I got home, I continued with the Infinitv installation instructions. When I inserted the CableCARD into the Infinitv I was prompted with an error that told me I had inserted a S-Card. After confirming the card I was given was an S-Card, I had to make another trip to Comcast within 45 minutes of my previous visit. I told the representative at Comcast that I requested an M-Card but received an S-Card. She then tells me they only have S-Cards SIK available. Lets recap for a second - after I was told I was receiving an M-Card, the representative knowingly gave my an S-Card.
I asked the representative to call nearby locations if they have M-Cards in stock. She called one other location and told me they only received S-Cards for Self Install Kits as well. I find it strange that Comcast is only shipping S-Cards for SIK when M-Cards are exponentially more popular and required for almost every new device being produced today. I believe that only offering S-Cards as SIK is Comcasts way of complying with FCC rules, but at the same time screwing their customers by requiring a tech to come out to the house to install an M-Card (with an associated truck roll fee of course).
At this point, I contacted @ComcastBill again on Twitter. I probably should have done this from the start; As I mentioned earlier, Comcast's Twitter Team is the best thing to happen to Comcast in a long time. After contacting @ComcastBill, I assumed that a response would take some time so I called regular Comcast support myself. I asked if the representative could tell me which locations within a 20 mile radius of my location had M-Cards in stock. I was told by the representative that Comcast has no way of tracking which locations have stock of what items. REALLY?! How does a company the size of Comcast not have a method of monitoring inventory at their locations? I asked if the representative could call another location near me to ask if they had stock - I was told by the representative that it was impossible to call. Impossible? If it was impossible then how was my local Comcast Store able to call another store?
While on the phone, I missed a call from Comcast Corporate. After I completed my phone call with the original representative, I called Terrance from Comcast Corporate back. I am assuming that @ComcastBill had him call. Just like the Twitter support, Terrance from Corporate was extremely helpful. I explained my problem, he said he would make some phone calls and see how I could get a card in my possession today (Monday). About 45 minutes later I received a call back from Terrance informing me no locations in my area have any stock of M-Cards, but he arranged for a truck from the local warehouse to run a card over to a Comcast location that was about a half hour from my location. He said it would either arrive today or tomorrow morning.
I took the risk of going that evening, when I arrived to the Comcast location, there was an brand new M-Card waiting for me. Terrance was extremely helpful in this regard. I thought after receiving my M-Card, all my issues were over. Unfortunately, they were just beginning.
Activating the Original CableCARD:
After returning home (6:30 PM), I was finally able to complete the Infinitv install. I reached the point where I had to call Comcast to activate my CableCARD. I assumed this process would be entirely automated - you know, since Comcast spent so much time "provisioning" the new cards; one would think that an automated solution would be developed. I was wrong. The activation process should taken all of five minutes to accomplish. The activation process is fairly trivial on Comcast's end - I read a series of 4 numbers over the phone, they submit the information and send an activation signal to my card. The lack of experience from regular Comcast support is blatantly obvious when I attempted to activate a CableCARD over the phone. The process took a hour and five minutes to complete. At one point, I was put on hold for 25 minutes because the representative had to research how to activate a CableCARD. Eventually the representative said she would call back shortly after the card was activated. After 15 minutes she called back and said the card was "activated". I was told that it would take between 45 - 60 additional minutes to fully complete the activation process. At this point, it was after 8:30PM. I decided to let the card sit for the night.
The next morning I woke up to test the card. I originally thought it was a success. I could receive local channels, and most other channels under 100. When I attempted to view channels above 100, I received an error "Subscription Required" that essentially told me I didn't have permission to view these channels. I double checked my diagnosis software provided by Centon to verify I had everything configured properly. Everything passed except one of the CableCARD tests. The diagnosis message read "CableCARD is not entitled to decrypt because the information about it is entered incorrectly at the cable company. An INIT signal from the cable company might help." I researched the diagnosis message online to find that this issue was definitely Comcast related. When I called Comcast again, I informed the representative of the diagnosis message. Again, she told me this was the first CableCARD she had worked with. She attempted to hit the card as the diagnosis message suggested, but it was unsuccessful. After 33 minutes on the phone, I was informed that she couldn't do anything else over the phone. As the representative didn't have experience with CableCARDs, I decided to not schedule a truck to roll at this point. Terrance from Comcast Corporate told me he would call me today (Tuesday) to verify I received my card.
As promised, Terrance called me early afternoon on Tuesday. I informed him of my problem I was having. He verified that the rate codes on the account "looked right at a glance". ("Rate Codes" are codes that determine what channels my CableCARD has access to). He made a suggestion to directly connect my card to the incoming cable line rather then going through a splitter. Later that afternoon, I attempted his suggestion. After directly connecting to the Infinitv, I verified that the Signal Strength was in the required range, which it was. This still did not fix my issue, I was still only able to receive local channels, and most channels under 100.
I attempted to call Terrance back, but he was out of the office at the time. After researching online, I found that one of the last attempts to get this card working is to ask Comcast to un-pair and re-pair the card on their end. The representative I spoke with on regular support seemed to know what she was doing more then anyone else I have spoke with on regular support during this process. I asked her to un/re pair the card, which she did. After a 20 minute call, the card still wasn't functioning correctly. She said she has heard stories where its taken techs 6+ CableCARDs to successfully pair with a device.
At this point, I have no other option then to schedule a truck to roll out on Friday. This is obviously an issue with the CableCARD and/or Comcast activation process. It's not a battle I can win myself. What I can't understand is why are their so many issues with defective CableCARDs? Comcast has to have some way of testing or verifying their cards before giving them to customers. A process that should have taken 5 minutes has now accumulated over 2.5 hours of phone calls and over 3 hours worth of driving to different Comcast locations without a working device! Worst part of having a truck roll out is no one is able to confirm weather I will be charged for the service call or not.
Part 2 will consist of how this ordeal ended on Friday (hopefully).
A Comcast Technician came to my house on Friday. He was very polite and knowledgeable about CableCARDs. As soon as he looked at the diagnostic message on the Ceton Device, he confirmed my suspicion and said the Comcast employee who paired the card did so incorrectly. (Note: This means two separate employees paired this card incorrectly - the first Monday night, and the next Tuesday afternoon over the phone). The technician sent a message to dispatch to pair the card correctly - within 5 minutes my card was working properly.
After taking a weeks worth of phone calls and driving, I finally have a working Ceton Infinitv 4.