Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support iFlow 1932 on Mac OS? #45

Closed
iainhay opened this issue Apr 10, 2020 · 145 comments
Closed

Support iFlow 1932 on Mac OS? #45

iainhay opened this issue Apr 10, 2020 · 145 comments

Comments

@iainhay
Copy link

iainhay commented Apr 10, 2020

I'm looking to set up my tacx trainer on my mac - is there something similar for mac? Or can this be run on mac OS?

@iainhay iainhay changed the title Supported for mac? Supported for mac OS? Apr 10, 2020
@WouterJD
Copy link
Owner

Hi Ian, welcome in the FortiusANT community!

I think FortiusANT will run on Mac and I willl help you in case there are issues, even adjust code if needed.

  1. Install python 3
  2. Download the code
  3. Run the code and see where we get

What Tacx do you have?

@iainhay
Copy link
Author

iainhay commented Apr 10, 2020

Hey - awesome thanks.

I have a i-Flow with a T1932 Head unit. I was setting up after many years put away and found out the tacx software has been discontinued and mine doesn't work with the desktop app.

So I have x2 ANT+ sticks which arrived so trying to get this set up (ideally with Zwift)

I'll install python 3 and see how I go - not used Python before, it's the FortiusAnt.py I need to run once downloaded correct?

Huge thanks in advance!

@WouterJD
Copy link
Owner

WouterJD commented Apr 10, 2020

Indeed, read wiki for instructions
Succes!

@iainhay
Copy link
Author

iainhay commented Apr 10, 2020

Hey!

So got the app working, it tries to calibrate, and I see this error message a few times in the terminal:

18:40:13,839: ReadFromDongle read error: [Errno 60] Operation timed out

And then the error it stops. I see all the dials as if it is sending/receiving.

Screenshot 2020-04-10 at 19 41 58

Is calibration meant to automatically turn the trainer wheel to 20km p/hr? Been so long since I've used it couldn't remember if that was possible?

@iainhay
Copy link
Author

iainhay commented Apr 10, 2020

