HT-301 Thermal Camera and Picture in Picture

Hello,
I am currently using an Actioncam connected via an HDMI-CSI-Adapter to the CSI port as the primary
camera and an HT-301 Thermal Camera connected via USB as the secondary camera.
The CSI input is working and I have a rather stable stream from my actioncam.
For the thermal camera I followed the steps in the docs: https://openhd.gitbook.io/open-hd/advanced-setup/using-an-ip-or-usb-camera-as-second-camera
and saw that there is already a GStreamer line for the HT-301 in the settings file together with the wiki
saying that the HT-301 is well tested: GitHub - OpenHD/OpenHD: OpenHD

So I simply uncommented the line and rebooted the AirPi, but on the GroundPi nothing has changed.
Also changing to /dev/video0, video1, or video2 does not make a change.
I also have enabled the Picture in Picture function on the GroundPi but still nothing. Do I have to switch the feed somehow?
Interesting is, that when I have both the CSI and the Thermal Camera connected, there are 3 video devices: /dev/video0, video1 and video2, and when I unplug the Thermal Camera, only /dev/video2 stays.

Does anyone have experience with this or any other thermal camera and have a working gstreamer line to share?

The pipeline is correct, leave it as is it. I think you forgot to enable bandwidth switcher. Set it to 1 in OHD settings.
Also take care the settings are set up equally both on groundpi and AirPi, then it should work.

I do have HTI-301 as well and it is the best thermal cam you can choose!

Take a look into the instructions on gitbook, it should work :slight_smile:!

https://openhd.gitbook.io/open-hd/advanced-setup/using-an-ip-or-usb-camera-as-second-camera

Thank you for the fast answer, i will try it today.

Can you explain me what exactly does the bandwidth switcher in this context? why it is important to enable it to use a second camera?

Ok, I reflashed both sd cards to make sure I have clean settings to start with.
I then setup the openhd-settings-1.txt as discribed in the docs:

and uncommented the HT-301 line.

I copied the settings file also to the GroundPi boot partition to make sure they have exactly the same configuration.

I booted up the GroundPi first and enabled the PiP function.
Then I booted up the AirPi with both cameras and 2 powersupplies, one 5.1V 2.5A on the micro usb port and one 5.1V 3A BEC on the GPIO 5V and Ground Pins.
The Wiring is done as discribed in the wiki to make sure all the components have enough current to work correctly.

But as before, there is no trace of a working thermal camera stream. I still see just the primary camera.

When both cameras would work, would I then see both camera feeds on the QOpen.Hd screen when i have enabled the PiP function or do I still have to switch something like an RC channel?

I would like to upload the openhd-settings-1.txt but unfortunately new members can’t upload attachments :confused:

openhd-settings-1.txt (25.2 KB)

Ok, my trust level was increased a few minutes ago,
here is my openhd-settings-1.txt of both AirPi and GroundPi

Do, you have assigned RC channels to switch between primary and secondary camera? As standard it is channel 7 for switching.

Wait, you’re using two Power supplies? Don’t! You could destroy your pi! Only use the gpio power pins.
Better check all of your hardware if it’s still working.

When you switch your assigned channel you should be able to see the Bitrate decreases. From usually 3 Mbit/s to about half of it (1Mbit).That indicates switching between only one stream or also the second (with less Bitrate).
Then switching to middle position should activate Pip, switching down to full size secondary stream . If that’s not the case, then there is sth. wrong with the pipeline, but that should not.
And if you are testing on your bench lower both TXpower of AirPi and groundpi to 20 - 30 to avoid overheating of your wifi card. This can be found in the upper lines of settings file.

The thing ist that I don’t use a joystick input on the GroundPi.
For RC and Telemetry I am using a Crossfire System, because it is in my case more reliable and easier to use.

But that should not be a problem because in the docs it is written: “Please be aware you can switch between the feeds from the main QOpen.HD interface as well without the need of a joystick connected to the Ground SBC.”
https://openhd.gitbook.io/open-hd/advanced-setup/using-an-ip-or-usb-camera-as-second-camera

But unfortunately it is nowhere described how.

Do you have any idea how?

No.,that information is wrong. This is a feature still in development and is not available yet, you need a RC to enable PiP. It’s not a problem if you use crossfire as long your FC is connected to AirPi. It recognizes your activitated RC channel, it mustn’t be RC via OHD

Ok, so to clarify my understanding:
The AirPi is streaming the primary feed, both feeds, or the secondary feed to the GroundPi depending on the RC value received by the flight controller.
Only when both feeds are send to to Ground the switching of the fullscreen feed is possible with the GroundPi and only when PiP is activated.

So the only thing I have to do now is to connect the AirPi with UART to my flightcontroller and when the serial interfaces are configured correctly, the AirPi will automatically recognizes and check the RC channel that I configured in the ohd settings file on the ChannelIPCamera variable.

Just for the desk I used two for experimenting because I had an undervoltage warning and to make sure it this is not the reason for my problem. I know it is critical to use two supplies against each other but I trusted the diodes on the Raspberry Pi on that.
In the worst case I fry the Pi’s USB power converter or one of my two supplies.
But for now all of my hardware is still fine, I checked :smiley:

Yes!!!
:grin:
The AirPi receives from your FCs UART telemetry and checks the state of all RC channels, no matter where its from.

I connected my AirPi with my flightcontroller. Telemetry is fully working now and I can see it all on the GroundPi.
For ChannelIPCamera I have assigned the channel 5 which is a 3 way toggle switch on my taranis.

But nothing happens when I move the switch, no bandwitdh decreasing, and no video feed switching.
I have also tried to assign other switches to the ChannelIPCamera variable, but none of the are working.

What kind of Wi-Fi cards do you use? Due to your description you set up everything right. pls let me know you actual settings, then I can maybe find the issue. Getting secondary cams to work is frustrating, I had this problems quite often in the past. But stay calm and relaxed, it will work!

I’m using an Alfa AWUS036NHA WiFi card on both air and ground, these have the Atheros AR9271 chipset. On the AirPi (Raspberry Pi 3 B+) the Card is connected like you can see here: GitHub - OpenHD/OpenHD: OpenHD
and here:

On the GroundPi (Raspberry Pi 4 B), the card is just plugged into the USB port. Because I have a one way simplex transmission of the Video, I usually don’t need much power on the GroundPi’s WiFi card.

This is the setup of the AirPi:


I build my own USB-C to USB-A adapter cable for the thermal camera but this is working fine. Tested on every device and does not have any loose contacts.

This ist the current settings file on both AirPi and GroundPi
openhd-settings-1.txt (25.2 KB)

Did you try to use only the thermal camera without the csi? just to be sure that it properly works

On any other device the thermal camera it is working fine.
I could give it a try to confige the AirPi to USB Camera only and test if there will be any stream

It could be a good idea; just to check OHD is properly configured with the right pipeline etc.

I had a problem to configure a usb camera that, plugged on the pc worked fine, on OHD instead, black screen! :sweat_smile:
solvede ATT