tarbax
1
hey, i needs some help to configure influxDB sensor components
.
here is the query :
SELECT mean("value") FROM "autogen"."Grid" WHERE
$timeFilter GROUP BY time($__interval) fill(linear)
this the configuration in sensor.ymal
i did :
- platform: influxdb
queries:
- name: solar
unit_of_measurement: W
group_function: mean
where: '"name" = ''Solar'''
measurement: '"Solar"'
field: value
database: iotawatt
but i get an error:
Query returned no points, sensor state set to UNKNOWN: select mean(value) as value from “Solar” where “name” = ‘Solar’
tc23
2
Did you ever get a solution for this? I am getting the same error
Not OP, but I was having a similar struggle. I found it was easier to just run the query in Node-RED using the InfluxDB palette.
uiguy
4
I could also do with some help… my query inspector is as follows in influxdb:
Object
xhrStatus:"complete"
request:Object
method:"GET"
url:"api/datasources/proxy/1/query"
params:Object
db:"jtwq"
q:"SELECT mean("value") FROM "device_frmpayload_data_batt_V" WHERE ("device_name" = 'Protype2') AND time >= now() - 7d GROUP BY time(5m) fill(null)"
epoch:"ms"
data:null
precision:"ms"
response:Object
results:Array[1]
0:Object
I have created these sensors:
- platform: influxdb
host: !secret steamrockethost
username: !secret steamrocketinfluxuser
password: !secret steamrocketinfluxpw
queries:
- name: Battery Volts
where: "'device_name' = 'Protype2'"
field: value
# unit_of_measurement: '"v"'
measurement: '"device_frmpayload_data_batt_V"'
database: jtwq
group_function: mean