TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

Product Idea: Control external hardware through the touchscreen

Discussion in 'Model S: User Interface' started by cybrown, Aug 29, 2013.

  1. cybrown

    cybrown Member

    Joined:
    Jun 21, 2013
    Messages:
    49
    Location:
    Maryland
    This idea came about in the front camera threads, but I wanted to break it out for a separate discussion. Now that we have wifi with software 5.0, we should be able to access locally-hosted web pages (can anyone confirm this?). I've got an idea to build a small pcb with some general purpose control lines that will host a "Hardware Controls" webpage which you interact with via the touch-screen web browser. The pcb could be located anywhere convenient in the vehicle since it will be connected to the touchscreen wirelessly. Interactions on the web page could then trigger hardware events from whatever custom hardware you like - for example, turn on that rear fan you installed to deal with the heat issue in the jump seats, or potentially even display data from custom proximity sensors.

    I don't have version 5.0 yet, so I have a couple questions:
    1) Will the browser actually display local web pages? E.g. can you log into your home router from the touchscreen?
    2) How fast do those wifi pages load?
    3) Does the browser support any dynamic content? Anyone know if it supports AJAX?

    4) What are some other uses you could see for control of external hardware through the touchscreen?
     
  2. bhuwan

    bhuwan Active Member

    Joined:
    Mar 30, 2013
    Messages:
    1,256
    Location:
    Boston, MA
    It supports AJAX because I occasionally view TSLA stock from the browser, which updates in real-time.
     
  3. markb1

    markb1 Active Member

    Joined:
    Feb 17, 2012
    Messages:
    2,318
    Location:
    San Diego, CA
    So if I understand, you want to install a wifi router in the car? It's a good idea, but what I don't understand is how are you're going to connect to the internet for things like Slacker and Google Maps? I would think connecting to a wifi network is going to essentially disable the 3G. So it would seem you would have to pay for a second internet connection to supply your on board router.
     
  4. cybrown

    cybrown Member

    Joined:
    Jun 21, 2013
    Messages:
    49
    Location:
    Maryland
    D'oh, good point. I forgot this might break slacker and other 3G access, although I suppose it depends on how the browser handles requests that aren't found by the local wifi router. I suppose you could keep wifi turned off unless you want to access the local hardware, but that's obviously less elegant.
     
  5. gregincal

    gregincal Active Member

    Joined:
    Oct 26, 2012
    Messages:
    2,136
    Location:
    Santa Cruz, CA
    Well, you wouldn't need to pay for two connections. People have already talked that it might be nicer to have a dedicated LTE hotspot than pay Tesla for 3G service. However, it's definitely true that using the hotspot will disable accessing things through the car's 3G connection. The other possibility is that you could have both the car and the device connecting to each other through your phone's wifi hotspot. Other than the connectivity issue, I can't imagine any reason why the car couldn't access local web pages.
     
  6. deonb

    deonb Active Member

    Joined:
    Mar 4, 2013
    Messages:
    3,019
    Location:
    Redmond, WA
    What you need is a 3G Wifi Router to provide general connectivity for the car (we might start paying for connectivity one day anyway, so may as well pick up your own access point that supports LTE).

    The "PCB with general purpose lines" can then also connect to that same access point, and the car can then access it like a general purpose website, that just happens to be local. You also then have immediate over-the-web access to the new devices as well, if you so desire.

    Instead of building a new PCB, I would strongly recommend using some form of Arduino (with a WiFi or Ethernet shield) as your basis. As much as I also prefer building boards from scratch, by using an open platform like Arduino, it allows other people on here to much more rapidly extend the platform as a whole.

    Almost anybody here can add a new off-the-shelf shield, or throw a couple of relays/MOSFETs/sensors unto a proto shield and have a new feature running in a week. Not everybody here is going to feel quite as inspired to build a whole new board just to get some new home-made parking sensor to work.

    We should probably start having a debate on what we want to use (Due vs. Uno vs. NetDuino etc.) so that there isn't a fork right off the bat, and also have a centralized way to register pins for applications so that you can daisy-chain various Model S extensions without everybody trying to party on the same pins.
     
  7. Musterion

    Musterion 18h 03m 37s −24° 23′ 12″

    Joined:
    Jan 10, 2013
    Messages:
    337
    Location:
    M8
    I think it is a great idea. Like you said, if someone with 5.0 can connect to their home router and type its local IP in the browser and see it, your idea is going to work with a mobile LTE hotspot/router in the car. Even if the car browser can't load dynamic content, it will work for controlling switches via a hardware interface like Arduino. Finally, note some IP cameras have an option to send "video" as a sequence of low-bandwidth jpeg images for legacy browser compatibility. Even this might be useful for parking or other low-velocity situations.
     
  8. zax123

    zax123 CDN Model S P308

    Joined:
    Jun 4, 2012
    Messages:
    911
    Location:
    Candiac, QC, CAN
    Why not use a Raspberry Pi? It has 8 general purpose digital I/O pins built in and can be expanded with USB, etc... probably doesn't consume much power either -- I haven't checked that out yet.
     
  9. cybrown

    cybrown Member

    Joined:
    Jun 21, 2013
    Messages:
    49
    Location:
    Maryland
    Can someone with 5.0 do a quick test? Connect the car to your home wifi network, then unplug your router's internet connection. Or connect to your cell phone's wifi network, then turn off your phone's 3G/4G data connection. What does the Tesla browser do in this case? Can you still access the internet? I'm guessing not, since this is the behavior of most 3G devices that I know.
     
  10. hans

    hans P631

    Joined:
    Sep 27, 2012
    Messages:
    1,123
    Location:
    Menlo Park
    It also supports websockets. I tested a publish/subscribe messaging app running in the browser, connected to a message broker on the public internet.
    This was with the 3G cellular data, not WiFi, since I dont have 5.0.

    I also have two Pi's, integrated to the same message broker and waiting for a cool project to run on them.
     

Share This Page