Save state-informations in influxdb for OFF/False/0 states

I would like to get some suggestions/opinions.

Receiving 60 different state bits via Rest-Api.
E.g.: Pump is active or not active. Receiving this information every minute 24/7 results in 525600 datapoints per year.

Via grafana I’m only interested in this values - assuming non existing points represent the OFF/False/0/inactive states.

Describing this fields via measurement/tags is already in place.

Is it okay, to send only the ON/True/1/Active informations to influxdb?

I would say yes. Then use Grafana (or InfluxDB query) to aggregate the data to show you only the ON/True/1/Active states. Might want to set up a quick test to verify this, but in my mind, it should work.

1 Like

Why do you have so many states for possibly only 2 boolean true or false?

1 Like

I think it was just an elaborate description. In other words, it’s just boolean true or false and he wants to record only the true readings in InfluxDB.

1 Like

I receive states as integer and break them down in single statebits.
For example: Receiving integer value ‘1’ means bit01 (hk1_check_error_00’) is true, receiving integer value ‘2’ means only bit02 is true, and so on. In general only some bits are true and I’m only interested in this true-values.

pelletronic_hk1_statebit = {‘bit01’: ‘hk1_check_error_00’,
‘bit02’: ‘hk1_dhw_priority_01’,
‘bit03’: ‘hk1_overheating_protection_02’,
‘bit04’: ‘hk1_operation_mode_off_03’,
‘bit05’: ‘hk1_reduced_mode_04’,
‘bit06’: ‘hk1_heating_mode_05’,
‘bit07’: ‘hk1_screedd_mode_06’,
‘bit08’: ‘hk1_holiday_mode_07’,
‘bit09’: ‘hk1_party_mode_08’,
‘bit10’: ‘hk1_freezing_mode_active_09’,
‘bit11’: ‘hk1_ambient_temp_over_heat_10’,
‘bit12’: ‘hk1_room_temp_reached_11’,
‘bit13’: ‘hk1_frostflush_active_12’,
‘bit14’: ‘hk1_sourcetemp_under_pumprelease_13’,
‘bit15’: ‘hk1_external_requrirement_active_14’,
‘bit16’: ‘hk1_wait_for_external_req_15’,
‘bit17’: ‘hk1_ambienttemp_over_loweringtemp_16’,
‘bit18’: ‘hk1_solar_heating_active_17’,
‘bit19’: ‘hk1_fair_weather_targettemp_reduced_18’,
‘bit20’: ‘hk1_bad_weather_solarheating_inactive_19’,
‘bit21’: ‘hk1_pump_overrun_20’,
‘bit22’: ‘hk1_retention_time_21’,
‘bit23’: ‘hk1_solarheating_inactive_22’,
‘bit24’: ‘hk1_sourcetemp_over_flowtemp_23’,
‘bit25’: ‘hk1_comfort_temp_active_24’}

see below for further explanation