Logstash filter conditions

hi there, sorry to bother you but i´m completely new at this , I´m using version 7.9.2 of Elastic,Kibana ,Logstash and Beats , i successuflly connected them to a MQQT broker ang got some information about camera analytics . I want to filter only the timestamp, from the message ,only the motion=0 or 1 and the first level of topic since this is the sender information , I managed to apply some filtering but i fail at the rest . i´m lost here ,can you help me? this is my pipeline.conf :

The # character at the beginning of a line indicates a comment. Use

comments to describe your configuration.

input {
beats {
port => "5044"

The filter part of this file is commented out to indicate that it is


#filter {}
filter {
prune {
whitelist_names => [ "message","@timestamp" ]
whitelist_names => [ "mqtt"]
output {
stdout { codec => rubydebug}
elasticsearch {
hosts => [ "localhost:9200" ]

Thank you in advance for the help!
this is how the message looks like