Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Open Vehicle Monitor System (OVMS) - Technical Discussion

This site may earn commission on affiliate links.
A question on the v3 module:

Is it possible to program it to activate HomeLink within 100 feet or so of a garage door like the v2 module was able to be (see OVMS Installation) ?

Or is this type of feature yet to come?

Yes. It has a scripting system built in, and the geofence location system can specify radius's per location. Finally, we've also got timed homelink activation (so you can say activate homelink #1 for 3 seconds, etc).
 
  • Informative
Reactions: dhrivnak
Hi Mark,

Thank you for your great work on this project!

I guess I should have also asked what is the "script" or the commands I need to send to it to get it to work like my v2 module did. I tried searching for it in the documentation but was unable to locate it. Also, while I am not adverse to learning the language and formatting for the scripts, is there someone on the forum who could help me with step-by-step instructions for doing this (the garage door opener when in proximity) so I can get it up and running?

John
 
I guess I should have also asked what is the "script" or the commands I need to send to it to get it to work like my v2 module did. I tried searching for it in the documentation but was unable to locate it. Also, while I am not adverse to learning the language and formatting for the scripts, is there someone on the forum who could help me with step-by-step instructions for doing this (the garage door opener when in proximity) so I can get it up and running?

Documentation is not amazing on this. Basic steps are:

1. Use 'location' command to create a named location. You can do this manually (specifying latitude, longitude), or by just saying create a location 'here' with the car in the right place.

2. Use the 'location status' command to show the locations, and make sure they operate correctly. Tune radius appropriately. As you enter a location, a location.enter.<name> event will be raised, and as you leave a location.leave.<name> event will be raised.

3. You can then create a script on the location.enter.<name> event you want. You can use 'vfs append' for this (or 'vfs edit' if you are on a serial terminal). Your script is just a simple ovms command. In this case 'homelink 1' and you create it in /store/events/location.enter.<name>. Note that the homelink command also includes an optional parameter for duration (defaults to 1,000ms).

You can do all the above on a laptop plugged into usb, or via the web interface. The status page of the web interface will show you events as they occur so is pretty useful for this kind of stuff.

Enjoy, Mark.
 
  • Informative
Reactions: dhrivnak
I just completed setting up the same scenario for another Roadster owner, with a bunch of help from Mark, so let me add a couple more hints. You can explore the command syntax using the tab key to complete a command word or get a display of the subcommands that follow a command word, or you can use the question mark key to get a "usage" line showing the command syntax.

To expand on Mark's item #3, it is a bit subtle that the script filename is arbitrary, but the directory (folder) that contains the script file is what binds the script to a particular event. So, for this example, here are some explicit commands:

OVMS# location status
Currently at 34.406937,-119.742622 (with good GPS lock)
OVMS# location set garage 34.406937 -119.742622 40
OVMS# vfs mkdir /store/events
OVMS# vfs mkdir /store/events/location.enter.garage
OVMS# vfs append "homelink 1" /store/events/location.enter.garage/open

We initially set the radius to 40 meters but had trouble with GPS drift giving the illusion that the parked car was leaving and entering the radius and causing spontaneous opening and closing of the garage door.
 
  • Informative
Reactions: dhrivnak
Just setup OVMS v3 last night. I’m a new Tesla Roadster owner for a month now so pardon my naivety here. Anyhow right now I have but one question:

When not connected to the WiFi of my ovms box directly (ie: remotes access), is the (somewhat crappy) iOS app my only access point as an Apple user?

I would prefer to use the web client. But see no way to do this remotely. Does the cell setup I’ve included and setup with Hologram only provide API access via the cloud? Wouldn’t adding remote access to the internal web platform be easy? Maybe by means of DDNS?
 
To expand on Mark's item #3, it is a bit subtle that the script filename is arbitrary, but the directory (folder) that contains the script file is what binds the script to a particular event. So, for this example, here are some explicit commands:

OVMS# location status
Currently at 34.406937,-119.742622 (with good GPS lock)
OVMS# location set garage 34.406937 -119.742622 40
OVMS# vfs mkdir /store/events
OVMS# vfs mkdir /store/events/location.enter.garage
OVMS# vfs append "homelink 1" /store/events/location.enter.garage/open

We initially set the radius to 40 meters but had trouble with GPS drift giving the illusion that the parked car was leaving and entering the radius and causing spontaneous opening and closing of the garage door.

Thank you. I just set up my OVMS v3 with these instructions above using the "Shell" in the web browser connected with a LAN IP address to the OVMS v3 module through my wi-fi network. The garage door now works as I approach it although i have not had the opportunity to extensively test it over time.

There are two changes to the above instructions I made. Noting that the 40 meter radius might cause the GPS drift error and a spurious opening of the garage door, and thinking that the default of 100 meters may be too distant to reliably fire the garage door opener receiver, i set the radius to 60 (i.e. substituting "60" for "40" in the "location set garage" line above).

Also, I found it did not initially work with the homelink default of 1,000ms so I set it to 2,000ms so the final line above states:
OVMS# vfs append "homelink 1 2000" /store/events/location.enter.garage/open

I expect each user's specific circumstances will be different but it took a little experimentation with the syntax for adding the 2,000ms option (is the 2000 put inside the quotes or outside the quotes?), so I thought I would report my experience with it.
 
When not connected to the WiFi of my ovms box directly (ie: remotes access), is the (somewhat crappy) iOS app my only access point as an Apple user?

I would prefer to use the web client. But see no way to do this remotely. Does the cell setup I’ve included and setup with Hologram only provide API access via the cloud? Wouldn’t adding remote access to the internal web platform be easy? Maybe by means of DDNS?
To be clear, the WiFi access can either be directly with the OVMS acting as an access point for its own WiFi network or by having the OVMS connect as a client to some other WiFi network, such as your home network, and then your other devices connected to that same WiFi network can access the OVMS web server. Depending upon what kind of connection your home WiFi network has to the Internet, you may be able to set up external access to the OVMS as well if that doesn't create security concerns for you.

But, as the Hologram web page explains, you can't access the web server on OVMS through the Hologram network because the OVMS would not have a globally routable address (it is a network 10 address). We might be able to implement SSH tunneling, as Hologram uses for its Spacebrige service, but currently the SSH implementation only includes the server side and no tunneling.
 
When not connected to the WiFi of my ovms box directly (ie: remotes access), is the (somewhat crappy) iOS app my only access point as an Apple user?
If all you want to do is to issue the OVMS v3 box a few set-up commands (like setting up the garage door opener above), you might find a friend with an Android phone, ask them to temporarily download and install the OVMS app with your credentials, do the commands you want to do on the Android app to set up the OVMS v3 box (I think I am right that the Android app has a command line interface which operates similarly to the "shell" in the web browser), do the set-up, and then disable the app on the friend's phone.
 
Thank you for the replies above, @JohnGarziglia and @slcasner —- that has more or less answered my questions. When at home on my WiFi connections to my OVMS v3 have been successful, both my direct connection to the unit’s WiFi, as well as via the unit being on my home WiFi, finding that IP address and hitting it— so we’re good/solid there.

My question ultimately was if I could reach the OVMS HTML side of things with not on a WiFi point, direct or otherwise (read: GSM). Since the IP address of the unit would be possibly shifting, I had figured DDNS would resolve that. But as noted above, that doesn’t work right now. Maybe down the road with SSH ....

That said,.... here is my NEXT QUESTION ... reading through the notes in this thread it sounds like the latest firmware supports some fun features for my Roadster, such as alerts if the alarm is going off, or charging started, etc. How does one get those alerts? Is the only way to receive them come by means of writing a custom script, and having them SMS sent to me? It seems there is a nominal charge with Hologram to setup SMS, which I don’t yet have flipped on. I did see a (singular) push alert via the OVMS iOS app about charging, but that was it—- so yeah I just want to make sure I’m maximizing my enjoyment and usefulness here. That said, I don’t know diddle about programming so script writing sounds about as crazy to me as rocket science! :). TIA for any help/answers ...
 
