Now when you ssh in the raspberry pi, it opens directly the mitmproxy interface

Set your smartphone to join the "MitM" access point. In order to decrypt encrypted traffic, you need to install the mitmproxy certificate, once you logged on the "MitM" AP, you can find it at the local address: http://mitm.it