ElectricMotorcycleForum.com

  • May 05, 2024, 03:00:45 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Electric Motorcycle Forum is live!

Pages: 1 [2] 3 4

Author Topic: Android-App 'ZeroSpy'  (Read 5152 times)

I973

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #15 on: June 08, 2019, 10:34:58 AM »

Thanks @talon

Got it; that's what I was wondering. No one seems to have reverse-engineered that part, and, honestly, it seems like a grey area to re-use that library. I don't think they'll mind as long as your app behaves well (for example, try not to poll for data too frequently).

Just to clearify: those libraries are not part of my app now. I just needed to call them once to get the packets including the checksum, I did not try to find out which algorithm they use for the checksum. Probably crc32 or so...
Logged
Zero SR 2018

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Android-App 'ZeroSpy'
« Reply #16 on: June 08, 2019, 09:43:06 PM »

Thanks @talon

Got it; that's what I was wondering. No one seems to have reverse-engineered that part, and, honestly, it seems like a grey area to re-use that library. I don't think they'll mind as long as your app behaves well (for example, try not to poll for data too frequently).

Just to clearify: those libraries are not part of my app now. I just needed to call them once to get the packets including the checksum, I did not try to find out which algorithm they use for the checksum. Probably crc32 or so...

Got it. How many bikes have you tested it with?

The function signatures might reveal how messages vary, or not at all, by model or configuration.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

I973

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #17 on: June 09, 2019, 02:43:47 AM »

Got it. How many bikes have you tested it with?

I have tested it with my SR 2018, same protocol version as 2017 and 2019. And I know one guy with an SR 2015, there was one problem I could fix. No other negative feedback until now...
Logged
Zero SR 2018

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Android-App 'ZeroSpy'
« Reply #18 on: June 09, 2019, 02:47:06 AM »

Got it. How many bikes have you tested it with?

I have tested it with my SR 2018, same protocol version as 2017 and 2019. And I know one guy with an SR 2015, there was one problem I could fix. No other negative feedback until now...

Okay so it seems you’re the fourth person to my knowledge to try solving this problem. I hope you’ll get further and clear it but it’d be nice at some point if we just had one good working shared codebase if the app idea doesn’t work out.

Several infeasible apps would be a shame.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

I973

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #19 on: June 09, 2019, 11:31:14 AM »

Brian,

would do you mean exactly? Things are solved enough I think. I know how the communication and protocols work. The app works fine so far. And if there are some model dependent issues,  this should be solvable too. I'm quite happy with the state of the app until now ;)

Have a nice weekend!
Logged
Zero SR 2018

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Android-App 'ZeroSpy'
« Reply #20 on: June 10, 2019, 12:05:43 AM »

I don’t reveal what I’ve learned from others. I think you’ll be fine but make sure to solicit feedback from users so you don’t miss cases.

What I’m trying to obtain is more public knowledge in the statistically likely case that you lose interest or that we find we need more than you’re interested in developing. Zero themselves fall into his category.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

giacomo

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #21 on: June 10, 2019, 09:39:47 PM »

Hi everybody!

I'm new to this forum and to the Zero world, so let me do a quick introduction: End of 2018 I bought a new Zero SR 2018. I use it mainly for commuting and of course for some nice after-work tours. I very much enjoy this bike and until now everything works fine  8)

In my free time, I like to program Android apps, so I thought it would be a great idea to create an app for my Zero. What is the app about? It's about monitoring the charging state (remotely) and raise some triggers at some state of charge to carry out some kind of actions.

The name of the app is ZeroSpy and you can find a beta version here:
https://play.google.com/store/apps/details?id=com.bsc101.zerospy

How to use:
  • Install the app on an Android mobile, open the app and connect it to your Zero (not SR/F) via Bluetooth. This device should already be paired with your bike. You should now see some values like state of charge and so on.
  • Remember the AppID of this first installation, see screenshots.
  • Install the app on a second device, navigate to the remote page and enter the AppID of your first installation. You are now able to remotely monitor the charging state of your Zero. The first installation sends the data to a cloud database from where the second installation reads.
  • Triggers: You can define triggers (on the device connected to your bike) which execute when a specified SoC is reached. You can specify some URL which will be called. I use it this way: While charging, my Zero is plugged into a switchable power outlet, so I defined a trigger which turns off this power outlet at some SoC, for example 80% or whatever. So I can load to some level and automatically switch off the Zero. A second trigger calls a IFTTT webhook and this results in some notifications on my remote device. So while my Zero is charging in the garage, I do get notifications on another mobile phone.

