Listen_event not trigger

Hi, I am trying to use the listen_event to get the camera capabilities when the app connect to the drone. however, the listener is never trigger. below is my code snippet, could you help to take a look? thanks!!

import time
import os
import olympe
from olympe.messages import camera

olympe.log.update_config({"loggers": {"olympe": {"level": "INFO"}}})
DRONE_IP = os.environ.get("DRONE_IP", "")

def print_event(event):
    if isinstance(event, olympe.ArsdkMessageEvent):
        max_args_size = 60
        args = str(event.args)
        args = (args[: max_args_size - 3] + "...") if len(args) > max_args_size else args

class CameraCapabilitiesListener(olympe.EventListener):
    def onCameraCapabilities(self, event, scheduler):

def test_listener():
    drone = olympe.Drone(DRONE_IP)

    with CameraCapabilitiesListener(drone) as listener:

if __name__ == "__main__":


Only event messages may be monitored with a listener. The camera.capabilities message you are using here is part of the camera2.Event.State event message that you should be using instead.

Thank you for your reply. Do you mean I should use camera2.Event.State instead? however, we are using anafi and anafi thermal, does camera2 feature also support these two models?

This topic was automatically closed after 30 days. New replies are no longer allowed.