#HELP# building an Pan-Tilt Webinterface for Pimoroni Pan-Tilt HAT FULL KIT with Webcam Server


Ok, thanks for the info. Actually I’m busy doing exactly this right now. But if you’d have had a version w/o neopixel support I might have used that one. Thanks a lot anyway.


Hi Dave
I do have another question though: For HTTP_PORT and WS_PORT could I use any other unassigned port numbers than 8082 and 8084 respectively or is there a requirement to use exactly these?
Thanks, Fritz


No requirement other than the usual UNIX limitation that ports <1024 require root privileges to open. Other than that, use whatever you like.


Great. Thanks a lot.


Hi there. Thanks for the great info on this thread. Special thanks to @waveform for your work. I’ve managed to get it all up and running and it works perfectly on my local network. I’ve done the port forwarding stuff on my router but when I view it from an external computer I get the main page but not the video. It doesn’t get past the ‘loading…’ message. Any ideas?


Hi Chris, you’ll need to forward both ports (HTTP and WS, i.e. 8082 and 8084 by default), and tweak the index.html so that the websocket address is external (it’s your internal IP by default). There’s a bit more info in this ticket on the pistreaming github which should point you at the right bit to modify.

Good luck!


Result! Thanks Dave.


I would like to integrate the pan-tilt hat + camera into home-assistant running on another pi.
I can add the video stream as a generic IP camera but to control the pan-tilt I could use a shell command or preferably MQTT. Before I reinvent the wheel I wonder if anyone has implemented this or similar?


Quick update, am able to add the pan-tilt interface to the home-assistant front end as an ipanel. Works well from my wall tablet but would still be nice to add MQTT control


Got basic control of the pan-tilt from Home-assistant, discussed on https://community.home-assistant.io/t/pan-tilt-zoom-pi-camera/24202/3


Hi, tried this twice now and the camera works fine but don’t get the ‘Initializing HAT’ message when I run it and, sure enough, there are no pan or tilt controls. Help.


All sorted. For some reason, the git clone didn’t work and the server.py file was different/corrupted from the original.

For anyone one else running this on Raspbian Stretch, you have to enable I2C through raspi-config as well.