Open exadeci opened 1 year ago
Code is missing to support Pint X and GT. It is hard to work on things without having the devices. I now have a GT, just need time to add support for it. Adding support for it should uncover any issues that the Pint X has and in theory should just work.
@beeradmoore I could probably do a PR, would you be able to give me a short list of what to look for and update?
There is a branch with I think a fair bit of changes (feature/ride-recording
) which should be the next branch to be merged to develop and pushed out so ideally you'd branch off that. I don't recall if that branch is currently building or not 👀
At minimum it would be:
Not sure if I am forgetting things and not sure what other surprises you may come across. But a PR with work (even if initial and not complete) would be amazing.
@beeradmoore I get a loop on the JumpstartAlert. So you get that message:
Was that the correct procedure? Would it be due to my changes?
That is the correct procedure. Either something has changed and this no longer works or you need to be quicker. Ideally OWCE would try auto connect when you swap back to it to help with the speed of needing to do all this. Additionally having the key yourself means we can put it on OWCE servers and you no longer need to do any of this nonsense. But that is an update in another app elsewhere.
A little bit of history of why we need to do this, if you already know feel free to skip: What is happening is board is "locked" and won't return any values for anything except HW/FW revisions. To unlock we need to get a token which is generated from a key we can read from the board. Some (plus and and XR with <= 4134 fw) HW/FW can calculate the token locally in Handshake() method . If you are on anything other than that the app needs to get the token from the server as they have changed the algorithm for the token. There was an update to do this but FM blocked us doing this within the first week of rolling it out. So instead, what you want to do is connect with the FM app and let it do the unlock. When you see "activated" that is when it is unlocked.
There is a time limit from when its unlocked to when we have to send some data to it to keep it unlocked. So if a user goes slow from seeing the activated screen the board may lock itself before they get back to and connect with OWCE.
To determine if a board is unlocked we just try read ride mode. If it's 0 the board is locked, if its anything else it is unlocked.
So it's possible that: A) You're not doing the jump quick enough. or B) They patched things and this method of unlock no longer works on Pint X and up.
I'd check you are going fast enough (does not have to be at the speed of light, but also can't doodle), and then double check your logic around where that jumpstart alert is and see if you got an if statement crossed up and its going down the wrong flow.
Thanks a lot for the context, I'll try and compare with the live app as it had worked with it.
Hey @exadeci , just letting you know that the feature/ride-recording
branch has been merged into develop and has rolled out. If you had anything to merge in later with a PR and can't see that branch anymore that is why.
Did you have any time to tinker with the handshake stuff?
@beeradmoore Haven't had much time to look at it. Though I've tried again today with your last release and I can't seem to get the setup pop-up Here's a recording of what I do, I think I'm being quite fast but it doesn't seem to work: https://streamable.com/vccm0u
That looks like it's plenty fast enough. Could be possible that this little trick no longer works 🥲
Hi, just to bring another feedback; I have successfully connected OWCE build 82 to a Pint with help of the FM app trick in the past, but now I have a Pint X and I'm unable to connect OWCE to it. It will generally ask me to open the FM app again and again. I tried build 82 and 85. That tends to confirm they patched something. My Pint X has HW 7314 and FW Gemini 5076.
I was able to connect to my new Pint X. I was experiencing the looping "open the official app" thing, but I got past that finally by not following the instructions exactly... where it said to "force close the official onewheel app then come back to OWCE", that didn't work, so instead I just left the official onewheel app running in the background and then came back to the OWCE app and it worked.
I was able to connect to my new Pint X. I was experiencing the looping "open the official app" thing, but I got past that finally by not following the instructions exactly... where it said to "force close the official onewheel app then come back to OWCE", that didn't work, so instead I just left the official onewheel app running in the background and then came back to the OWCE app and it worked.
I just got it working too with build 88 and leaving the FM app in the background. 👍
I forgot this thread (thanks for the bump @GuillaumeGendron) with the recent pre-release. Android build 88 contains possible Pint X support that requires testing.
This can be download from here, I'd love to hear how it goes.
@beeradmoore Most features seem to work with the PintX, the only that doesn't is the live Current but the Trip usage part works and also the regen part. The battery percentage works but not the cell voltages. The rest seems fine even the profiles.
The procedure that seems to work for me is:
Thank you!
Thanks for the quick feedback.
The current not working is an odd one. Maybe it's no longer reported from the board 🤔. You would be able to check if you:
Start ride recording
(additionally you can enable auto ride recording from settings so you can skip this step next time you connect, plus we get all the startup data)Stop ride recording
Past Rides
Learn More
This will bring up the raw data the board sent to the app. On the left is the data name, on the right is the raw data from the board itself. Working on ways that both this data, and data exports will contain the correct human readable values. In theory if you scroll this list you should be able to see a value called CurrentAmps
. I see this about 40 entries down on my Plus.
Regarding connecting, I think we can improve the app swap screen. When it shows it should disconnect the board, it should tell the user to go back to FM app, connect+close, then come back and hit "ok", hitting ok should then do the work behind the scenes and be on the lookout for that board that you originally tried to connect with. (Would also ideally be better to just not have this anymore, there is a plan for that).
@beeradmoore
{
"timestamp": 1681171044282,
"property_uuid": "E659F312-EA98-11E3-AC10-0800200C9A66",
"property_name": "CurrentAmps",
"raw_data": "00-00"
},
@exadeci , assuming it does not spit out any data when you get the wheel to go vroom then its possible (explained below) then its possible the data is no longer accessible. Thanks FM!
The app will first read a bunch of values (CurrentAmps is one of them) and then it will subscribe to a bunch of values for updates. If the board is idle it's possible it reads 0 for the first read, although my Plus didn't. Then when you pick up the board and make it engage the motor the current should be flowing and the subscribed value should be updating and we get more values in the log. IF the current is never updated on the board then the app will never get any updates. So assuming CurrentAmps is only in that log once then the value is nuked.
@beeradmoore Tested on a ride of several minutes and there's only that one first enpty read showing. Also this might need its own ticket but turning off the wheel makes the past rides menu unable to open. I had to close the app and open it again to see them (without the wheel connected)
I've installed: Android - build 82 And this is what I get:
The lifetime km are missing and it doesn't get the Ride modes. Is it due to the Pint X being missing in the code or is it meant to match with the Pint one?