# OH3: Chart of Switch item not showing with influxdb

**URL:** <https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862>\
**Category:** Beginners\
**Tags:** item, charts, openhab3\
**Created:** [February 25, 2021, 3:41pm UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862 "2021-02-25T15:41:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuysH](https://community.openhab.org/user_avatar/community.openhab.org/suysh/32/68196_2.png) [@SuysH](https://community.openhab.org/u/SuysH)\
**Post date:** [February 25, 2021, 3:41pm UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862/1 "2021-02-25T15:41:31Z")

</div>

I created an item with type=Switch, updated the influxdb persistence file accordingly for logging.  
The status for the item is displayed in the dashboard with OFF/ON and can be changed with a simple sitemap switch.  
The values are correct written in the influxdb database as 0 and 1 values (0=OFF,1=ON). Checked with influx program.

Problem:  
When looking at the item in openHAB dashboard, via the Analyze button the graph is empty without vertical axis. Timing axis is available.  
The chart in the sitemap shows a constant line on 0.

Kind regards, Hans

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [February 25, 2021, 4:04pm UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862/2 "2021-02-25T16:04:55Z")

</div>

It has been reported a few times here on the forum that InfluxDB is not properly saving and retrieving Switch and Contact states. Hopefully someone has filed an issue on the binding over at the openhab-addons repo.

---

<div class="post-metadata">

**Author:** ![SuysH](https://community.openhab.org/user_avatar/community.openhab.org/suysh/32/68196_2.png) [@SuysH](https://community.openhab.org/u/SuysH)\
**Post date:** [February 25, 2021, 4:12pm UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862/3 "2021-02-25T16:12:21Z")

</div>

OK. Thanks.

---

<div class="post-metadata">

**Author:** ![SuysH](https://community.openhab.org/user_avatar/community.openhab.org/suysh/32/68196_2.png) [@SuysH](https://community.openhab.org/u/SuysH)\
**Post date:** [February 25, 2021, 8:09pm UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862/4 "2021-02-25T20:09:31Z")

</div>

There is a fix for this behaviour in openHAB 3.1 Milestone.

To test, I changed the branch in openHAB config to main, and did the Upgrade System.  
But, my version is not changed from 3.0.1  
Do I have to do something else to upgrade?

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [February 25, 2021, 8:16pm UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862/5 "2021-02-25T20:16:02Z")

</div>

I’ve no idea. I don’t use InfluxDB any more and I only partially follow the threads here on the forum.

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [February 25, 2021, 8:20pm UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862/6 "2021-02-25T20:20:53Z")

</div>

Milestone releases are still pre-release development versions.

---

<div class="post-metadata">

**Author:** ![flpaoli](https://community.openhab.org/user_avatar/community.openhab.org/flpaoli/32/65737_2.png) [@flpaoli](https://community.openhab.org/u/flpaoli)\
**Post date:** [January 30, 2022, 1:30am UTC](https://community.openhab.org/t/oh3-chart-of-switch-item-not-showing-with-influxdb/117862/7 "2022-01-30T01:30:05Z")

</div>

I’ve got this OH3.1 and the issue is still here, Switch ON/OFF become NaN in the Page Charts:

```auto
openHAB Distribution Version Information
----------------------------------------
build-no : Release Build
online-repo : https://openhab.jfrog.io/openhab/libs-release

Repository Version
----------------------------------------
openhab-distro : 3.1.1
openhab-core : 3.1.1
openhab-addons : 3.1.1
karaf : 4.3.2

```

Any pointers please?