That said,.... here is my NEXT QUESTION ... reading through the notes in this thread it sounds like the latest firmware supports some fun features for my Roadster, such as alerts if the alarm is going off, or charging started, etc. How does one get those alerts? Is the only way to receive them come by means of writing a custom script, and having them SMS sent to me? It seems there is a nominal charge with Hologram to setup SMS, which I don’t yet have flipped on. I did see a (singular) push alert via the OVMS iOS app about charging, but that was it—- so yeah I just want to make sure I’m maximizing my enjoyment and usefulness here. That said, I don’t know diddle about programming so script writing sounds about as crazy to me as rocket science! :). TIA for any help/answers ...

No programming required! (Though, really, it can be fun...)

If you have the OVMS app on your smart phone, and the OVMSv3 module configured for the v2 Server, the alerts will automatically get received on (pushed to) your phone. This will occur as long as the module has a connection, either via the Hologram SIM or on your home WiFi network, and of course your phone needs an internet connection somehow too. This includes some alerts that don't appear on the VDS display in the car, which can be really important.

Since you've already received one, it sounds like you're all set. A simple test is to put the key in the "ignition", and open the driver's door. You should get a VDS alert in the car, and very shortly, on the phone.
 
Many Thanks for all your work!!

I am a noob so forgive me if I ask stupid questions.

