I build a Zwift connected fan


(Just Vervaart) #1

I build a Zwift connected fan that blows more wind as you go faster, to simulate real world conditions in my pain cave. If anyone is interested, i will make a manual on how to build your own. Also here is a video of the fan in use (turned backwards to show the moving parts). https://photos.app.goo.gl/DX1hgXk7IufHDHkj2  

update: Here’s the manual. https://www.instructables.com/id/Internet-Connected-Fan-for-Use-With-Zwift Hope you manage to rebuild it. If you have any questions or suggestions, let me know!


(wai loon) #2

Cool! Could you share how to do it?


(Just Vervaart) #3

Sure. I’m working on a manual. Will post it here when complete. 


(Paul Cooper - Fuelled by Plants) #4

V. Cool


(Just Vervaart) #5

Here’s the manual. https://www.instructables.com/id/Internet-Connected-Fan-for-Use-With-Zwift Hope you manage to rebuild it. If you have any questions or suggestions, let me know!


(wai loon) #6

Nice! Very detailed step by step and seems easy enough to follow.

Will try it out soon and hopefully can post some pics afterwards. 

Cheers


(Just Vervaart) #7

I added some ‘pro’ features to the manual to adjust the script to use your heartrate or power output as input for changing the fan-speed. 

If you want your fan to react on different metrics like your heart rate or power output you can change

status.riderStatus.speed

into 

status.riderStatus.heartrate or status.riderStatus.power

Be sure to print the metric to you terminal to see the value’s that Zwift returns. You can do so by adding 

console.log(status.riderStatus.power); 
console.log(status.riderStatus.heartrate);

If you want to see everything Zwift return about you during a rider use

console.log(status); // JSON of rider status

(V ROOM) #8

Kickstart a more polished and powerful version of it. Would do well. Needs different options, such as choosing fan speed in relation to in game speed, or power, or effort.


(Just Vervaart) #9

@V ROOM the thought had crossed my mind, and maybe you are right, but I don’t have the ambition to go into the production of Zwift fan’s. As soon as you start asking money for something, the fun is most of the time over, and the headache begins…


(V ROOM) #10

Yes! It would consume a couple of years of your life and possibly bankrupt you.

On the other hand, you could make a million too but it’d need to work on all platforms. Sufferfest etc. It would corner the market if done right. 


(Just Vervaart) #11

If Pebble with a 10 million Smartwatch kickstarter doesn’t make it… and if your successful some Chinese manufacturer brings a cheap copy on the market. I’m happy the way my life is, tinkering on fun projects, riding my bike, and doing work thats meaningful. 


(Thomas Zeutschler) #12

Cool idea, very cool project. I will check if my wahoo kickr allows multiple bluetooth host connections. If yes, I will try to build smart fan for it. Many thanks for this brilliant idea.

Kickstarter would be a nice idea. But this idea should be handed over to a Fan Company. A generic smart fan would be a great idea with various applications. @JustVervaart: Hand this over to Dyson and ask for a beer (or two) in return…

 


(Just Vervaart) #13

@Thomas, thx for the compliment. You don’t need to connect the fan to your trainer, the fan talks to Zwift for your speed (or power / heart rate) via the internet (wifi). I fan company is an option, but i think a trainer company like Tacx is a more logical option maybe? 


(Just Vervaart) #14

Cool! The Zwiftfan is #HackOfTheMonth on the GCN-show. https://www.youtube.com/watch?v=iA927OgEcQw&t=1005s


(Armin bikechimps.de) #15

very very good work…i have tried to get people which knowledge to help me design an api which is able to read the gradient, as i am working swiftavator which is supposed to lift your front when gradient changes…

i had no luck…

Does your api read gradient?

i ended up designing an easy rockerplate as seen on bikechimps.de

Maybe we could join to get the fan going on a lifter :slight_smile: for the front in one step, with one electronic…i am also doing it just for fun…

Once again congrats for your great design and the fame beeing the hack of the month on GCN 

Armin…, bikechimps


(Just Vervaart) #16

Hi Armin,

thanks for the compliments. First of all, it’s not my API, it’sby the mysteries Ogadai https://github.com/Ogadai/zwift-mobile-api

i can’t test things right now, but it seams that there is some data on climbing in the API. I see the following;

lean: 1000000
climbing: 0
  altitude: 14478.4609375

All could have something to do with gradients. Best is to install the right script on a computer that runs Zwift and see what the output is when you ride up hill. You have to uncomment this line in the script to see this. 

_console.log(status); // JSON of rider status\_  

What you could do for sure is check the altitude and speed every second. You could then calculate gradiënt. (meters up / meters forward) https://www.mathsisfun.com/gradient.html 

Good luck with the project.

Greetings,

Just Vervaart


(Sebastian Linz) #17

Hi Just,

thank you for your pioneer work. I didn’t knew the photon before. With your instructions and Ogadai’s lib I built an improvement for me.

Now the second version of the photon relay shield is available,

which I could completely integrate in the case of my fan.

So my fan is only connected by wire to power connection.

On my notebook runnig the Zwift client I’m running my node.js-application. The node.js-application provides a way to manually control the fan or control the fan by my Zwift-ride. Therefore the app, which makes the calls to Zwift using Ogadai’s API and provides a simple text HTTP interface to the photon. There are two Zwift-modes: simulation and workout. Simulation is like what you implemented and workout controls the fan based on my power levels. Furthermore the node.js.application provides a web-UI so I can control it riding on Zwift with my mobile phone:

Finally I added a favicon so I can call the web-app from home screen:

Thank you very much and RIDE ON!

Sebastian


(Just Vervaart) #18

Hi Sebastian,

nice work. I like the way you integrated in into the fan and love the web interface you have build. Would you like to share your code so i can add it to the github repo https://github.com/justusvervaart/zwift-fan and to the instructable manual https://www.instructables.com/member/justvervaart/instructables/ And i for sure would love to use your web interface instead of the script editing i have to do at the moment to change modes. 

Greetings en happy riding,

Just

 


(Sebastian Linz) #19

Hi Just,

you can find the code on github (see: https://github.com/sebastianlinz/FanControl). It need some documentation and refactoring, I’ll provide next days/weeks.

Regards,

Sebastian


(Just Vervaart) #20

Hi Sebastian, 

impressive work. If you could make a installation manual that would be great. Would love to change my config to yours.

Greetings, Just.