1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TrafficCam Viewer 2.01 Now Available

Discussion in 'TiVo Home Media Features & TiVoToGo' started by F8ster, May 20, 2007.

  1. F8ster

    F8ster The Very Last One

    232
    0
    May 26, 2002
    I've finally gotten around to releasing a new version of the TrafficCam Viewer, version 2.01. (Download - screenshots - documentation )

    [​IMG]

    What's new in 2.01:
    • Better error handling and tolerance of network problems; added an error screen with more details when problems occur.
    • Rewrote sections known to cause problems for Macs (X11 display issue). Mac folks, you'll have to try this out and let me know if it actually fixes the problem.
    • Added random shift of viewing screen every minute to reduce burn-in issues.
    • Improved look and feel.
    • Added status message to initial screen indicating selected region and number of cameras.
    • Moved a number of items to the app-defaults file, making more settings user-editable. For example, in previous versions, the viewing times were hardcoded to 5.0 / 3.5 / 2.2 / 1.0 seconds. You may now edit the app-defaults.xml file and change them, if you're so inclined. These will likely be exposed in a configuration screen in a future version.
    • Added option in app defaults to allow camera images to always be maximized to fit in the display box.
    • Lots of internal stuff:
      • Rewrote all XML handling in Xerces (was in JAXB, and I finally reached the end of my rope with it)
      • Better logging, new formatter, less junk in the log files
      • Lots of refactoring; better class structure
      • Much smaller installer (now 664K) and smaller memory footprint

    This version should be a lot easier for me to support if you do find problems. It was fragile in a few areas (XML handling, especially), so I was not exactly motivated to turn out new releases. I fixed a ton of that stuff, and my build/release cycle is now mostly automated so doing a new release isn't nearly as painful as it used to be. I now have ant scripts that'll completely build the installer, service wrapper, ZIP files, etc. -- it's pretty cool.

    For the Mac/UNIX folks, I still don't have a good way to test this app for you guys, so please let me know if you're still having problems with it. I rewrote the section that was causing the X11 display errors, but I'm not completely convinced that the new code won't do the same thing. Worth a shot, anyway.

    Note that JRE 1.5 or 1.6 is now required; 1.4 is no longer supported.
     
  2. ajayabb

    ajayabb Member

    429
    0
    Jan 11, 2007
    Moorestown NJ
    Tried to run your application on s2 dt with windows and jre 1.6 with an error stating that server was not available

    loFINE 05-20 19:27:07 [com.bitrazor.tc.TrafficCam.setUpLogging] Application startup ==============================
    SEVERE 05-20 19:27:40 [com.bitrazor.tc.xerces.RegionMaster.parse] RegionMaster: parse: exception on http://bitrazor.com/tc/rm/100.0/RegionMaster.xml?53158
    FINE 05-20 19:27:40 [com.bitrazor.tc.xerces.RegionMaster.parse] RegionMaster: parse: read 0 regions.
    FINE 05-20 19:27:40 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 19:27:40 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 19:27:40 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 19:27:51 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 19:27:51 [com.bitrazor.tc.ErrorScreen.handleKeyPress] Caught a key press, exiting.
    FINE 05-20 20:05:03 [com.bitrazor.tc.TrafficCam.setUpLogging] Application startup ==============================
    SEVERE 05-20 20:05:36 [com.bitrazor.tc.xerces.RegionMaster.parse] RegionMaster: parse: exception on http://bitrazor.com/tc/rm/100.0/RegionMaster.xml?46493
    FINE 05-20 20:05:36 [com.bitrazor.tc.xerces.RegionMaster.parse] RegionMaster: parse: read 0 regions.
    FINE 05-20 20:05:37 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 20:05:37 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 20:05:37 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 20:06:16 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 20:06:16 [com.bitrazor.tc.ErrorScreen.handleKeyPress] Caught a key press, exiting.
    FINE 05-20 20:34:53 [com.bitrazor.tc.TrafficCam.setUpLogging] Application startup ==============================
    SEVERE 05-20 20:35:25 [com.bitrazor.tc.xerces.RegionMaster.parse] RegionMaster: parse: exception on http://bitrazor.com/tc/rm/100.0/RegionMaster.xml?94477
    FINE 05-20 20:35:25 [com.bitrazor.tc.xerces.RegionMaster.parse] RegionMaster: parse: read 0 regions.
    FINE 05-20 20:35:25 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 20:35:25 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    FINE 05-20 20:35:25 [com.bitrazor.tc.ErrorScreen.handleEvent] Event was not handled, letting super handle it.
    g
     
  3. F8ster

    F8ster The Very Last One

    232
    0
    May 26, 2002
    This is an indication that the following URL can't be reached:

    http://bitrazor.com/tc/rm/100.0/RegionMaster.xml

    This is typically due to one of two things:
    • Lack of internet connectivity from your PC
    • My server (bitrazor.com) is down

    My server's hosted at a very high-end facility and is almost never down, so I suspect the first. Here's a way to tell:

    When you run the app and get this message, can you go to the PC and bring up a browser to that URL? That's essentially all my app is doing -- accessing that page via HTTP from the PC on which it's installed. Give that a try and let me know how it goes. If it works from the browser but not from my app, I'd suspect something else (e.g. a proxy server or some other unusual configuration -- running in VMWare or Virtual PC, using Internet Connection Sharing, etc.).

    BTW, I assume it's XP you're running; if not, let me know.

    You can send me e-mail directly (admin22@bitrazor.com) if you want to take this off-thread. Thanks -- Dave
     
  4. rdrrepair

    rdrrepair You can call me Bill

    700
    0
    Nov 24, 2006
    845 New York
    Thanks for the newer version.
    Question: Why does my screen shift to the left now?

    When viewing the picture it starts out ok and then the whole frame and all moves over to the left a few inches. It hasn't affected anything, but I thought you should know.

    Windows XP
     
  5. F8ster

    F8ster The Very Last One

    232
    0
    May 26, 2002
    That's actually intentional. The intent is to reduce the possibility of burn-in by shifting the view around every minute or so by a few pixels.

    If the behavior is annoying, you can turn it off by editing factory-defaults/app-defaults.xml and changing

    Code:
        <RandomShiftAmount>[COLOR=Red]40[/COLOR]</RandomShiftAmount>
    to

    Code:
        <RandomShiftAmount>[COLOR=Red]0[/COLOR]</RandomShiftAmount>
     
  6. Burt Spielman

    Burt Spielman New Member

    73
    0
    May 9, 2001
    Madison, NJ USA
    Mac user here.

    First, the Java issue. Here's what the Apple website says about the latest version available for the Mac:
    Does this version meet your requirements?

    Next, the runtc.sh script: In the trafficcam folder, you renamed the "jars" folder as "lib" so I think the line "for jar in $(ls -1 jars); do" should read "for jar in $(ls -1 lib); do".

    Once I make that change, the last script line, "echo $classpath" results in:
    Code:
    lib/bananas.jar:lib/hme-host-sample.jar:lib/hme.jar:lib/trafficcam.jar
    However, the next line:
    Code:
    java -cp $classpath com.tivo.sdk.Factory com.bitrazor.tc.Trafficcam -i 192.168.0.104
    results in
    Code:
    Exception in thread "main" java.lang.NoSuchMethodError: main
    If I change this to
    Code:
    java -cp $classpath com.tivo.hme.host.sample.Main com.bitrazor.tc.Trafficcam -i 192.168.0.104
    I get
    Code:
    HME SDK 1.4 (TiVo, Inc.)
    error: class not found: com.bitrazor.tc.Trafficcam
    error: check the classpath and access permissions
    Failed to instantiate any HME apps
    Thus, no success so far.

    Any advice? Thanks.
     
  7. ocntscha

    ocntscha New Member

    149
    0
    Oct 22, 2003
    Awesome F8ster! You're runtc.sh startup script needed some help but I put it in order, fired it up and then was looking at traffic cams on my Tivo with the very first attempt. Yay!

    Yes, you did fix the X11 problem too!! I live in St. Louis and there's even a bunch more traffic cams listed now than last version.

    I have to say, this thing is really neat, its got a high degree of wow factor.

    As far as the runtc.sh..

    Unlike the previous versions where you had a carriage return line feed pair at the end of each line, this version you've got a carriage return only at the end of each line. Getting closer, what we're looking for here guy is a line feed only at the end of each line.

    You've gone from using a jars directory to a lib directory but runtc.sh is still written for jars directory.

    I've got to bind to a specific interface. last version you told us to use --intf and the ip address. Burt and I both discovered that didn't work and we needed to use -i and the ip address. Well this version it does want --intf and can't deal with -i.

    I'll attach my fixed up runtc.sh, maybe make it easier for Burt or any other Mac/Linux/Unix folks.

    Thanks F8ster.
     

    Attached Files:

  8. SugarBowl

    SugarBowl Member

    790
    0
    Jan 4, 2007
    Cary, NC
    There's no Raleigh/Durham NC. I created an XML file for the area, but how do i test it?
     
  9. rdrrepair

    rdrrepair You can call me Bill

    700
    0
    Nov 24, 2006
    845 New York
    That's odd, I thought there was one before...
     
  10. SugarBowl

    SugarBowl Member

    790
    0
    Jan 4, 2007
    Cary, NC
    Exception in thread "JmDNS.SocketListener" java.lang.ArrayIndexOutOfBoundsException: 4 >= 4
    at java.util.Vector.elementAt(Unknown Source)
    at javax.jmdns.DNSRecord.suppressedBy(Unknown Source)
    at javax.jmdns.DNSOutgoing.addAnswer(Unknown Source)
    at javax.jmdns.JmDNS.handleQuery(Unknown Source)
    at javax.jmdns.JmDNS$SocketListener.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
     
  11. Burt Spielman

    Burt Spielman New Member

    73
    0
    May 9, 2001
    Madison, NJ USA
    Agreed! ocntscha confirmed and codified my noodling around late last night; the final key was, indeed, --intf, not -i.

    Worked perfectly the first time. Great job, F8ster.

    Now, I note, in the Mac Terminal application, the following when TrafficCam Viewer is actually running:
    Code:
    HME SDK 1.4 (TiVo, Inc.)
    LOG: added factory
    MDNS: http://192.168.0.104:7288/tc/
    LOG: 192.168.0.102 icon.png HTTP GET - to factory /tc/
    2007-05-21 21:29:00.476 java[590] *** -[NSBundle load]: Error loading code /Library/InputManagers/MagicMenuEnabler/MagicMenuEnabler.bundle/Contents/MacOS/MagicMenuEnabler for bundle /Library/InputManagers/MagicMenuEnabler/MagicMenuEnabler.bundle, error code 2 (link edit error code 0, error number 0 ())
    2007-05-21 21:29:00.491 java[590] *** -[NSBundle load]: Error loading code /Library/InputManagers/Menu Extra Enabler/Menu Extra Enabler.bundle/Contents/MacOS/Menu Extra Enabler for bundle /Library/InputManagers/Menu Extra Enabler/Menu Extra Enabler.bundle, error code 2 (link edit error code 0, error number 0 ())
    LOG: HME receiver connected
    LOG: unknown event opcode : 8
    where 192.168.0.102 is my TV. If I exit TCV, Terminal displays:
    Code:
    LOG: connection to receiver closed
    LOG: HME receiver disconnected
    LOG: 192.168.0.102 icon.png HTTP GET - to factory /tc/
    and I'm ready to log into TCV again. Just thought this verbiage might be of interest to you, F8ster.

    Again, thanks for this nifty app!
     
  12. F8ster

    F8ster The Very Last One

    232
    0
    May 26, 2002
    Thanks; both fixes have been checked in and there's now a 2.02 version with the changes.

    Fixed it in the build. I had a 50% chance of guessing correctly. :) You'd think I'd remember, I was a UNIX admin for like 5 years once upon a time. Shameful I don't even have a box around I can test with. (I did try running under DSL/QEMU on this machine and got to various intermediate states of success, but never got to where I wanted. Someday I'll get this machine dual-booting Linux.)

    This was due to a change in the SDK; --intf is now required by the latest version of the HME SDK, and older versions used -i.

    My pleasure. Thanks for the fixes.
     
  13. F8ster

    F8ster The Very Last One

    232
    0
    May 26, 2002
    Yay, Burt's running! You are a patient soul, sir, and I appreciate you guys sticking with it.
     
  14. F8ster

    F8ster The Very Last One

    232
    0
    May 26, 2002
    Are you by any chance running Galleon? The 2.4 version is known to fix some issues around this error (port conflict with mDNS) and conflicts with other applications.
     
  15. F8ster

    F8ster The Very Last One

    232
    0
    May 26, 2002
    Easiest way is to send it to me (admin22@bitrazor.com) and I'll run it through the simulator real quick. Thanks -- Dave
     
  16. Burt Spielman

    Burt Spielman New Member

    73
    0
    May 9, 2001
    Madison, NJ USA
    Thank you. And, lo and behold, it works in daylight, too!
     

Share This Page