Ignoring http timeout's in influxdb/charts

I’am using new CO2 meters which have a simple json API.
For retrieving the CO2 levels i currently use the http binding to fetch the value every 30 seconds.

But during the day i sometimes get a timeout which of course is an issue with the device.
I tried increasing the timeout to 5 seconds but this doesn’t solve the issue.

Of course it is not a real problem because the new values will come in after a few minutes.
But in the main UI charts it shows up and it doesn’t look that great :slight_smile: .

I tried to look at these options below but cant find a solution.

  1. Looked at the http binding to find some option so it wont save a 0 value in the used persistence (influxdb) when encountering an timeout.

  2. Looked at the chart options to skips these values.

I’m surprised it doesn’t update linked Item to UNDEF on timeout error.

But I think you might be able to make it do that by use of transform, script it to return “UNDEF” in case of zero value.
That would depend on the binding routing the unexpected zero response through the normal transform path.

If that doesn’t work,you can use a proxy Item to persist and chart, and update that proxy from a rule listening to your real HTTP Item and again substituting UNDEF for zero.

The point of this is that persistence ignores UNDEF, and your charting will fill in the gaps in dataset.