: Automated Ottawa DTV Scanner Tweets Updates


teknick
2011-08-26, 01:46 AM
For those of you who are interested, I've made a script that tweets any changes in OTA channels to @OttawaOTA (http://twitter.com/OttawaOTA).
Scans are done hourly when I'm not using the tuner. It's rudimentary and prone to failure, but I'll keep it up as much as possible.
It also doesn't filter out existing distant stations that may pop in and out. I'll maybe do that tomorrow.

tvlurker
2011-08-26, 11:09 AM
Thanks, tecknick. Do you think you could add some code to your script to convert the frequencies in Hz to channels? It should be able to do it with four if statements and a little aritmmetic:


if (freq >= 473000000) {channel = ((freq - 473000000)/6000000)+14;}// channels 14 to 69
else if (freq >= 177000000) {channel = ((freq - 177000000)/6000000)+7;} // channels 7-13
else if (freq >= 79000000) {channel = ((freq - 79000000)/6000000)+5;} // channels 5 and 6
else if (freq >= 57000000) {channel = ((freq - 57000000)/6000000)+2;} // channels 2, 3, 4

You could put some more error checking if you need to. And of course this could be refactored to do the calculation only once.

This code snippet assumes that your tuner is reporting the frequency as the channel centre. Some report 1 MHz from the channel lower edge.

moody
2011-08-26, 11:51 AM
Cool stuff technik. And good suggestion tvlurker, I may snag those lines for my own script.

I didn't see any testing happening last night; I was kind of thinking we might see testing by CHRO and CITS some time before the 31st.

tvlurker
2011-08-26, 12:02 PM
I may do the same. Looks like an automated way of DXing without having to stay up all night.

Next trick is to integrate this with a smart antenna interface that rotates the antenna for each rescan.

micah
2011-08-26, 12:16 PM
I've always wondered why that doesn't exist. They have it for satellites (DiSEqC).

charettepa
2011-08-26, 01:35 PM
i was wondering the exact same thing
if a receiver can control the direction of a dish
why not for an antenna

RamKat
2011-08-26, 06:57 PM
Look for posts by mlord on using DiSEqC for switching antennas.

teknick
2011-08-26, 08:35 PM
I'll be working on improving my script over the next coupled days, so hopefully it will get a little more user friendly.

backpackster
2011-08-28, 11:50 AM
A colleague of mine has a DTVPal DVR, the echostar version, before the CM-7000Pal DVR. When he goes on vacation he always comes back to a load of new channels on his channel list from all over New York State and beyond. The DVR seems to regularly autoscan. Sort of lazy man's DXing, but he doesn't experience viewing the "catch" or signal strength.

I don't know if the Channel Master version does the same, don't see this in the manual.

teknick
2011-08-30, 12:29 AM
Spent a considerable amount of time making improvements to the script. Much easier to read now. Running every 20 minutes throughout the night. Let me know if you have any suggestions. Thanks to tvlurker for the arithmetic for frequency to channel conversion. @OttawaOTA (http://twitter.com/OttawaOTA)

teknick
2011-08-30, 02:49 PM
Had CF go out late last night, and some NY stations were coming in and out. Resulted in a lot of tweets. Do you think it would be better to filter out the already known local stations? I don't want to spam your feed.

moody
2011-08-30, 03:16 PM
In my scripts, I've filtered out all of the known watertown and south colton stations, but left in all of the ottawa stations. That's made the resulting notifications a lot cleaner.

tvlurker
2011-08-30, 03:38 PM
I think it's good to have a record of when the local stations go down, so I wouldn't filter them out.

The only think would be perhaps to debounce stations that come and come all the time -- for example, only add or drop CRC channel 46 if the state persists for two scans?

also, for the CRC stations, I'm not sure if they all share the same TSID. If not, it would be useful to output the TSID for rhem. (Since I think chanel 46 is a Distributed TV service, I suspect that all the TSIDs are the same anyway.)

james039
2011-08-30, 11:34 PM
I think it's fine the way it is, and even having those distant stations show up is very handy in my opinion, for being notified of tropo openings. Maybe also list the PSIP virtual channel numbers/Station names in the tweet as well, so long as it can comfortably fit into your 140 character limit.

I like it.