Codes indicating sensor errors

Maybe I overlooked this in the documentation. Since I read my sensors (SDS011, SPS30) locally in Home Assistant (HA, home automation system that I use), I regularly receive sensor data that falls far outside the usual measuring range. I don’t see those outliers in the data sent to the Sensor Community site. They may be filtered out there. That’s what I’m doing myself in HA now.
I wonder if these are special data values that indicate a (error) condition. Is there documentation about that?

I doubt that there is any type of filtering. Are you referring to the sensor community or to madavi? If it is the former, there are regular errors for many users when uploading to the server, so momentary spikes would be less likely to appear in this case.

There is no filter. Please send me the values from archive, the graphics and the Sensor ID

HA produces maybe byte shifting in the transmission which produces Bad values.

I am sending the requested information:

  • the sensor data from the past 10 days stored in the Home Assistant database;
  • the graphs as shown by Home Assistant for the past 10 days;
  • the sensor ID: 14990217
    It took some work (and a steep learning curve) to get the data from the HA database. I did this with TablePlus, with which the HA database can be read properly.
    Note: The time is in UTC.
    It seems I was able to locate part of the problem. If the outliers occur, the data has been swapped. For example, it seems that the PM2.5 then gets the value of the air pressure. I have done some more tests, the data as HA shows it, corresponds well with the data that the sensor shows as a web server.
    For the sake of completeness: I use the following template to read in the sensor values:
- platform: command_line
   name: "Air Quality opzij PM10 (SDS)"
   command: 'curl http://192.168.178.20/data.json'
   value_template: "{{ value_json.sensordatavalues[0].value | round(1) }}"
   unit_of_measurement: "µg/m³"
- platform: command_line
   name: "Air Quality Aside PM2.5 (SDS)"
   command: 'curl http://192.168.178.20/data.json'
   value_template: "{{ value_json.sensordatavalues[1].value | round(1) }}"
   unit_of_measurement: "µg/m³"

Outliers are filtered out by:

- platform: template
  sensors:
    air_quality_opzij_pm25:
      friendly_name: Air quality opzij PM 2.5 correctie
      unit_of_measurement: "µg/m³"
      value_template: >-
        {% if states('sensor.luchtkwaliteit_opzij_pm2_5_sds') | float < 10000 %} {{ states('sensor.luchtkwaliteit_opzij_pm2_5_sds') }}
        {% else %} 0
        {% endif %}

Data can be found here:





By the way, import by Home Assistant is based on the approach described in "Alarm" for values - #4 by RuudvanMunsterZTM