0 votes
asked by (33 points)
I'm trying to remotely control X-Plane via a Raspberry Pi using Python. I'm trying to control the gear up/down using DREF commands, but I'm not sure that this is correct.

I am sending the following message to turn on the pitot heater (just as a try):

UDP target IP: (machine running X-plane)
UDP target port: 49000
message: b'DREF\x00\x01\x00\x00\x00sim/cockpit/switches/pitot_heat_on\x00\' (padded with zeros to 509 bytes)

This is received by X-plane, but nothing happens. Any hints to what I'm doing wrong or any resource on how to proceed from here? Also what is the difference to sending commands to port 49000 and the DataRefs under the tab "Data Output" under "Settings"?

Thanks for helping out!
commented by (33 points)
There appears to be an error in the documentation. When using a float(1) instead of int(1) the command works fine.
commented by (10 points)
How do you know that xplane already receive your data ? I also have same project to send command from raspberry to xplane and I don't know how to deal with that
commented by (10 points)
Do you use socket to send message from raspberry to X plane ?

Please log in or register to answer this question.

Welcome to X-Plane Q&A, where you can ask support questions and get answers from members of the community.

This site is for X-Plane support questions only. Please search for existing answers before posting your question. Off-topic questions will be locked.

If you’re new, you’ll need to register before asking your first question.

If your question is answered, click on the check mark to select the best response.