OpenWeatherMap daily forecast using the free API

I changed Configuration> System> Regional Settings> Measurement System from Imperial to Metric, uncommented removeOWMItems, saved/ran the script, and I see what you mean…

This looks more like an issue in UoM/group aggregation or possibly the binding, and does not occur when using Imperial units (but I don’t know if there is an in/s unit in UoM). I’ll try to track this down and report an issue for it.

No. When I use removeOWMItems, everything is populated immediately, which is what I would expect. Do you use persistence, and if so, which one? Worst case, everything should be populated after the bridge’s refresh interval, which defaults to 10 minutes.

Have you left the removeOWMItems() function call uncommented? For normal use, this should be commented out.

One question: How did you do max / min?
My assumtion was that max should be around 12 pm and min possibly around 4 am (sometime before sunrise).
Do you work with similar approximations or do you check for max within the next 12 hrs if it’s around 6 am for instance?

Do you mean max and min for the day, or for the city? I haven’t implemented max/min for the city yet, but it will be done in the same way, using group aggregation functions. The rule is triggered by one of the timestamp Items changing, and the rule shifts the Items in the groups, based on their times. This makes much more sense by looking at the screenshots. Anyhow, the max and min are two groups that hold the same Items, but use different aggregation functions.

Doing it this way, there are no approximations needed, since you are getting the max value for all of the forecasts within that day. Or partial day for the remainder of forecasts in the current day, which I really like, since the calculation only uses the remaining temps left in the day, with no consideration for the previous temps.

That sounds excellent. I light come back using you solution, but I first need to finish my learning session.
Right now I do an approximation to use the min / max of the entire day at 6 am (which is close enough, I assume). I do this by taking max and min for 3, 6, … for the current day and 24, … for the next and so on.

I don’t care for the max of the city as long as it’s in my area :wink:

I need some help with this. I’ve followed the instructions to install Jython and had the HelloWorld script running.

Loaded the owm_daily_forecast.py into the jr223/python/community folder.

My log is showing the following and I’m not sure what it means and/or how to fix it:

2020-01-29 07:23:21.840 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/community/owm_daily_forecast.py’

2020-01-29 07:23:21.843 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/etc/openhab2/automation/jsr223/python/community/owm_daily_forecast.py

2020-01-29 07:23:21.858 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/etc/openhab2/automation/jsr223/python/community/owm_daily_forecast.py’: java.io.IOException: java.io.IOException: Mark invalid

Any help would be really appreciated!

Glad to help!

Is there a stack trace in the log? @mstormi reported something similar, but I don’t recall how/if it was resolved. Have you restarted OH? Which version of OH are you running? Which version of Jython?

In looking at the trace that Markus provided, I suspect this could be due to an issue with the SD card. Are you using an SD card, is it old, and have you tested it lately?

Stack trace in the log? I’m learning as I go so I’m not sure what to look for to determine that.

Yes…using the command
sudo systemctl restart openhab2.service

I’m on OH 2.5.1-2

Jython 2.7.0 standalone version.

Yes, I’m using an SD card. It was taken out of the packaging last week when I decided to rebuild my RPi/OH server but it may have been bought sometime last year.
I haven’t tested it at all.

No problem… take a look at the logs in the post I linked to earlier. There is a full stack trace (lots of error message). The log you posted looks to be one line. Was there more in the log file?

Did the error show up a second time, or did everything startup properly? If you still got the error, try saving the file again and see if it launches. If the error still happens, try posting your log file somewhere that I can get to it.

I did just post one line. The rest of the log seems to read normal but it’s available at this link for you to peruse.

The error happens every time I reboot.

You have a LOT of errors! Wow!

This concerns me…

2020-01-28 23:58:00.376 [INFO ] [me.core.service.AbstractWatchService] - ScriptEngine for crdownload not available
2020-01-28 23:58:01.042 [INFO ] [me.core.service.AbstractWatchService] - Loading script 'python/community/owm_daily_forecast.py'
2020-01-28 23:58:01.045 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language 'py' with identifier: file:/etc/openhab2/automation/jsr223/python/community/owm_daily_forecast.py
2020-01-28 23:58:01.105 [INFO ] [me.core.service.AbstractWatchService] - Loading script 'python/community/owm_daily_forecast.py'
2020-01-28 23:58:01.110 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language 'py' with identifier: file:/etc/openhab2/automation/jsr223/python/community/owm_daily_forecast.py
2020-01-28 23:58:01.155 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/python/community/owm_daily_forecast.py': java.io.IOException: java.io.IOException: Mark invalid
2020-01-28 23:58:02.200 [INFO ] [me.core.service.AbstractWatchService] - Loading script 'python/community/owm_daily_forecast.py'
2020-01-28 23:58:02.207 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language 'py' with identifier: file:/etc/openhab2/automation/jsr223/python/community/owm_daily_forecast.py
2020-01-28 23:58:02.234 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/python/community/owm_daily_forecast.py': java.io.IOException: java.io.IOException: Mark invalid

How did you download the script? The entire repository should be downloaded as a zip file (step 7), extracted, and then the files copied to directories per the instructions. This…

2020-01-28 23:58:00.376 [INFO ] [me.core.service.AbstractWatchService] - ScriptEngine for crdownload not available

… looks like you were downloading the file… possibly not the raw file but the html of the page that it is on, directly to the community directory. Open the file and see if it looks like Python and what you see here. I think you have an issue with that file from not following the installation instructions.

I downloaded the script from the page that it was on (right click on owm_daily_forecast.py and save link as) and not the entire repo, but when I open it, it does look just like the one you posted.

I will download the repo and extract the files and reinstall from there.

As far as I can tell the errors keep repeating themselves in the log not so? I didn’t open the log files I sent so I’m not sure how far back they go, but I was experimenting with different methods of control over the past week as part of the rebuild which may account for some of the errors.

EDIT: I just tapped on the link you provided

I did follow the instructions and therefore download that repo as a zip as per step 7. When I get back to my computer I will go through to make sure.

That is the problem then. You can’t save files from Github like you describe. You can download the whole repo or go to the file, choose the raw (like the link I sent), and copy/paste the contents into a file. Right clicking and saving link as will include html content. I think you will get it this time!

The reinstall did it! I realized my file path was also incorrect - I put the owm_daily_forecast.py directly into the community folder (as you pointed out) and not in its own folder. Rookie mistake :woozy_face:

1 Like

Thanks @5iver! You’re a prince among men! Hahaha

1 Like

Continuing the discussion from OpenWeatherMap daily forecast using the free API:

Hi there,

please can somebody help me. i am realy new with OPenhab, Python, libaries ect…

I try to install the “OpenWeatherMap daily forcast”, but i got every time the same Error. I followed the instructions from the “Openhab Helper libaries” Site. And the “Hello World” Script ran sucessfully. i did it in docker on Openhab 2.5.3 and 2.5.5, but always the same ERROR.

Here a small excerpt from the Openhab Log.:

“2020-06-08 19:20:19.271 [ERROR] [jsr223.jython.addOWMItems ] - Traceback (most recent call last):
File “”, line 175, in addOWMItems
File “/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib/json/decoder.py”, line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib/json/decoder.py”, line 383, in raw_decode
raise ValueError(“No JSON object could be decoded”)
ValueError: No JSON object could be decoded”

"And here ist my my OphenWeather Binding Thing:

Bridge openweathermap:weather-api:api “OWM - Account” @ “Hamburg” [apikey=“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”, refreshInterval=30, language=“de”] {
Thing weather-and-forecast local “Local Weather And Forecast” [location=“xxxxxxxxxxxxx”, forecastHours=120, forecastDays=0]
Thing uvindex local “Local UV Index” [location=“xxxxxxxxxxxxxxxxxx”, forecastDays=2]
}"

Hope you can help me.

Could you please post more of the log? I’d like to see logging from when the script starts.

Text based Things are messy and error prone. Does your Thing show as online? I suggest removing the text based Thing and having OH create it for you by adding it through Paper UI.

Are you running openHAB on Windows?

Hi, thank you for your quick reply.

I configured the open weather Thing in the Paper UI and it is Online.
OH runs in a Docker Container.

Here the new log from OpenHab:


2020-06-10 19:31:23.835 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007

2020-06-10 19:31:24.942 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.10.24:8001

2020-06-10 19:31:24.950 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.10.24:8002

2020-06-10 19:31:26.331 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘astro:sun:local’ to inbox.

2020-06-10 19:31:26.339 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘astro:moon:local’ to inbox.

2020-06-10 19:31:28.187 [INFO ] [.network.internal.utils.NetworkUtils] - CIDR prefix is smaller than /24 on interface with address 172.19.0.1/16, truncating to /24, some addresses might be lost