Just installed v.3 module. All seems to be working.
I have firmware 3.1.007

However 2 questions:

I only got 1 alert pushed through then never again. What should I do to get the alerts?

In the app I seem be missing a cooldown button.
Also no estimate of the remaining charging time.

There is a section in the app called control and features. What do these do? How do you operate it?

Thanks!!
 
  • Helpful
Reactions: arijaycomet
What was the alert that you received? As long as the module is connected to the Internet somehow, and the app is on your phone, the alerts should continue to be received.

We are finding that the 3.1.007 software has some issues. If possible, I recommend you back down to the .006 software and stay with the "main" software branch instead of "edge". 3.1.008 should be coming out soon, but one of the issues with .007 concerns auto updates, so down/upgrading may need to be done with an SD card.

I don't believe that Cooldown is implemented for the Roadster on v3.1 yet, sorry. We're in the process of updating the documentation to make the feature set clearer.
 
  • Informative
Reactions: dhrivnak
What was the alert that you received? As long as the module is connected to the Internet somehow, and the app is on your phone, the alerts should continue to be received.

We are finding that the 3.1.007 software has some issues. If possible, I recommend you back down to the .006 software and stay with the "main" software branch instead of "edge". 3.1.008 should be coming out soon, but one of the issues with .007 concerns auto updates, so down/upgrading may need to be done with an SD card.

I don't believe that Cooldown is implemented for the Roadster on v3.1 yet, sorry. We're in the process of updating the documentation to make the feature set clearer.
Thanks Greg

The alert was charging started I believe.

The module is online and so is my phone.

I am happy with the other connectivity.

Can I also wait with the downgrade and wait for the automatic update?
Or does that not work given the problems with .007?
 
Same issue as @GJVR .... one charging started alert when unit was new. Not a single push alert to iOS app since then. Connectivity is fine, though my reception on the GSM is spotty at home... but it has a 100% perfect WiFi connection —- and i can access/see charge status etc and shows “Live” but never pushes anymore updates. Just FYI.....
 

Attachments

  • C158DA27-21D9-4F07-9AFA-DB12710BC298.png
    C158DA27-21D9-4F07-9AFA-DB12710BC298.png
    272.1 KB · Views: 50
An "Events" question from the web browser: in the top left web browser window marked "Live" while looking at OVMS v3 through WiFi, there is a repeated fast cycle of "system.event" and "system.wifi.sta.authmodechange" (see image below). What does this mean? Is this normal operation or does this indicate an erroneous setting?
299860-549b5b98c06afd7219a5bcf6aa977a35.jpg
 
I have firmware 3.1.007

That version had some issues with OTA update. We recommend:

  1. Firstly, go back to factory firmware:

    ota boot factory
    module reset

  2. After reset, connect to wifi and do a manual ota update:

    ota flash http api.openvehicles.com/firmware/ota/v3.1/edge/3.1.008.ovms3.bin
    module reset

  3. After that is done, check the version with:

    ota status

    (You should be running 3.1.008 from an ota partition)
Alternatively, you can download 3.1.008 from http://api.openvehicles.com/firmware/ota/v3.1/edge/3.1.008.ovms3.bin directly and put as ovms3.bin on SD CARD to update from that.

Also note the v3.1.008 has now completed testing and is being released to the 'main' trunk now.