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 and becoming a Supporting Member. For more info: Support TMC
Start a Discussionhttps://teslamotorsclub.com/tmc/tags/

Tesla BitBar - Monitor Charging and Control HVAC from your OSX menubar

Discussion in 'Model S: User Interface' started by therippa, Sep 30, 2017.

  1. therippa

    therippa Member

    Joined:
    Sep 4, 2017
    Messages:
    14
    Location:
    San Francisco
    Hey gang,

    Since I'd like to be able to turn my HVAC on from my computer when leaving work and not from my phone because I'm that lazy, I threw together a script that lets you do that from the OSX menubar:

    [​IMG]

    You can get it here - GitHub - therippa/tesla-bitbar: Get charging info and control HVAC from your menubar

    It's easy enough to add other commands/data to it, but I figured you wouldn't need to honk the horn from your desk.
     
    • Like x 3
    • Helpful x 1
    • Informative x 1
    • Love x 1
  2. Derek Kessler

    Derek Kessler Member

    Joined:
    Apr 15, 2016
    Messages:
    407
    Location:
    Cincinnati
    I'd suggest that the controls not be hidden under a submenu if there's only one car on the account.

    Model X
    Battery Level
    Charging State
    ——————
    Inside Temp
    Outside Temp
    Start HVAC
    ——————
    Last Updated
    Preferences >
     
  3. therippa

    therippa Member

    Joined:
    Sep 4, 2017
    Messages:
    14
    Location:
    San Francisco
    Good suggestion, done.
     
  4. verdee

    verdee Member

    Joined:
    Jan 5, 2015
    Messages:
    40
    Location:
    Denver, CO
    Im really struggling with the sudo pip install keyring. What is keyring? Is it something else to download. I keep getting error about pip command not being found
     
  5. therippa

    therippa Member

    Joined:
    Sep 4, 2017
    Messages:
    14
    Location:
    San Francisco
    run this first...

    sudo easy_install pip
     
    • Like x 1
  6. verdee

    verdee Member

    Joined:
    Jan 5, 2015
    Messages:
    40
    Location:
    Denver, CO
    thanks. got it all working now
     
  7. stan23

    stan23 Member

    Joined:
    Aug 10, 2017
    Messages:
    347
    Location:
    Santa Clara, CA
    Very nice! Will install when I get home.
     
  8. BigD0g

    BigD0g Member

    Joined:
    Jan 12, 2017
    Messages:
    993
    Location:
    Somewhere
    Neat, good idea!
     
  9. Acho

    Acho Member

    Joined:
    Mar 28, 2017
    Messages:
    180
    Location:
    Las Vegas, NV
    I made it work but next to tesla icon I have two yellow triangles with exclamation mark in it. When I click on them it says Couldn t posix_spawn: error 8

    How can I get rid of this?

    Thanks
     
  10. Musterion

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

    Joined:
    Jan 10, 2013
    Messages:
    470
    Location:
    M8
    @therippa this is awesome. Perfect for my spouse who doesn’t have a smartphone but on the computer all the time and wants to set climate control before leaving work.

    I like the simplicity and wouldn’t want to bloat it, but would suggest two more options for you to entertain:
    -a line for Lock state (for times when autolock fails due to something unlatched, child blanket in door, etc.)—for info only and doesn’t need to control lock state. This actually could just be a lock icon which I see you’ve added for battery.
    -a line to click for Location (can spawn a Maps window centered on car). Not only to remember where you parked your car, but then we can easily find each other with one click.

    Thank you again!
     
    • Like x 1
  11. therippa

    therippa Member

    Joined:
    Sep 4, 2017
    Messages:
    14
    Location:
    San Francisco
    Done!
     
    • Helpful x 1
    • Like x 1
  12. M.Baguette

    M.Baguette Member

    Joined:
    Nov 6, 2017
    Messages:
    6
    Location:
    Oslo
    Awesome plugin, great job OP!
     
  13. Exiom

    Exiom Member

    Joined:
    Nov 29, 2017
    Messages:
    21
    Location:
    Hong Kong
    Hi, I too am having problems with Couldn t posix_spawn: error 8.

    Error given when "Run in Terminal"
    Jacksons-rMBP:~ jackson$ /Users/jackson/BitBar\ Plugins/tesla.30m.py
    /Users/jackson/BitBar Plugins/tesla.30m.py: line 7: syntax error near unexpected token `newline'
    /Users/jackson/BitBar Plugins/tesla.30m.py: line 7: `<!DOCTYPE html>'

    macOS Sierra 10.12.6 (16G1036)
     
  14. Exiom

    Exiom Member

    Joined:
    Nov 29, 2017
    Messages:
    21
    Location:
    Hong Kong
    I have figured out the issue on my own, since no help came to the other guy who asked as well... this is what went wrong...

    If you downloaded the tesla.30m.py from the link on the instructions or on the list of files... your computer will download it as HTML and messes with it resulting in a large file that looks the same to us... but I am guessing it added something invisible to the file which er

    So if you happen to run into this problem, download using the "Clone or Download" button and "Download as ZIP". This will solve the problem.
     
    • Like x 1
  15. Exiom

    Exiom Member

    Joined:
    Nov 29, 2017
    Messages:
    21
    Location:
    Hong Kong
    I am still unable to use this app... can the author please render some help?

    tesla.com username (will not be saved):
    tesla.com password (will not be saved):
    Checking...--Error contacting Tesla's servers
    Traceback (most recent call last):
    File "/Users/jackson/BitBarPlugins/tesla.30m.py", line 390, in <module>
    main()
    File "/Users/jackson/BitBarPlugins/tesla.30m.py", line 248, in main
    prompt_login()
    File "/Users/jackson/BitBarPlugins/tesla.30m.py", line 227, in prompt_login
    access_token = c.get_token()
    File "/Users/jackson/BitBarPlugins/tesla.30m.py", line 106, in get_token
    if 'access_token' in auth and auth['access_token']:
    TypeError: argument of type 'NoneType' is not iterable
     
  16. Exiom

    Exiom Member

    Joined:
    Nov 29, 2017
    Messages:
    21
    Location:
    Hong Kong
    I am really not sure why I am unable to fetch a token the normal way... but I got the app to work after manually adding a token into the keychain.
     
  17. rohan3au

    rohan3au New Member

    Joined:
    Oct 27, 2017
    Messages:
    4
    Location:
    Sydney, Australia
    Would love some help with this, where do I input my username and password?
     
  18. rohan3au

    rohan3au New Member

    Joined:
    Oct 27, 2017
    Messages:
    4
    Location:
    Sydney, Australia
    Having this same issue, how do I get around this?
     
  19. Exiom

    Exiom Member

    Joined:
    Nov 29, 2017
    Messages:
    21
    Location:
    Hong Kong
    To get around this you will need to manually get the access token and insert it into your Mac's keychain.
     
  20. ahkahn

    ahkahn Member

    Joined:
    Jun 22, 2017
    Messages:
    308
    Location:
    Chicagoland
    Not for the faint of heart on the installation, but boy, now that I've got it working, this is great. I ran into every problem listed in this thread... but made it through. Thank you for the coding!!!
     

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


    SUPPORT TMC