# \[SOLVED\] New \[WARN\] in log since fresh 3.0.1

**URL:** <https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012>\
**Category:** Bindings\
**Tags:** openuv\
**Created:** [March 15, 2021, 8:48am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012 "2021-03-15T08:48:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 8:48am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/1 "2021-03-15T08:48:20Z")

</div>

Hi folks,

I’ve just migrated to 3.0.1, and I see this in my logs:

```yaml
2021-03-15 09:43:54.334 [WARN] [re.config.core.internal.ConfigMapper] - Could not set field value for field 'index': Can not set java.lang.String field org.openhab.binding.openuv.internal.config.SafeExposureConfiguration.index to java.math.BigDecimal
java.lang.IllegalArgumentException: Can not set java.lang.String field org.openhab.binding.openuv.internal.config.SafeExposureConfiguration.index to java.math.BigDecimal
	at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:?]
	at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:?]
	at jdk.internal.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) ~[?:?]
	at java.lang.reflect.Field.set(Field.java:780) ~[?:?]
	at org.openhab.core.config.core.internal.ConfigMapper.as(ConfigMapper.java:101) [bundleFile:?]
	at org.openhab.core.config.core.Configuration.as(Configuration.java:80) [bundleFile:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.updateChannel(OpenUVReportHandler.java:234) [bundleFile:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.lambda$2(OpenUVReportHandler.java:149) [bundleFile:?]
	at java.util.ArrayList.forEach(ArrayList.java:1541) [?:?]
	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1085) [?:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.updateChannels(OpenUVReportHandler.java:148) [bundleFile:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.lambda$1(OpenUVReportHandler.java:134) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

```

Any clue?

thanks  
Andrea

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 9:24am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/2 "2021-03-15T09:24:16Z")

</div>

You should recreate your Safeexposure channel, since this [PR](https://github.com/openhab/openhab-addons/pull/9198/files) this channel configuration has changed from number to string.

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 9:46am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/3 "2021-03-15T09:46:57Z")

</div>

Thank you @glhopital for your answer.

I’m doing the same mistake, but I’m not able to see it. Same error with the config below:

```yaml
Bridge openuv:openuvapi:local "OpenUV API" @ "Accounts" [apikey="<omitted>"] {
    Thing uvreport home "Local UV" @ "Outdoor" [location="<omitted>", refresh=20]{
        Channels:
            Type SafeExposure : pale [       
                index=1
            ]
            Type SafeExposure : white [
                index=2
            ]
            Type SafeExposure : light_brown [
                index=3
            ]
            Type SafeExposure : moderate_brown [
                index=4
            ]
            Type SafeExposure : dark_brown [
                index=5
            ]
            Type SafeExposure : black [
                index=6
            ]
    }
}

```

items:

```csv
Number Openuv_UVIndex "Current UV Index [%.2f]" (gOutdoor, gWeather, gChart, gHistory) { channel = "openuv:uvreport:local:home:UVIndex" }
Number Openuv_UVIndexMax "Expected Max UV Index [%.2f]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:UVMax" }
DateTime Openuv_UVIndexMaxTime "Max UV Index Time [%1$td/%1$tm - %1$tH:%1$tM]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:UVMaxTime" }
Switch Openuv_UVIndexMaxTime_Status
Number:ArealDensity Openuv_Ozone "Ozone (du)[%.2f]" (gOutdoor, gWeather, gChart, gHistory) { channel = "openuv:uvreport:local:home:Ozone" }
String Openuv_SafeExposure1 "Safe Exposure I [%s]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:pale" }
String Openuv_SafeExposure2 "Safe Exposure II [%s]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:white" }
String Openuv_SafeExposure3 "Safe Exposure III [%s]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:light_brown" }
String Openuv_SafeExposure4 "Safe Exposure IV [%s]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:moderate_brown" }
String Openuv_SafeExposure5 "Safe Exposure V [%s]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:dark_brown" }
String Openuv_SafeExposure6 "Safe Exposure VI [%s]" (gOutdoor, gWeather) { channel = "openuv:uvreport:local:home:black" }

```

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 9:53am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/4 "2021-03-15T09:53:59Z")

</div>

`index` should be setup with one of the FitzPatrick values, so `I`,`II`,`III`,`IV`,`V` or `VI`.  
Sorry this is missing in documentation. Maybe you could use your own example to extand binding doc [here](https://github.com/openhab/openhab-addons/edit/main/bundles/org.openhab.binding.openuv/README.md)

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 10:21am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/5 "2021-03-15T10:21:44Z")

</div>

```yaml
        Channels:
            Type SafeExposure : pale [       
                index="I"
            ]
            Type SafeExposure : white [
                index="II"
            ]
            Type SafeExposure : light_brown [
                index="III"
            ]
            Type SafeExposure : moderate_brown [
                index="IV"
            ]
            Type SafeExposure : dark_brown [
                index="V"
            ]
            Type SafeExposure : black [
                index="VI"
            ]
    }
}

```

Same issue ☹