Please note: This app is still beta, so there are probably still some bugs.

I would be glad if some of you would give it a try and provide some feedback! Thank you!

Boris

Hello Boris,

I was able to connect your app with my Zero SR '15 :). I have a Bluetooth switch and WIFI switch. I am not sure how to use the trigger. Can you give me some quick "How to" example?

Thanks,
Giacomo
Logged

I973

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #22 on: June 10, 2019, 11:22:00 PM »

Hello Boris,

I was able to connect your app with my Zero SR '15 :). I have a Bluetooth switch and WIFI switch. I am not sure how to use the trigger. Can you give me some quick "How to" example?

Thanks,
Giacomo

Hi Giacomo,

Which network switch do you have?

What you can do with these triggers currently is basically calling some URL you could also enter in the address line of a browser. I have a simple switch which I can turn on or off by calling this URL: 'http://192.168.1.83/control.html?STATE=1' or 'http://192.168.1.83/control.html?STATE=0'. The URL to call depends of course on what you want to do or on what switch you have.

I attached a screenshot of my trigger definition, please have a look. What happens is:
- Wait until 75% SoC
- Then wait 3 minutes
- Then call the specified URL
- Then disable the trigger

Hope this helps. Let me know if you need more assistance!

Regards,
Boris

Logged
Zero SR 2018

giacomo

  • Jr. Member
  • **
  • Posts: 93
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #23 on: June 10, 2019, 11:37:49 PM »

Thank you Boris,

this help a lot :).
I have a D-Link wifi switch and a Plugable Bluetooth switch(https://plugable.com/products/ps-btaps1/). I definitely can use the wifi switch as you did.
For the Bluetooth one, I may need to write some code, the manufacturer provides python library to control it :).

Thanks,
Giacomo
Logged

I973

  • Newbie
  • *
  • Posts: 20
    • View Profile
Logged
Zero SR 2018

tabarnakos

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #25 on: June 24, 2019, 04:11:09 AM »

@I973:  Did you publish your code somewhere, like GitHub ? I would be very much interested.

There's a free IoT platform called Thingspeak where you can send you data to (250k packets per year for free i think), and a bunch of free mobile apps with widgets that can display it.
Logged

I973

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #26 on: June 24, 2019, 05:48:28 PM »

@I973:  Did you publish your code somewhere, like GitHub ? I would be very much interested.

Hi tabarnakos,

No, the code is not published. Which part are you interested in? Probably the communication with the bike, I guess!?
Logged
Zero SR 2018

I973

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #27 on: June 25, 2019, 01:18:33 AM »

There's a free IoT platform called Thingspeak where you can send you data to (250k packets per year for free i think), and a bunch of free mobile apps with widgets that can display it.

Thanks for this recommendation! I played a little bit with ThingSpeak and you can already use it with my current app version: I added a trigger which sends the SoC every percent. I made this channel public (I am currently charging, startet at 50%): https://thingspeak.com/channels/808822

So I will probably add some more trigger features:
- make more data available for sending (charging rate, current, temp, and so on...)
- more events that raise a trigger

Nice  8)
Logged
Zero SR 2018

BrianTRice@gmail.com

  • Unofficial Zero Manual Editor
  • Hero Member
  • *****
  • Posts: 4014
  • Nerdy Adventurer
    • View Profile
    • Personal site
Re: Android-App 'ZeroSpy'
« Reply #28 on: June 25, 2019, 01:21:19 AM »

ThingSpeak does look interesting, but I'm unable to sign up right now and will check again later. Matlab is the tool underneath it which I've used often enough.
Logged
Current: 2020 DSR, 2012 Suzuki V-Strom
Former: 2016 DSR, 2013 DS

neographikal

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Android-App 'ZeroSpy'
« Reply #29 on: September 21, 2019, 10:16:53 PM »

I would be very much interested in the communication part. I would like to develop a solution for a esp32 which could expose the data through MQTT to my domotica (controlling charging) or through Lora... That would be appreciated!
Logged
Pages: 1 [2] 3 4