InfluxDB data points plotted but not found by query

Hi,
We are trying to get data from a influxDB database, plot it with grafana and use it to send a notifcation to a telegram bot when the data value fits particular conditions. We managed to do the fetch and plot things but trying to do the third we are having a lot of trouble. In particular our data plot is full of data points but when we show the query results, the array is full with couples [timestamp, null], and we don’t get how it could plot the right data with null as a value(I mean the data on the plot are correct). Because of this, grafana is unable to feel the data fetched by the query and use them to perform the alarm verification. Furthermore we would ask if anyone has already done something similar and know how to build a query and an alarm condition to do something like that(send an alarm notification when a certain value goes below or over a fixed threshold. PS : We are using grafana 6.1.0 on raspbian. I put below some screen of my settings to make you understand my situation.

Up → our plot and query, Down → what we get from query inspector:

On the left → alarm details, On the right ->what we get bye Test Rule:

Thanks in advance.