```yaml
2021-03-15 11:17:31.935 [WARN] [re.config.core.internal.ConfigMapper] - Could not set field value for field 'index': Can not set java.lang.String field org.openhab.binding.openuv.internal.config.SafeExposureConfiguration.index to java.math.BigDecimal
java.lang.IllegalArgumentException: Can not set java.lang.String field org.openhab.binding.openuv.internal.config.SafeExposureConfiguration.index to java.math.BigDecimal
	at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167) ~[?:?]
	at jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171) ~[?:?]
	at jdk.internal.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81) ~[?:?]
	at java.lang.reflect.Field.set(Field.java:780) ~[?:?]
	at org.openhab.core.config.core.internal.ConfigMapper.as(ConfigMapper.java:101) [bundleFile:?]
	at org.openhab.core.config.core.Configuration.as(Configuration.java:80) [bundleFile:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.updateChannel(OpenUVReportHandler.java:234) [bundleFile:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.lambda$2(OpenUVReportHandler.java:149) [bundleFile:?]
	at java.util.ArrayList.forEach(ArrayList.java:1541) [?:?]
	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1085) [?:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.updateChannels(OpenUVReportHandler.java:148) [bundleFile:?]
	at org.openhab.binding.openuv.internal.handler.OpenUVReportHandler.lambda$1(OpenUVReportHandler.java:134) [bundleFile:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

```

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 10:37am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/6 "2021-03-15T10:37:44Z")

</div>

Can you try creating these fields using MainUI ?

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 11:34am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/7 "2021-03-15T11:34:33Z")

</div>

well actually I use the things files, and I used to modify them manually

From what I see, it seems the channel in openuv.things is still using “number:time” scheme, instead of string:

 ![Screenshot 2021-03-15 at 12.38.33](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/c/bc63b07eabff6457fce683513d28018eeaa6a3de.png)

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 11:46am UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/8 "2021-03-15T11:46:56Z")

</div>

mmm… when this change has been merged? I’m on 3.0.1

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 12:25pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/9 "2021-03-15T12:25:12Z")

</div>

Just to try and ensure it works, so you’ll have the YAML version, it will help you check the thing file syntax

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 12:57pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/10 "2021-03-15T12:57:18Z")

</div>

Sorry, just to be sure I understood correctly, idea is to remove the channels from the file and auto-discover?

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 12:58pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/11 "2021-03-15T12:58:19Z")

</div>

Yes, remove the channels from your file and expand the thing with new channels (it’s not auto discoverable) : open the thing, and search “add channel”

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 1:15pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/12 "2021-03-15T13:15:23Z")

</div>

where I can “add channel”?

 ![Screenshot 2021-03-15 at 14.14.34](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/1/2/128effc706361676bdb3b18b01845f5d8db2f90b.png)

On the other hand, I see also the “master” Safe Exposure as Number:Time, and not String ☹

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 1:34pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/13 "2021-03-15T13:34:29Z")

</div>

Yes, the channel value is a Number:Time, but its configuration parameter is a String. But wait, maybe you’re not in the last binding version, expandable channels have been added recently.

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 1:43pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/14 "2021-03-15T13:43:51Z")

</div>

I’m on openhabian, but I still need to understand how to move from stable 3.0.1 to last snapshot.

🙂 working on it

Andrea

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 2:05pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/15 "2021-03-15T14:05:19Z")

</div>

I’ve moved to 3.1, but not seeing any “expandable channel”

What I should see?

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 2:39pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/16 "2021-03-15T14:39:27Z")

</div>

You should see something like that (note “Add channel” at the bottom of the screenshot) :

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/f/e/fe4c93cfa472652dbe0dabcbf2fc9d0d5e4940a5.png)

It gives you this YAML :

```auto
UID: openuv:uvreport:api:local
label: Local UV Report
thingTypeUID: openuv:uvreport
configuration:
  refresh: 10
  location: 58.996,9,822
bridgeUID: openuv:openuvapi:api
channels:
  - id: SafeExposure
    channelTypeUID: openuv:SafeExposure
    label: Safe Exposure
    description: Safe exposure time for Fitzpatrick Skin Types
    configuration:
      index: I
  - id: paleskin
    channelTypeUID: openuv:SafeExposure
    label: Pale Skin
    description: ""
    configuration:
      index: I

```

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 3:12pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/17 "2021-03-15T15:12:00Z")

</div>

I’m on 3.1.0 build #2262 and I can’t see that ☹

 ![Screenshot 2021-03-15 at 16.11.29](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/f/0/f069986ed2bebb220f1cdc0e91e788fcddd9c480.jpeg)

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 3:13pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/18 "2021-03-15T15:13:41Z")

</div>

Try creating a new UV Report in the MainUI. I suspect the metadata of your current report being stored with the old properties.

---

<div class="post-metadata">

**Author:** ![ariela](https://community.openhab.org/user_avatar/community.openhab.org/ariela/32/18303_2.png) [@ariela](https://community.openhab.org/u/ariela)\
**Post date:** [March 15, 2021, 3:20pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/19 "2021-03-15T15:20:35Z")

</div>

Ta daa … 🙂 now I can see “Add channel”

question is if I can convert the MainUI configuration into a text to add to my things file manually

---

<div class="post-metadata">

**Author:** ![glhopital](https://community.openhab.org/user_avatar/community.openhab.org/glhopital/32/91632_2.png) [@glhopital](https://community.openhab.org/u/glhopital)\
**Post date:** [March 15, 2021, 3:21pm UTC](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012/20 "2021-03-15T15:21:46Z")

</div>

I think you can, maybe with a new ID so you ensure OH is using proper json description elements.

[Next page](https://community.openhab.org/t/solved-new-warn-in-log-since-fresh-3-0-1/119012.md?page=2)
