Tuesday, February 18, 2020

Rotatable Screen Mirroring iPhones with a Raspberry Pi and Airplay Clone

Recently, I installed a TV on an articulating mount in the kitchen for both tv and recipes (for those interested, I used this mount).

I wanted to be able to screen mirror my phone for recipes and shows in both landscape and normal orientations. Unfortunately, nothing currently allowed for that.
Luckily I found an excellent open source air play clone called RPiPlay
They didn't yet have rotating functionality but I spent some time implementing it and adding it on my own branch here:

With the code above, rpiplay can be started normally for landscape or rotated with rpiplay -r 90.

I also went ahead and made that code a system service and created a node web button to start the system in rotated or normal display mode so that everything is headless. 

You access the node web button on your phone or computer with http://pi-ip-address:9000/ where there is a button for changing rotation.

Here is a video demonstrating the landscape normal orientation.

And here is another one demonstrating portrait mode with the TV rotated after I've rotated it with the rotate button on my phone.

Install info can be found in the install folder but for ease I have included an image below that is fully set up. Install it just like a normal raspberry pi image. Make sure you expand the filesystem and change the default password (raspberry) as ssh is enabled!

Feel free to contact me for any questions or if you have products or ideas you think I should try. Places you can find me

Consider donating here to support my tinkering habits.


  1. Hello Steven, I am new to Raspberry Pi. I downloaded the image of you and was able to project my iPhone. A really good thing.
    Only when I visit the website http://pi-ip-address:9000/ there is only a compass which is always turning.

    Can you please help me with this problem?

    Best Regards

  2. Is there something like this for android? I'd hate to buy an iphone just so I can use this feature.