fsa317
(Frank)
November 6, 2017, 11:14pm
1
I created a custom climate sensor using MQTT (its mostly working):
climate:
- platform: mqtt
initial: 58
name: "Wine Room Temp"
temperature_command_topic: "myhome/wine/setdesiredtemp"
temperature_state_topic: "ha/wine/DesiredTemp"
current_temperature_topic: "ha/wine/Room Temp"
modes:
swing_modes:
fan_modes:
However, I am trying to track the temperature and various states in InfluxDB. I have the following config:
influxdb:
host: 127.0.0.1
username: home-assistant
password: hapass
database: home_assistant
include:
domains:
- climate
entities:
- binary_sensor.entrance_motion
It’s creating series that don’t seem to work, is the issue the special character?
°F,domain=climate,entity_id=wine_room_temp
Any tips?
gpbenton
(Graham)
November 7, 2017, 6:28am
2
I have plenty of series with °C
so, I don’t think it is that. What isn’t working?
fsa317
(Frank)
November 7, 2017, 2:20pm
3
I don’t see any data:
> show measurements
name: measurements
name
----
binary_sensor.entrance_motion
binary_sensor.front_door
°F
> show series
key
---
binary_sensor.entrance_motion,domain=binary_sensor,entity_id=entrance_motion
binary_sensor.front_door,domain=binary_sensor,entity_id=front_door
°F,domain=climate,entity_id=fin_temps
°F,domain=climate,entity_id=wine_room_temp
°F,domain=sensor,entity_id=living_room_thermostat_temperature
> select * from °F,domain=climate,entity_id=wine_room_temp
ERR: error parsing query: found °, expected identifier at line 1, char 15
> select * from "°F,domain=climate,entity_id=wine_room_temp"
>
> select * from "°F,domain=sensor,entity_id=living_room_thermostat_temperature"
> ^C
>
gpbenton
(Graham)
November 7, 2017, 2:28pm
4
When I write a query like that, I don’t get any data either. Grafana interrogates the database for me, and it comes up with a query like
SELECT "value" FROM "°C" WHERE ("entity_id" = 'lounge_temperature') AND time >= now() - 2d
which does return some results
fsa317
(Frank)
November 7, 2017, 3:55pm
5
Thanks, so there was some data there. My issue now is that some fields (operations_mode_str) are stored in text as “Off” or “Cooling”. Is there anyway w/ Grafana to use that data to show something like when it was cooling or off on a timeline? Doesn’t seem to work for me.
Or is there perhaps a way to set a script or automation so that when the data is written to influx it translates it from Cooling to 1?
gpbenton
(Graham)
November 7, 2017, 6:09pm
6
Everything I want in grafana I have as a number, so I can’t be much help I’m afraid.
The best thing I can think of is using another sensor as a number to track the thing you want, but duplicating data never sounds like a good idea.
fsa317
(Frank)
November 7, 2017, 7:07pm
7
Yea, I guess I could create a template sensor that translates the values? I’m still knew to this so I’m not sure what the best options are.