2020-06-10 19:31:28.207 [INFO ] [.network.internal.utils.NetworkUtils] - CIDR prefix is smaller than /24 on interface with address 172.17.0.1/16, truncating to /24, some addresses might be lost

2020-06-10 19:31:29.343 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online

2020-06-10 19:31:29.865 [INFO ] [o.internal.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 300 seconds

2020-06-10 19:31:29.945 [DEBUG] [.AutomationResourceBundlesEventQueue] - Process bundle event 2, for automation bundle ‘org.openhab.core.automation’

2020-06-10 19:31:29.982 [DEBUG] [.AutomationResourceBundlesEventQueue] - Process bundle event 32, for automation bundle ‘org.openhab.core.automation.module.script.rulesupport’

2020-06-10 19:31:30.026 [DEBUG] [vider.AbstractResourceBundleProvider] - Parse rules from bundle ‘org.openhab.core.automation’

2020-06-10 19:31:30.028 [DEBUG] [vider.AbstractResourceBundleProvider] - Parse rules from bundle ‘org.openhab.core.automation.module.script.rulesupport’

2020-06-10 19:31:30.105 [INFO ] [o.internal.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 300 seconds

2020-06-10 19:31:30.282 [INFO ] [o.internal.handler.AstroThingHandler] - Scheduled Positional job astro:moon:local every 300 seconds

2020-06-10 19:31:30.421 [INFO ] [o.internal.handler.AstroThingHandler] - Scheduled Positional job astro:moon:local every 300 seconds

2020-06-10 19:31:30.503 [INFO ] [rk.internal.handler.SpeedTestHandler] - Speedtests starts in 5 minutes, then refreshes every 20 minutes

2020-06-10 19:31:30.792 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added CoreModuleHandlerFactory

2020-06-10 19:31:30.794 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added EphemerisModuleHandlerFactory

2020-06-10 19:31:30.796 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added TimerModuleHandlerFactory

2020-06-10 19:31:30.889 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added AnnotatedActionModuleTypeProvider

2020-06-10 19:31:31.033 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added AnnotatedThingActionModuleTypeProvider

2020-06-10 19:31:31.262 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added MediaModuleHandlerFactory

2020-06-10 19:31:40.579 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Initialized a generic ScriptEngineFactory for jython (2.7.0): supports python (2.7) with file extensions [py], names [python, jython], and mimetypes [text/python, application/python, text/x-python, application/x-python]

2020-06-10 19:31:41.509 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Initialized a custom ScriptEngineFactory for Oracle Nashorn (1.8.0_232-b18): supports ECMAScript (ECMA - 262 Edition 5.1) with file extensions [js], names [nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], and mimetypes [application/javascript, application/ecmascript, text/javascript, text/ecmascript]

2020-06-10 19:31:41.512 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Removed GenericScriptEngineFactory

2020-06-10 19:31:41.513 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Removed NashornScriptEngineFactory

2020-06-10 19:31:41.535 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Initialized a generic ScriptEngineFactory for jython (2.7.0): supports python (2.7) with file extensions [py], names [python, jython], and mimetypes [text/python, application/python, text/x-python, application/x-python]

2020-06-10 19:31:41.562 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Initialized a custom ScriptEngineFactory for Oracle Nashorn (1.8.0_232-b18): supports ECMAScript (ECMA - 262 Edition 5.1) with file extensions [js], names [nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], and mimetypes [application/javascript, application/ecmascript, text/javascript, text/ecmascript]

2020-06-10 19:31:41.569 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added ScriptModuleHandlerFactory

2020-06-10 19:31:41.679 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added ScriptedCustomModuleHandlerFactory

2020-06-10 19:31:41.691 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added ScriptedPrivateModuleHandlerFactory

2020-06-10 19:31:44.155 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.10.24’ with clientid 358b3050-a5ab-4c22-8288-d0a67210931a

2020-06-10 19:31:44.250 [INFO ] [roker.internal.EmbeddedBrokerService] - Broker persistence file: mqttembedded.bin

2020-06-10 19:31:44.812 [WARN ] [roker.internal.EmbeddedBrokerService] - persistence corrupt: Could not deserialize [-84, -19, 0, 5, 115, 114, 0, 45, 105, 111, 46, 109, 111, 113, 117, 101, 116, 116, 101, 46, 98, 114, 111, 107, 101, 114, 46, 115, 117, 98, 115, 99, 114, 105, 112, 116, 105, 111, 110, 115, 46, 83, 117, 98, 115, 99, 114, 105, 112, 116, 105, 111, 110, -47, 11, -117, 54, 80, -6, 26, -58, 2, 0, 3, 76, 0, 8, 99, 108, 105, 101, 110, 116, 73, 100, 116, 0, 18, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 76, 0, 12, 114, 101, 113, 117, 101, 115, 116, 101, 100, 81, 111, 115, 116, 0, 37, 76, 105, 111, 47, 110, 101, 116, 116, 121, 47, 104, 97, 110, 100, 108, 101, 114, 47, 99, 111, 100, 101, 99, 47, 109, 113, 116, 116, 47, 77, 113, 116, 116, 81, 111, 83, 59, 76, 0, 11, 116, 111, 112, 105, 99, 70, 105, 108, 116, 101, 114, 116, 0, 40, 76, 105, 111, 47, 109, 111, 113, 117, 101, 116, 116, 101, 47, 98, 114, 111, 107, 101, 114, 47, 115, 117, 98, 115, 99, 114, 105, 112, 116, 105, 111, 110, 115, 47, 84, 111, 112, 105, 99, 59, 120, 112, 116, 0, 7, 68, 49, 77, 73, 78, 73, … [1.4.199/0], deleting /openhab/userdata/mqttembedded.bin

2020-06-10 19:31:44.992 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid embedded-mqtt-broker

2020-06-10 19:31:47.497 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel

2020-06-10 19:31:47.778 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder

2020-06-10 19:31:48.251 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui

2020-06-10 19:31:54.385 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ‘192.168.10.24’. Next attempt in 60000ms

2020-06-10 19:31:54.437 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.10.24’ with clientid 358b3050-a5ab-4c22-8288-d0a67210931a

2020-06-10 19:32:06.740 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘javascript/core/000_startup_delay.js’

2020-06-10 19:32:07.450 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘js’ with identifier: file:/openhab/conf/automation/jsr223/javascript/core/000_startup_delay.js

2020-06-10 19:32:07.621 [INFO ] [jsr223.javascript.core.startup_delay] - Checking for initialized context

2020-06-10 19:32:07.662 [INFO ] [jsr223.javascript.core.startup_delay] - Context initialized… waiting 30s before allowing scripts to load

2020-06-10 19:32:37.702 [INFO ] [jsr223.javascript.core.startup_delay] - Complete

2020-06-10 19:32:37.706 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/000_startup_delay.py’

2020-06-10 19:32:37.707 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/000_startup_delay.py

2020-06-10 19:32:37.797 [INFO ] [jsr223.jython.core.startup_delay ] - Checking for initialized context

2020-06-10 19:32:37.799 [INFO ] [jsr223.jython.core.startup_delay ] - Context initialized… waiting 30s before allowing scripts to load

2020-06-10 19:33:07.803 [INFO ] [jsr223.jython.core.startup_delay ] - Complete

2020-06-10 19:33:07.805 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/100_DirectoryTrigger.py’

2020-06-10 19:33:07.806 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/100_DirectoryTrigger.py

2020-06-10 19:33:09.788 [INFO ] [23.jython.core.DirectoryEventTrigger] - TriggerHandler added [jsr223.DirectoryTrigger]

2020-06-10 19:33:09.794 [INFO ] [23.jython.core.DirectoryEventTrigger] - TriggerType added [jsr223.DirectoryTrigger]

2020-06-10 19:33:09.797 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/100_OsgiEventTrigger.py’

2020-06-10 19:33:09.800 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/100_OsgiEventTrigger.py

2020-06-10 19:33:10.435 [INFO ] [jsr223.jython.core.OsgiEventTrigger ] - TriggerHandler added [jsr223.OsgiEventTrigger]

2020-06-10 19:33:10.440 [INFO ] [jsr223.jython.core.OsgiEventTrigger ] - TriggerType added [jsr223.OsgiEventTrigger]

2020-06-10 19:33:10.443 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/100_StartupTrigger.py’

2020-06-10 19:33:10.445 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/100_StartupTrigger.py

2020-06-10 19:33:10.482 [INFO ] [jsr223.jython.core.StartupTrigger ] - TriggerHandler added [jsr223.StartupTrigger]

2020-06-10 19:33:10.485 [INFO ] [jsr223.jython.core.StartupTrigger ] - TriggerType added [jsr223.StartupTrigger]

2020-06-10 19:33:10.488 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonBindingInfoProvider.py’

2020-06-10 19:33:10.493 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonBindingInfoProvider.py

2020-06-10 19:33:10.602 [DEBUG] [thonBindingInfoProvider.scriptLoaded] - Registered service

2020-06-10 19:33:10.605 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonExtensionProvider.py’

2020-06-10 19:33:10.606 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonExtensionProvider.py

2020-06-10 19:33:11.185 [DEBUG] [.jython.core.JythonExtensionProvider] - Start init

2020-06-10 19:33:11.217 [DEBUG] [.jython.core.JythonExtensionProvider] - End init

2020-06-10 19:33:11.224 [DEBUG] [JythonExtensionProvider.scriptLoaded] - Registered service

2020-06-10 19:33:11.229 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonItemChannelLinkProvider.py’

2020-06-10 19:33:11.234 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonItemChannelLinkProvider.py

2020-06-10 19:33:11.311 [DEBUG] [ItemChannelLinkProvider.scriptLoaded] - Registered service

2020-06-10 19:33:11.314 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonItemProvider.py’

2020-06-10 19:33:11.315 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonItemProvider.py

2020-06-10 19:33:11.354 [DEBUG] [core.JythonItemProvider.scriptLoaded] - Registered service

2020-06-10 19:33:11.358 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonThingProvider.py’

2020-06-10 19:33:11.359 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonThingProvider.py

2020-06-10 19:33:11.425 [DEBUG] [ore.JythonThingProvider.scriptLoaded] - Registered service

2020-06-10 19:33:11.427 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonThingTypeProvider.py’

2020-06-10 19:33:11.429 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonThingTypeProvider.py

2020-06-10 19:33:11.529 [DEBUG] [JythonThingTypeProvider.scriptLoaded] - Registered service

2020-06-10 19:33:11.534 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonTransform.py’

2020-06-10 19:33:11.535 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonTransform.py

2020-06-10 19:33:11.633 [DEBUG] [onTransformationService.scriptLoaded] - Registered service

2020-06-10 19:33:11.640 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/community/openweathermap/owm_daily_forecast.py’

2020-06-10 19:33:11.644 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/community/openweathermap/owm_daily_forecast.py

2020-06-10 19:33:13.261 [DEBUG] [jsr223.jython.addOWMItems ] - owmThingUID set to [openweathermap:weather-and-forecast:55c3cb8e:local]

2020-06-10 19:33:13.934 [ERROR] [jsr223.jython.addOWMItems ] - Traceback (most recent call last):

File “”, line 175, in addOWMItems

File “/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib/json/init.py”, line 338, in loads

return _default_decoder.decode(s)

File “/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib/json/decoder.py”, line 365, in decode

obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File “/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib/json/decoder.py”, line 383, in raw_decode

raise ValueError(“No JSON object could be decoded”)

ValueError: No JSON object could be decoded


Please edit your post and add…

```
Logs or
Code goes
Here
```

What is returned when you put this in your browser, after replacing openhab_server:openhab_port? It seems like your REST API is not functioning. Have you manually installed the SCALE transformation?

http://openhab_server:openhab_port/rest/extensions/transformation-scale

Sorry, where do i have to put the logs?
This is the result, when i call “http://openhab_server:openhab_port/rest/extensions/transformation-scale”


{“id”:“transformation-scale”,“label”:“Scale Transformation”,“version”:“2.5.3”,“link”:“https://www.openhab.org/addons/transformations/scale/",“installed”:false,“type”:"transformation”}


And the transformation-scale was not installed.

For some reason, the script is not installing the SCALE transformation for you, so manually install it. You can also change line 175 to this (I’ll get in an update)…

scale_check_result = json.loads(executeCommandLine("/bin/sh@@-c@@/usr/bin/curl -s --connect-timeout 10 -m 10 -X GET -H \"Accept: application/json\" \"http://localhost:8080/rest/extensions/transformation-scale\"", 15000)).get('installed')

You didn’t use code fences, so it was impossible to read the logs. It looks like you now have them as a quote, which is slightly better :slightly_smiling_face:. Code fences or before and after helps a LOT!