Also - if I start without calibrating I get the same error repeatedly (it doesn't stop)

18:40:13,839: ReadFromDongle read error: [Errno 60] Operation timed out

@WouterJD
Copy link
Owner

There someone else with an i-Flow/1932 and it seems that calibration does not work
Use the -n flag (no calibration) and see what happens

@iainhay
Copy link
Author

iainhay commented Apr 10, 2020

Yes if I start without calibrating I get the same error repeatedly (it doesn't stop)

18:40:13,839: ReadFromDongle read error: [Errno 60] Operation timed out

Screenshot 2020-04-10 at 19 51 20

@WouterJD
Copy link
Owner

run with -d8 flag and send logfile please

@iainhay
Copy link
Author

iainhay commented Apr 10, 2020

Sure thing! I noticed someone had a similar issue on mac with antifier but no solution was every posted.

FortiusANT.2020-04-10 21-06-08.log

@WouterJD WouterJD changed the title Supported for mac OS? Support iFlow 1932 on Mac OS? Apr 10, 2020
@WouterJD
Copy link
Owner

WouterJD commented Apr 11, 2020

I have checked the logfile:

From 21:06:09 ... 21:06:11 message "[Errno 60] Operation timed out"
Then commands are sent (you probably pressed Start)
From 21:06:11 ... 21:06:33 als message "[Errno 60] Operation timed out"

But then it appears normal operation; FortiusANT sends command and receives an answer.
From 21:06:33 ... 21:06:53

Note that it is all within a minute.

Some questions:

  1. Do the messages continue to appear?
  2. What happens if you start cycling
  3. Could it be that your system needs some time to start?

Sorry that I cannot check myself...please try ans see what happens!
Succes

PS. There is another user with an iFlow 1932. So .... fair chance it can work

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

  1. Do the messages continue to appear? - Yes, repeatedly
  2. What happens if you start cycling - within the app open I see the speed and power dials (I have a cadence too but not connected)
  3. Could it be that your system needs some time to start? - Not sure what you mean?

I have x2 ANT+ dongles plugged into the mac, along with the USB from the trainer.

If I have only 1 ANT+ dongle connected, I receive the same message repeatedly.

@WouterJD
Copy link
Owner

The provided logfile shows that the messages stop (see my message from yesterday)
3. It may be that yoour Tacx needs some time to start and that messages disappear later-on

Provide logfile over more time than just one minute, please. Let's say 10 minutes at least.

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

I can see the speed etc immediately when I start pedaling, so the trainer sending the data doesn't seem to be the issue.

10min log file attached - the previous one was a minute because I only ran it for a minute (as it's just repeating over and over) - it just repeats, to end I clck stop (the errors still come through and the close the app and it exist in the terminal.

Thanks!

FortiusANT.2020-04-12 11-34-58.log

@WouterJD
Copy link
Owner

WouterJD commented Apr 12, 2020

Sorry * 100

ReadFromDongle has nothing to do with the Tacx trainer, but is generated at the ANT usbDongle side. (As the error message says).

Check in antDongle.py

    except Exception as e:
        if "timeout error" in str(e):
            if debug.on(debug.Data1):
                logfile.Write ("Dongle    timeout")
            pass
        else:
            logfile.Write ("ReadFromDongle read error: " + str(e))

The code expects "timeout error" in the error-message, but (on your system) the message is "ReadFromDongle read error: [Errno 60] Operation timed out" and hence the error is given and not ignored as it should be. Note that the exception handling does not alter any data but only logs the error message.

You may simple ignore the message or replace "timeout error" with "timeout" and see what happens; behaviour should be the same in both cases.

I do not like this construction (checking text in message) and will check how to improve.

Please let me know...

@WouterJD
Copy link
Owner

The correct code would be:
except TimeoutError:
pass
except Exception as e:
logfile.Write ("ReadFromDongle read error: " + str(e))

If you don't mind checking that, then it's confirmed on your platform and I will implement in the baseline. Thanks

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

So replacing this:

except Exception as e:
        if "timeout error" in str(e):
            if debug.on(debug.Data1):
                logfile.Write ("Dongle    timeout")
            pass
        else:
            logfile.Write ("ReadFromDongle read error: " + str(e))

with:

except TimeoutError:
      pass
    except Exception as e:
      logfile.Write ("ReadFromDongle read error: " + str(e))

Still gives me:

13:06:22,863: ReadFromDongle read error: [Errno 60] Operation timed out

Repeated.

I also open Zwift with the app running, I can connect via Power Source and ANT+, but it receives no data (e.g. I start peddling but don't move or see any power). In the app I still see Power and Speed - but this is coming via the USB presumably.

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

If I change to this:

except Exception as e:
        if "timed out" in str(e):
            if debug.on(debug.Data1):
                logfile.Write ("Dongle    timeout")
            pass
        else:
            logfile.Write ("ReadFromDongle read error: " + str(e))

And just check against 'timed out' then the error goes, but I'm still not receiving any data in Swift - no power etc. So it is like the receiving ANT+ dongle is not receiving the data?

@WouterJD
Copy link
Owner

OK, you're doing good.

Please run FortiusANT with -d4 this will provide the ANT logging.
Sorry for keeping you budy on this sunny easter day :-)

https://github.com/WouterJD/FortiusANT/wiki#values

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

Okay cool - attached is the log file (kept on for 10mins).

No worries - thanks for helping me with this!

FortiusANT.2020-04-12 13-54-21.log

@WouterJD
Copy link
Owner

OK logfile looks good, but indeed - no commands are received from Zwift.

Did you pair Zwift with FortiusANT?
Note that a master (the trainer, FortiusANT) is unaware whether a slave (Zwift, ...) is looking at or pairing [with the master]..

Please send screen-shot of pairing-page, something like:

image

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

Okay great.

So here is what I am doing - just listing in case I'm missing something:

  1. Plugging in the USB from my trainer
  2. Plugging in both ANT+ dongles
  3. Running the FortiusANT app (skipping calibration)
  4. Opening Zwift

Here is what I see in Zwift:

Screenshot 2020-04-12 at 16 10 07

(This is the only available device)

@WouterJD
Copy link
Owner

Checking the screen-print from FortiusANT (Trainer detected, Using Dynastream...) the hardware is found correctly and I would expect things to work. The logfile shows that data is transmitted.

What happens when you press SEARCH on cadence and controllable?
Both should should be paired with FortiusANT.

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

No nothing - I just get the searching screen..

Do I need to do anything to the ANT+ dongles? I read about having master/slave etc?

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

For some reason the Heart Rate one picks up an ANT+ device and connects, but not Cadence or Controllable. Power Source connects but receives not data

@iainhay
Copy link
Author

iainhay commented Apr 12, 2020

Also, if I simulate (with -s) I get the same results

@WouterJD
Copy link
Owner

No nothing - I just get the searching screen..

Do I need to do anything to the ANT+ dongles? I read about having master/slave etc?

master/slave is decided by software; a trainer is master, Zwift is slave

@WouterJD
Copy link
Owner

Also, if I simulate (with -s) I get the same results

-s simulates a trainer, this comes handy in this case - you do not need to cycle to test Zwift.
Good idea to use it

@WouterJD
Copy link
Owner

For some reason the Heart Rate one picks up an ANT+ device and connects, but not Cadence or Controllable. Power Source connects but receives not data

What is the deviceID of the heart rate monitor?

@M4M4R2
Copy link

M4M4R2 commented Apr 16, 2020

@WouterJD This is what I get following your steps. Zwift seems to be taking the data from the simulated trainer. At least my character is pedalling!
Capture d’écran 2020-04-16 à 10 30 16

@WouterJD
Copy link
Owner

Well, you have done the job.
Could you please drop some notes what you had to do to install FortiusANT and what dongles you use. This might be helpful for @iainhay and I will update the wiki

@WouterJD
Copy link
Owner

And @M4M4R2; now remove the -s flag and "Ride On" ... like to see you on strava with results!

@M4M4R2
Copy link

M4M4R2 commented Apr 16, 2020

Ok I'll try a test ride without simulation this evening after work! IIt's 11 AM here over!
I'll try to write a few notes if I remember all the steps I followed!
I hope this will help!

@WouterJD
Copy link
Owner

Same timezone here...

@M4M4R2
Copy link

M4M4R2 commented Apr 16, 2020

So for some reasons I ended up here tonight
Capture d’écran 2020-04-16 à 19 22 21

Your magics seems to really be working!
I didn't use the all flags to run FortiusANT.py instead I ran it making a few turns of wheel for calibration which displayed some data (speed etc) and then 1 time "control c" to stop the calibration process but to keep both dongles live et voilà! (As we french frogs say)

@WouterJD
Copy link
Owner

That sounds good, @M4M4R2 . Welcom "France" let's say and "say hello on strava" as I usually respond :-) Would like to see your ride there.

@iainhay your could check with @M4M4R2 on your configuration to check whether it's software or (one of) the dongles. CU all!

@iainhay
Copy link
Author

iainhay commented Apr 17, 2020

I've been through this and believe my setup is the same - I have a newer mac and version of MacOS but I'm doubtful that would be an issue.

@M4M4R2 can you let me know what ANT+ dongles you are using? Want to try and get the same that either you or @WouterJD have to remove that from the equation!

@M4M4R2
Copy link

M4M4R2 commented Apr 17, 2020

@iainhay Hi!
It's a pair of basic dongles I purchased on Amazon product ID 1008 made by TAOPE. Right now when I click on my purchase Amazon displays a smaller one maybe a newer model.
Image

@WouterJD
Copy link
Owner

WouterJD commented Apr 17, 2020

How do the old ones look like?
Do they work?

@M4M4R2
Copy link

M4M4R2 commented Apr 17, 2020

yes they do!

@M4M4R2
Copy link

M4M4R2 commented Apr 17, 2020

This is the one I bought!
"not available" unfortunately

@WouterJD
Copy link
Owner

@iainhay how is progress? Did you find alternative ANT+ dongles?

@iainhay
Copy link
Author

iainhay commented Apr 18, 2020

I've ordered some, once they arrive will check back in here!

@WouterJD
Copy link
Owner

Capture d’écran 2020-04-16 à 19 22 21

Your magics seems to really be working!

@M4M4R2 How are things going, I recall you posted a question. iFlow is treated equal to Fortius. I would like to know whether this is correct.

Also I see following remark:
According to me no data is sent back to the trainer. At least in my case (Tacx Flow + 1932 head) when in use with Zwift the resistance seems to be fixed. The difficulty is increased (slope simulation) by slowing down the speed of my character for the same pace on the bike.

I decide to bring the question into the iFlow issue.

@WouterJD
Copy link
Owner

I've ordered some, once they arrive will check back in here!

Hy @iainhay how are things going?

@iainhay
Copy link
Author

iainhay commented Apr 24, 2020

Hey @WouterJD - hopefully they will arrive today, post is all delayed a bit because if the lockdown.

As soon as they arrive I'll be testing them so will update this right away...fingers crossed! 🤞

@WouterJD
Copy link
Owner

Good luck :-)

@iainhay
Copy link
Author

iainhay commented Apr 24, 2020

Just found out they will arrive on Monday! Will test out as soon as they arrive 🤞🤞

@iainhay
Copy link
Author

iainhay commented Apr 27, 2020

Hey @WouterJD

My new ANT+ sticks arrived, plugged in and getting expected results with FortiusANT in simulation mode and ExplorANT!

Stopped ExplorANT and open Zwift:

Screenshot 2020-04-27 at 16 36 44

Result! Just going to hook up my bike on my trainer and have a go!

Thanks so much for all your help - no idea why the ANT+ sticks I had didn't work. They were CYCPLUS ones, the ones I ordered are her for anyone else needing to buy some, I can confirm these work: https://www.amazon.co.uk/gp/product/B01M4NFENM

@M4M4R2
Copy link

M4M4R2 commented Apr 27, 2020

Let us know want you think of the resistance feedback of the trainer please!

@iainhay
Copy link
Author

iainhay commented Apr 27, 2020

So in Zwift everything works great - going to use it regularly now, I've tried it out with TrainerRoad too - in TR is seems really delayed (which is fine if you know it's delayed and I would expect a little delay anyway) but the Cadence remains at 0, not sure why thought as Zwift picks this up?

I'm also really keen to try Rouvy, I see their latest update say ANT+ coming soon so will have to wait for that!

Will come back with any feedback or issues, but so far so good!

@WouterJD
Copy link
Owner

Check #65 on CYPLUS :-(
Sometimes it happens that you need a full reset on dongles to work well (switch off system, remove dongle, power up and insert again); the kind of behaviour I sometimes see on Windows as well. Full reset then helps.
As you know, Trainer Road, Zwift and Rouvy all work.

I consider FortiusANT on MAC as closed for now.

@WouterJD
Copy link
Owner

Let us know want you think of the resistance feedback of the trainer please!

FortiusANT has different calculations for iMagic and Fortius (ref usbTrainer, def Resistance2Power(Resistance, SpeedKmh) LegacyProtocol) and the calculations are related to the interface type, not the tacx trainer.

Please raise an issue and explain what configuration you have and let's see.

@iainhay
Copy link
Author

iainhay commented Apr 27, 2020

@WouterJD yes all good now - and hope it helps people to not get the Cycplus ones - they say they work with Zwift etc though.

Thanks again for all your help - happy to help test out or help on any mac related issues, just @ me and would love to help where I can!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants