ElectricMotorcycleForum.com

  • November 26, 2024, 11:15:55 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Electric Motorcycle Forum is live!

Pages: [1]

Author Topic: 2020 SRF - Cellular connection  (Read 1200 times)

Larry295

  • Full Member
  • ***
  • Posts: 142
    • View Profile
2020 SRF - Cellular connection
« on: March 29, 2020, 08:55:17 AM »

When I go to the cellular menu (kickstand down) the ONLY choice is: « not connected »
As a result I can never see the bike info on my app when the ignition is off.
Is that normal? Shouldn’t the bike be always connected, like a Tesla is for example?
Logged

didierm

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: 2020 SRF - Cellular connection
« Reply #1 on: March 29, 2020, 03:51:34 PM »

If I remember correctly, you need to register/activate the bike's (cloud) connection through the app.

Logged

Larry295

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: 2020 SRF - Cellular connection
« Reply #2 on: March 30, 2020, 03:36:02 AM »

Ok i got the bike to connect now.
But I have another question now: when you want to check the bike’s info, you need to request the connection to be renewed, correct? Or is it supposed to automatically update live?
Logged

didierm

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: 2020 SRF - Cellular connection
« Reply #3 on: March 30, 2020, 02:39:03 PM »

My SR/F uploads its status at regular intervals to the cloud.
IMO, "renewing the connection" in the smartphone app retrieves the latest uploaded value.


Have a look at this thread : https://electricmotorcycleforum.com/boards/index.php?topic=9520.0 ;
it describes how to retrieve your uploaded SR/F-SR/S data from the cloud, without the need for the lacking Zero app.

Furthermore, the ZeroNG app from member Hans2183 (thanks, Hans !) is a very nice alternative to Zero's app.


Logged

Larry295

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: 2020 SRF - Cellular connection
« Reply #4 on: March 30, 2020, 07:40:26 PM »

Thank you very much Didierm. This is valuable information!!
And congrats to Hans again for designing this app. This guy never ceases to amaze me ;)
Logged

didierm

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: 2020 SRF - Cellular connection
« Reply #5 on: March 30, 2020, 09:14:38 PM »

My pleasure, Larry.

I use the following skeleton (Linux bash) script to retrieve info from Zero's cloud instance.
Maybe it's of use to others too.


* Base :

$ BASEURL="https://mongol.brono.com/mongol/api.php"
$ FMT="json"   # json,csv,xml,http

$ ZUSR="yourzeroaccount@maildomain"
$  ZPW="yourzeropassword"
$ ZUNIT="yourzerounitnumber"  # retrieved from [1]


[1] Manually retrieve your unit number, in order to assign to the above variable ZUNIT  :
$ ZCMD="get_units"
$ curl -s --http2 -G ${BASEURL}?commandname=${ZCMD} -d format=json -d user=${ZUSR} -d pass=${ZPW} | jq .


$ BASECMD="curl -s --http2 -G -d format=${FMT} -d user=${ZUSR} -d pass=${ZPW} -d unitnumber=${ZUNIT} ${BASEURL}?commandname="



* Examples :

# retrieve latest data transmission
$ ZCMD="get_last_transmit" ${BASECMD}${ZCMD} | jq .

# retrieve user info
$ ZCMD="get_userinfo" ${BASECMD}${ZCMD} | jq .




* Application :
(retrieve a month's worth of data, clean up, dump to separate CSV-formatted file zerocloud_yyyymm.csv, and append to (existing) CSV zerocloud.csv)
-> Variable DTBASE needs to be changed to the required month (format = 'yyyymm')

$ DESTDIR="/home/blabla_username_whatever_makes_your_cookie_crumble/Zero/SRF/data"
$ ZCMD="get_history" ; FMT=csv ; DESTFILEPREFIX="${DESTDIR}/zerocloud"
$ PARTURL="${BASEURL}?commandname=${ZCMD}&format=${FMT}&user=${ZUSR}&pass=${ZPW}&unitnumber=$ZUNIT&start=${DTSTART}&end=${DTEND}"

$ DTBASE="201911"

$ DESTFILE="${DESTFILEPREFIX}_${DTBASE}.${FMT}" ; rm "${DESTFILE}.tmp" ; for dts in `seq 1 31` ; do dtstart=$(printf "${DTBASE}%02d" "$dts") ; dtend=$(date +%Y%m%d -d "$dtstart + 1 days") ; curl "${PARTURL}&start=${dtstart}&end=${dtend}" >> "${DESTFILE}.tmp" ; done
$ head -n 1 "${DESTFILE}.tmp" > "${DESTFILE}" ; egrep -v "^mileage|^610 Bad end date" "${DESTFILE}.tmp" >> "${DESTFILE}"
$ egrep -v "^mileage" "${DESTFILE}" >> "${DESTFILEPREFIX}.${FMT}"
Logged

Larry295

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: 2020 SRF - Cellular connection
« Reply #6 on: March 30, 2020, 09:40:01 PM »

I have no clue what those code lines mean, or how to use them. But I guess it might help some people!
Thank you again!
Logged
Pages: [1]