This site is being deprecated.

Please see the official X‑Plane Support page for help.

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: 10.0.0.5 (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.

...