OpenWeatherMap daily forecast using the free API

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!

I did a manual install of the SCALE transformation, but nothing changed.
Do you still want o see the logs?
i also insall a new OH instance 2.5.5 an did all the things you said, but i got there the same “Errors”.

2020-06-11 19:03:21.411 [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

On the bottom of the page from "Openhab REST API shows this:

And when i click on “INVALID” i get this result:


{“schemaValidationMessages”:[{“level”:“error”,“message”:“Can’t read from file https://192.168.10.24:8444/rest/swagger.json”}]}

Give me some more details of your OH environment. Are you in docker? Hardware? Manual install or repository? OS? Any other issues? What region are you in?

Logs are always helpful.

Yes, i use Openhab in a Docker Container. And the Docker enviroment runs on a Synology DS218+.
It comes from the Docker Hub Registy. Docker Version 18.09.0-0513. My Region is Germany.
Here some Container Details:
openhab_Docker|619x500

I did the same on my Notebook, on Debian Buster with docker. And there is the owm script running.
But i doesn’t know where the difference lie. :thinking: :thinking:

Try adding this to a script file in /automation/jsr223/python/personal/ and see what gets logged…

from core.log import logging, LOG_PREFIX#, log_traceback
LOG = logging.getLogger("{}.TEST_2".format(LOG_PREFIX))

import os, sys

LOG.warn("")

if hasattr(sys.version_info, "major"):
    LOG.warn("Jython version: {}.{}.{}.{}".format(sys.version_info.major, sys.version_info.minor, sys.version_info.micro, sys.version_info.releaselevel))
else:
    LOG.warn("Jython version: {}".format(sys.version))

LOG.warn("Operating system: {}".format(os.uname()[0]))
LOG.warn("Kernel: {}".format(os.uname()[2]))
LOG.warn("Architecture: {}".format(os.uname()[4]))
LOG.warn("Java version: {}".format(sys.platform))

LOG.warn("File encoding: {}".format(sys.getfilesystemencoding()))
LOG.warn("sys.path: {}".format(sys.path))

LOG.warn("")

###########################################################################

from org.eclipse.smarthome.model.script.actions.Exec import executeCommandLine
import json

#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')
scale_check_result = 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)
LOG.warn(scale_check_result)
LOG.warn(json.loads(scale_check_result).get('installed'))

Hi, my page of rest API shows the Port “8002”.

openhabrest_port

Should i Change the port in the URL’s of the script ?

#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’)
scale_check_result = 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)

Interesting… try both!

Here is the result wirth Port 8002


2020-06-13 11:44:35.953 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/personal/test.py’
2020-06-13 11:44:35.956 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/personal/test.py
2020-06-13 11:44:35.996 [WARN ] [jsr223.jython.TEST_2 ] -
2020-06-13 11:44:36.004 [WARN ] [jsr223.jython.TEST_2 ] - Jython version: 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[OpenJDK 64-Bit Server VM (Azul Systems, Inc.)]
2020-06-13 11:44:36.019 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/openhab/conf/automation/jsr223/python/personal/test.py’: AttributeError: ‘module’ object has no attribute ‘uname’ in at line number 13

An here is the result with Port 8080

2020-06-13 12:20:46.991 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/personal/test.py’
2020-06-13 12:20:47.139 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/personal/test.py
2020-06-13 12:20:47.890 [WARN ] [jsr223.jython.TEST_2 ] -
2020-06-13 12:20:47.917 [WARN ] [jsr223.jython.TEST_2 ] - Jython version: 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[OpenJDK 64-Bit Server VM (Azul Systems, Inc.)]
2020-06-13 12:20:47.919 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/openhab/conf/automation/jsr223/python/personal/test.py’: AttributeError: ‘module’ object has no attribute ‘uname’ in at line number 13

Hmmh, i think the results are the same.

Rats… comment out lines 13-15

Here is the new result:

…> 2020-06-13 16:44:08.834 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/personal/test.py’

2020-06-13 16:44:08.835 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/personal/test.py

2020-06-13 16:44:08.862 [WARN ] [jsr223.jython.TEST_2 ] -

2020-06-13 16:44:08.871 [WARN ] [jsr223.jython.TEST_2 ] - Jython version: 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)

[OpenJDK 64-Bit Server VM (Azul Systems, Inc.)]

2020-06-13 16:44:08.876 [WARN ] [jsr223.jython.TEST_2 ] - Java version: java1.8.0_232

2020-06-13 16:44:08.878 [WARN ] [jsr223.jython.TEST_2 ] - File encoding: None

2020-06-13 16:44:08.884 [WARN ] [jsr223.jython.TEST_2 ] - sys.path: [’/openhab/conf/automation/lib/python’, ‘/openhab/conf/automation/jython/Lib’,
‘/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib’, ‘classpath’, ‘pyclasspath/’]

2020-06-13 16:44:08.889 [WARN ] [jsr223.jython.TEST_2 ] -

2020-06-13 16:44:08.946 [WARN ] [jsr223.jython.TEST_2 ] -

2020-06-13 16:44:08.948 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/openhab/conf/automation/jsr223/python/personal/test.py’: ValueError: No JSON object could be decoded in at line number 31

Was this with port 8002?

Your code fences look like quotes. Try ``` on the line before and after the log.

Here the result with Port 80002:

‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
2020-06-13 18:48:18.066 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/personal/test.py’
2020-06-13 18:48:18.069 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/personal/test.py
2020-06-13 18:48:18.121 [WARN ] [jsr223.jython.TEST_2 ] -
2020-06-13 18:48:18.127 [WARN ] [jsr223.jython.TEST_2 ] - Jython version: 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[OpenJDK 64-Bit Server VM (Azul Systems, Inc.)]
2020-06-13 18:48:18.135 [WARN ] [jsr223.jython.TEST_2 ] - Java version: java1.8.0_232
2020-06-13 18:48:18.141 [WARN ] [jsr223.jython.TEST_2 ] - File encoding: None
2020-06-13 18:48:18.149 [WARN ] [jsr223.jython.TEST_2 ] - sys.path: [’/openhab/conf/automation/lib/python’, ‘/openhab/conf/automation/jython/Lib’, ‘/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib’, ‘classpath’, ‘pyclasspath/’]
2020-06-13 18:48:18.154 [WARN ] [jsr223.jython.TEST_2 ] -
2020-06-13 18:48:18.210 [WARN ] [jsr223.jython.TEST_2 ] - P
2020-06-13 18:48:18.213 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/openhab/conf/automation/jsr223/python/personal/test.py’: ValueError: No JSON object could be decoded in at line number 31
‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’

I have an update to test. The check Scale transformation service will not be installed on Windows, since the script is using curl to communicate with the REST API. The script is also now checking for the HTTP or HTTPS port that OH is configured with. If you’d like to test it out, replace lines 171-184 of the original script with this…

            # install Scale transformation service, if not already installed
            from java.lang import System

            if System.getProperty("os.name") == "Linux":
                import json
                from core.actions import Exec

                INSECURE_PORT = System.getProperty("org.osgi.service.http.port")
                SECURE_PORT = System.getProperty("org.osgi.service.http.port.secure")

                scale_check_result = None
                try:
                    scale_check_result = Exec.executeCommandLine("/bin/sh@@-c@@/usr/bin/curl -s --connect-timeout 10 -m 10 -X GET -H \"Accept: application/json\" \"http://localhost:{}/rest/extensions/transformation-scale\"".format(INSECURE_PORT), 15000)
                except:
                    try:
                        scale_check_result = Exec.executeCommandLine("/bin/sh@@-c@@/usr/bin/curl -s --connect-timeout 10 -m 10 -X GET -H \"Accept: application/json\" \"http://localhost:{}/rest/extensions/transformation-scale\"".format(SECURE_PORT), 15000)
                    except:
                        addOWMItems.log.warn("Scale transformation service installation failed: unable to communicate with REST API")
                        return
                if scale_check_result is not None:            
                    scale_check_result = json.loads(scale_check_result).get('installed')
                    if not scale_check_result:
                        install_scale_result = None
                        try:
                            install_scale_result = Exec.executeCommandLine("/bin/sh@@-c@@/usr/bin/curl -o /dev/null -s -w \"%{{http_code}}\" --connect-timeout 10 -m 10 -X POST -H \"Content-Type: application/json\" -H \"Accept: application/json\" \"http://localhost:{}/rest/extensions/transformation-scale/install\"".format(INSECURE_PORT), 15000)
                        except:
                            try:
                                install_scale_result = Exec.executeCommandLine("/bin/sh@@-c@@/usr/bin/curl -o /dev/null -s -w \"%{{http_code}}\" --connect-timeout 10 -m 10 -X POST -H \"Content-Type: application/json\" -H \"Accept: application/json\" \"http://localhost:{}/rest/extensions/transformation-scale/install\"".format(SECURE_PORT), 15000)
                            except:
                                addOWMItems.log.warn("Scale transformation service installation failed")
                                return
                        if install_scale_result != "200":
                            addOWMItems.log.warn("Scale transformation service installation failed: result {}".format(install_scale_result))
                            return
                        else:
                            addOWMItems.log.debug("Scale transformation service has been installed")
                    else:
                        addOWMItems.log.debug("Scale transformation service is already installed")
                else:
                    addOWMItems.log.warn("Scale transformation service installation failed: REST API return None")
                    return

Should i replace the lines in the “owm_daily_forecast.py” script?

Here the new log :thinking:

‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
2020-06-14 14:30:13.108 [DEBUG] [.AutomationResourceBundlesEventQueue] - Process bundle event 2, for automation bundle ‘org.openhab.core.automation’
2020-06-14 14:30:13.124 [DEBUG] [.AutomationResourceBundlesEventQueue] - Process bundle event 32, for automation bundle ‘org.openhab.core.automation.module.script.rulesupport’
2020-06-14 14:30:13.142 [DEBUG] [vider.AbstractResourceBundleProvider] - Parse rules from bundle ‘org.openhab.core.automation’
2020-06-14 14:30:13.206 [DEBUG] [vider.AbstractResourceBundleProvider] - Parse rules from bundle ‘org.openhab.core.automation.module.script.rulesupport’
2020-06-14 14:30:13.636 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added CoreModuleHandlerFactory
2020-06-14 14:30:13.644 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added EphemerisModuleHandlerFactory
2020-06-14 14:30:13.649 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added TimerModuleHandlerFactory
2020-06-14 14:30:13.655 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added AnnotatedActionModuleTypeProvider
2020-06-14 14:30:13.920 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added AnnotatedThingActionModuleTypeProvider
2020-06-14 14:30:13.980 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added MediaModuleHandlerFactory
2020-06-14 14:30:14.045 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - GenericScriptEngineFactory.getScriptTypes(): [js, application/javascript, application/ecmascript, text/javascript, text/ecmascript, py, text/python, application/python, text/x-python, application/x-python]
2020-06-14 14:30:15.779 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Initialized a generic 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-14 14:30:15.781 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - NashornScriptEngineFactory.getScriptTypes(): [js, application/javascript, application/ecmascript, text/javascript, text/ecmascript]
2020-06-14 14:30:15.802 [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-14 14:30:15.809 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - GenericScriptEngineFactory.getScriptTypes(): [js, application/javascript, application/ecmascript, text/javascript, text/ecmascript, py, text/python, application/python, text/x-python, application/x-python]
2020-06-14 14:30:15.811 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Removed GenericScriptEngineFactory
2020-06-14 14:30:15.813 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - NashornScriptEngineFactory.getScriptTypes(): [js, application/javascript, application/ecmascript, text/javascript, text/ecmascript]
2020-06-14 14:30:15.815 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Removed NashornScriptEngineFactory
2020-06-14 14:30:15.839 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - GenericScriptEngineFactory.getScriptTypes(): [js, application/javascript, application/ecmascript, text/javascript, text/ecmascript, py, text/python, application/python, text/x-python, application/x-python]
2020-06-14 14:30:15.856 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Initialized a generic 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-14 14:30:15.858 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - NashornScriptEngineFactory.getScriptTypes(): [js, application/javascript, application/ecmascript, text/javascript, text/ecmascript]
2020-06-14 14:30:15.876 [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-14 14:30:15.879 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added ScriptModuleHandlerFactory
2020-06-14 14:30:15.925 [TRACE] [al.provider.ScriptModuleTypeProvider] - ParameterOptions: {application/javascript=ECMAScript (ECMA - 262 Edition 5.1)}
2020-06-14 14:30:15.940 [TRACE] [al.provider.ScriptModuleTypeProvider] - ParameterOptions: {application/javascript=ECMAScript (ECMA - 262 Edition 5.1)}
2020-06-14 14:30:15.975 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added ScriptedCustomModuleHandlerFactory
2020-06-14 14:30:15.986 [DEBUG] [e.automation.internal.RuleEngineImpl] - ModuleHandlerFactory added ScriptedPrivateModuleHandlerFactory
2020-06-14 14:30:16.571 [INFO ] [roker.internal.EmbeddedBrokerService] - Broker persistence file: mqttembedded.bin
2020-06-14 14:30:17.095 [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, 22, 109, 113, 116, 116, 45,… [1.4.199/0], deleting /openhab/userdata/mqttembedded.bin
2020-06-14 14:30:18.553 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘localhost’ with clientid embedded-mqtt-broker
2020-06-14 14:30:18.886 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to ‘192.168.10.24’ with clientid 70dfa5b1-20fa-403d-8c22-3654586385b7
2020-06-14 14:30:20.788 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-06-14 14:30:20.880 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2020-06-14 14:30:21.151 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-06-14 14:30:41.043 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘javascript/core/000_startup_delay.js’
2020-06-14 14:30:41.890 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘js’ with identifier: file:/openhab/conf/automation/jsr223/javascript/core/000_startup_delay.js
2020-06-14 14:30:42.153 [INFO ] [jsr223.javascript.core.startup_delay] - Checking for initialized context
2020-06-14 14:30:42.257 [INFO ] [jsr223.javascript.core.startup_delay] - Context initialized… waiting 30s before allowing scripts to load
2020-06-14 14:31:12.318 [INFO ] [jsr223.javascript.core.startup_delay] - Complete
2020-06-14 14:31:12.321 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - scriptLoaded() is not defined in the script: file:/openhab/conf/automation/jsr223/javascript/core/000_startup_delay.js
2020-06-14 14:31:12.324 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/000_startup_delay.py’
2020-06-14 14:31:19.388 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/000_startup_delay.py
2020-06-14 14:31:19.453 [INFO ] [jsr223.jython.core.startup_delay ] - Checking for initialized context
2020-06-14 14:31:19.460 [INFO ] [jsr223.jython.core.startup_delay ] - Context initialized… waiting 30s before allowing scripts to load
2020-06-14 14:31:49.465 [INFO ] [jsr223.jython.core.startup_delay ] - Complete
2020-06-14 14:31:49.466 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - scriptLoaded() is not defined in the script: file:/openhab/conf/automation/jsr223/python/core/000_startup_delay.py
2020-06-14 14:31:49.469 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/100_DirectoryTrigger.py’
2020-06-14 14:31:49.472 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/100_DirectoryTrigger.py
2020-06-14 14:31:51.360 [INFO ] [23.jython.core.DirectoryEventTrigger] - TriggerHandler added [jsr223.DirectoryTrigger]
2020-06-14 14:31:51.377 [INFO ] [23.jython.core.DirectoryEventTrigger] - TriggerType added [jsr223.DirectoryTrigger]
2020-06-14 14:31:51.384 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/100_OsgiEventTrigger.py’
2020-06-14 14:31:51.390 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/100_OsgiEventTrigger.py
2020-06-14 14:31:52.492 [INFO ] [jsr223.jython.core.OsgiEventTrigger ] - TriggerHandler added [jsr223.OsgiEventTrigger]
2020-06-14 14:31:52.504 [INFO ] [jsr223.jython.core.OsgiEventTrigger ] - TriggerType added [jsr223.OsgiEventTrigger]
2020-06-14 14:31:52.507 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/100_StartupTrigger.py’
2020-06-14 14:31:52.509 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/100_StartupTrigger.py
2020-06-14 14:31:52.554 [INFO ] [jsr223.jython.core.StartupTrigger ] - TriggerHandler added [jsr223.StartupTrigger]
2020-06-14 14:31:52.559 [INFO ] [jsr223.jython.core.StartupTrigger ] - TriggerType added [jsr223.StartupTrigger]
2020-06-14 14:31:52.562 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonBindingInfoProvider.py’
2020-06-14 14:31:52.563 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonBindingInfoProvider.py
2020-06-14 14:31:52.700 [DEBUG] [thonBindingInfoProvider.scriptLoaded] - Registered service
2020-06-14 14:31:52.705 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonExtensionProvider.py’
2020-06-14 14:31:52.706 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonExtensionProvider.py
2020-06-14 14:31:53.513 [DEBUG] [.jython.core.JythonExtensionProvider] - Start init
2020-06-14 14:31:53.545 [DEBUG] [.jython.core.JythonExtensionProvider] - End init
2020-06-14 14:31:53.556 [DEBUG] [JythonExtensionProvider.scriptLoaded] - Registered service
2020-06-14 14:31:53.562 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonItemChannelLinkProvider.py’
2020-06-14 14:31:53.568 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonItemChannelLinkProvider.py
2020-06-14 14:31:53.671 [DEBUG] [ItemChannelLinkProvider.scriptLoaded] - Registered service
2020-06-14 14:31:53.675 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonItemProvider.py’
2020-06-14 14:31:53.676 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonItemProvider.py
2020-06-14 14:31:53.743 [DEBUG] [core.JythonItemProvider.scriptLoaded] - Registered service
2020-06-14 14:31:53.746 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonThingProvider.py’
2020-06-14 14:31:53.749 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonThingProvider.py
2020-06-14 14:31:53.809 [DEBUG] [ore.JythonThingProvider.scriptLoaded] - Registered service
2020-06-14 14:31:53.812 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonThingTypeProvider.py’
2020-06-14 14:31:53.813 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonThingTypeProvider.py
2020-06-14 14:31:53.875 [DEBUG] [JythonThingTypeProvider.scriptLoaded] - Registered service
2020-06-14 14:31:53.878 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/core/components/200_JythonTransform.py’
2020-06-14 14:31:53.879 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/core/components/200_JythonTransform.py
2020-06-14 14:31:53.929 [DEBUG] [onTransformationService.scriptLoaded] - Registered service
2020-06-14 14:31:53.931 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/community/openweathermap/owm_daily_forecast.py’
2020-06-14 14:31:53.933 [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-14 14:31:55.549 [DEBUG] [jsr223.jython.addOWMItems ] - owmThingUID set to [openweathermap:weather-and-forecast:55c3cb8e:local]
2020-06-14 14:31:56.188 [ERROR] [jsr223.jython.addOWMItems ] - Traceback (most recent call last):
File “”, line 208, in addOWMItems
NameError: global name ‘add_owm_items’ is not defined

2020-06-14 14:31:56.191 [INFO ] [me.core.service.AbstractWatchService] - Loading script ‘python/personal/test.py’
2020-06-14 14:31:56.193 [DEBUG] [ipt.internal.ScriptEngineManagerImpl] - Added ScriptEngine for language ‘py’ with identifier: file:/openhab/conf/automation/jsr223/python/personal/test.py
2020-06-14 14:31:56.222 [WARN ] [jsr223.jython.TEST_2 ] -
2020-06-14 14:31:56.226 [WARN ] [jsr223.jython.TEST_2 ] - Jython version: 2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11)
[OpenJDK 64-Bit Server VM (Azul Systems, Inc.)]
2020-06-14 14:31:56.243 [WARN ] [jsr223.jython.TEST_2 ] - Java version: java1.8.0_232
2020-06-14 14:31:56.246 [WARN ] [jsr223.jython.TEST_2 ] - File encoding: None
2020-06-14 14:31:56.251 [WARN ] [jsr223.jython.TEST_2 ] - sys.path: [’/openhab/conf/automation/lib/python’, ‘/openhab/conf/automation/jython/Lib’, ‘/openhab/conf/automation/jython/jython-standalone-2.7.0.jar/Lib’, ‘classpath’, ‘pyclasspath/’]
2020-06-14 14:31:56.253 [WARN ] [jsr223.jython.TEST_2 ] -
2020-06-14 14:31:56.308 [WARN ] [jsr223.jython.TEST_2 ] - P
2020-06-14 14:31:56.311 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script ‘file:/openhab/conf/automation/jsr223/python/personal/test.py’: ValueError: No JSON object could be decoded in at line number 31
‘’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
Hope it helps.