ElectricMotorcycleForum.com

  • September 02, 2026, 03:09:11 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Electric Motorcycle Forum is live!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - i550

Pages: [1]
1
Zero Motorcycles Forum | 2013+ / Re: SR/F App (NextGen) - API
« on: April 30, 2020, 11:28:13 PM »
I'm still looking for details on the other fields.  Or others with different colors and hopefully some SR/S's too.

Here's the most recent dashboard I have, I drew half the icons and the bike, but also used font awesome for other icons.  I kept everything a SVG to make sure scaling of screen size wouldn't impact the clarity of the images and cause them to get grainy.

I also tried to make the GPS Information more visual by including a circular satellite and heading imagery.  The arrow points the actual heading angle and the satellites in the circle will update to match the number connected from the json file.

I was hoping to find a way to get the ride data (power and lean) from the app as well. 

So was wondering since they oddly won't share the raw data in the app, if it can at least be seen over the Bluetooth connection as well?  Have anyone been able to see a trace from the Bluetooth connection?

2
Zero Motorcycles Forum | 2013+ / Re: SR/F App (NextGen) - API
« on: April 09, 2020, 09:45:56 PM »
Thanks Hans2183

Oddly, I just noticed that the color field on mine changed today and now says 2 as well.  Seems they may be updating the api.

It would be good to see what an SRS looks like, as well as a blue SRF.

The mileage in the json file is also behind the real odometer on my bike too, by about 50ish miles or so.

3
Zero Motorcycles Forum | 2013+ / Re: SR/F App (NextGen) - API
« on: April 07, 2020, 10:38:52 PM »
Thanks Remmie! 

I've enjoyed the iOS app as well. 

My plan for this project is to run it off a raspberry pi in my home office on a wall mounted display as a dashboard for my bike.  Maybe also package it in an electron app, like slack, so it can run on my laptop and desktop.

I may work on adding gpx stored paths in a local db. to store rides in the future as well.

As for the unused data in the json file, I did ignore the things that seemed like template fields from cars or trucks, such as door, hood, water and oil_pressure.  Do you know if field such as siren, driver, shock, ignition, volume, lock, int_lights, perimeter are useful from the file?

Comments inline below:

Nice work i550 !

As for the yellow items.
* Unit type is 5 with me as well, dont know what it means though, it could be related to the bike (SR/F) or to the GPS/GSM unit or maybe even to the use of KM or Miles. Mine is in km and the milage figure is correct for km which would imply that unit type is not for km/miles

[i550]  Agree, everything seems to be in metric, which makes conversion math easy.  I assumed that unit type had to do with the gps unit setting or model.  Leaves the question, is the unit being referenced the GPS receiver or the bike itself?

* Unit model is 6 with me as well, if it would relate to the bike : mine's a SR/F

[i550]  Mine is 6 and a SR/F as well.  Makes me wonder if 0-5 are the previous models, such as the fx.

* Response is also 0 with mine. no idea what it means
* Reason is also 2 with mine. no idea
* Logic state is 2 with mine instead of 1 in yours. Mine is keyed off?
[i550] Hmmm, weird, wouldn't 0 be off?  Could it be a error status or logic board status?

* Analog has been 0.09 with mine always. It think it is an unused analog input. It is named analog1 instead of analog
[i550]  These are the fields (response, reason, logic) I assumed would be the hardest to make sense of without proper api documentation, such a shame, I assume this would be good information for owners to have to be proactive on bike maintenance.

* Color is 6 with mine instead of 5 in yours. I have a boardwalk red SR/F
[i550]  That is odd about the color, I have a red SR/F as well, and my color field is 5, can other collaborate that discrepancy as well?


There are also a couple of items in the JSON response that are not visible in your webpage (maybe on purpose?)
* driver, 0 in my case
[i550]  Same for me, I was really curious what this field could possibly mean.

* gps_valid, 0 in my case (sitting in the garage with a reinforced concrete ceiling
* shock, 0 in my case (which is a good thing :) )

* ignition, 0 in my case keyed off in the garage
[i550]  Have you seen this go to 1?

* door, 0 in my case (figures, because it has no doors, LOL. Or is does the storage compartment have a door, or is that a lid, ;) )
[i550]  lol, I laughed when I saw this field and others like it, as well.  I shrugged it off as the zero guys working off some template that they were forced into by the gps manufacturer.

* hood, 0 in my case
* volume, 0 in my case
* water_temp, "" in my case which makes sense
* oil_pressure, 0 in my case which also makes sense
[i550]  All the same for me.

* siren, 0 in my case (it has none)
[i550]  I was wondering if the SR/F alarm would trigger this one.

* lock, 0 in my case
* int_lights, 0 in my case
* datetime_utc, 20200405201257
* datetime_actual, 20200407061530
* perimeter, "" in my case
* tipover, 0 in my case (which is good !)
[i550]  Very good. :)

Of those last batch I think only gps_valid, ignition, shock and tipover would be helpfull for your page, maybe make a fourth page with the all the unknown/unused values, just for info if someone sees a use for it.
[i550]  Hmmm, good point, I'll add them, I wanted to build in more conditional logic to convert the data into layman's terms for as much as possible.  Seems I'll have to guess for the rest.


Other than that : Great work
[i550]  Thanks!  Love the iOS app too.

As far as accessing the data that Nextgen App has like riding modes etc, that information is only available via bluetooth, not through the web.
[i550]  That does suck, so much of this data and cloud experience could be improved and become interactive for owners with not only the bike but zero motorcycles themselves. If they updated their approach they could start the process of building a vendor/owner community that rivals Harley. 

That being said, please don't get me wrong, I love the bike and what abilities this provides. Huge leap forward in tech and tinkering.  :)



Thanks for the help.



4
Zero Motorcycles Forum | 2013+ / Re: SR/F App (NextGen) - API
« on: April 07, 2020, 06:45:25 AM »
I’ve been trying to utilize the quarantine time for more than sitting around and decided to start a web app project for the cloud data on my zero bike, by building on the api discovery from this thread.  I’ve been working on both the code and the drawings off and on, over the last couple weeks.  Besides having to finish the images (please don’t judge the draft SRF image, still a work in progress),

I’m running into dead ends finding any documentation on the api.  As well as issues with contacting the servers in modern restful manner.  I was shocked to see that passwords are sent in the clear. Then, also surprised that the site has a poorly defined server configuration for access to data, that restricts async calls from the browser, due to CORS being setup in an old fashioned manner.   Which means I won’t be able to make standard fetch calls, but will have to hack a script to download the JSON file locally periodically until they change their servers permissions.

It would also be great to have access to the rest of the data on the bike that is also available via the app over bluetooth.  Like ride mode and other things.  For now I’ve gotten the data that is available mostly parsed and converted to imperial, except for the fields in yellow. 

Does anyone have an idea what these are and the potential values for them could be?


Pages: [1]