Weather binding with OpenWeatherMap API

Yes I did see that, and as mentioned earlier I have upgraded. But, that is not the question I wanted answering at the moment. I still have no #temperature item … how do I get it, I don’t need #snow #ice etc … :slight_smile:

How does the thing in PaperUI look like? Which channels are shown? How does your items file look like? Are the other channels for your current weather thing working? What happens in the logs if you try to setup the temperature channel? Need more information to have a chance to help here.

If the channel really isn’t there it’s maybe worth opening an issue on github or posting your problem in the original development thread for the binding posted above to get in contact with the binding developer @cweitkamp

I will answer those questions, but at the moment I have bigger issues.

After the upgrade I no longer have MQTT bindings or action, they have disappeared from the PaperUI, so I can’t talk to any of my hardware …

I tried afresh install of openhab-2.4.0-SNAPSHOT.zip and did a restore from my backup, but still the same , no MQTT …

Any idea’s would be most appreciated … my plants are running dry … :frowning:

@hannibal29
Here is what my thing looks like, everything but temperature …

My temperature item is:

Number:Temperature CurrentTemperature "Current temperature [%.1f C]" <temperature> { channel="openweathermap:weather:api:local:current#temperature" }

… but of course that won’t work if the channel is not there :slight_smile:

Hi all,

Let me chim in for a second. We had a similar discussion in the original thread. The binding will not work with OH2.3. It depends on features which are available in the latest snapshot or since OH2.4.M3 milestone build.

@bmentink After a successful upgrade you have to recreate an existing thing. New channels are not added automatically by the framework to them.

If it does not work afterwards may I ask you to provide a DEBUG log. Thanks.

@cweitkamp
If you read my earlier posts, you will see I have upgraded to the latest snapshot of OH2.4 … :wink:
(Just to be clear, I am using: 2.4.0-SNAPSHOT Build#1378, Binding=market:binding-4126092 - 1.0)

I have deleted the OpenWeather “Current Weather” thing, but that did not help, do I also have to remove and re-instate the API thing as well ??

Please indicate how you want me to generate the log?

Cheers

EDIT: Deleting the OpenWeather API thing, as well as the Current Weather thing did not help …

No, it my hint did not work we have to take a look at the logs. Recreating the API thing will change nothing.

Please go into the Karaf console and enable DEBUG logging for the binding (org.eclipse.smarthome.binding.openweathermap). Restart OH2 or restart the binding or just recreate the thing. Copy and paste the resulting log here. Otherwise send it to me via PM.

@cweitkamp
Hmm, I have an issue with logs they seemed to have stopped with this latest snapshot:

/_/                        2.4.0-SNAPSHOT
                           Build #1378   

Hit ‘’ for a list of available commands
and ‘[cmd] --help’ for help on a specific command.
Hit ‘’ or type ‘system:shutdown’ or ‘logout’ to shutdown openHAB.

openhab> log:get
Command not found: log:get
openhab> log:tail
Command not found: log:tail
openhab>

To be honest, that does not look very good. What is in your openhab.log?

@cweitkamp
Things are not looking good, I get lot’s of:

2018-10-08 08:38:38.411 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-package-standard’: No matching features for openhab-package-standard/0.0.0
2018-10-08 08:38:38.413 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-ui-homebuilder, openhab-persistence-rrd4j, openhab-ui-basic, openhab-misc-market, openhab-action-mqtt, openhab-ui-habpanel, openhab-ui-paper, openhab-binding-mqtt1’: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=system; type=karaf.feature; version="[4.1.5,4.1.5]"; filter:="(&(osgi.identity=system)(type=karaf.feature)(version>=4.1.5)(version<=4.1.5))"

and I have problems connecting to my MQTT broker as well …

2018-06-03 13:47:17.618 [ERROR] [penhab.io.transport.mqtt.MqttService] - Error starting broker
connection
org.eclipse.paho.client.mqttv3.MqttException: Unable to connect to server
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.jav
a:79) [202:org.openhab.io.transport.mqtt:1.12.0]
at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:
650) [202:org.openhab.io.transport.mqtt:1.12.0]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]

    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
at java.net.Socket.connect(Socket.java:589) ~[?:?]
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.jav
a:70) ~[?:?]
… 2 more
2018-06-02 15:01:15.371 [ERROR] [org.apache.felix.configadmin ] - Cannot use configurat
ion org.openhab.mqtt for [org.openhab.core.scriptengine.action.ActionService, org.osgi.service
.cm.ManagedService, id=317, bundle=200/mvn:org.openhab.action/org.openhab.action.mqtt/1.12.0]:
No visibility to configuration bound to mvn:org.openhab.io/org.openhab.io.transport.mqtt/1.12
.0
2018-06-02 19:12:08.352 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initiali
zation completed.
2018-06-02 19:12:08.353 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker
connection ‘mosquitto’
2018-06-02 19:12:08.376 [ERROR] [penhab.io.transport.mqtt.MqttService] - Error starting broker
connection

In PaperUI, I don’t have any MQTT binding at all since the upgrade …

@cweitkamp
Any comments?

Am I meant to be using the plugin from eclipse or from you? Can you link what I should be running …

@cweitkamp
After removing the eclipse binding and things, installing the latest jar file from the original thread, and re-adding the things, I still get this error:

2018-10-16 14:13:13.604 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-package-standard’: No matching features for openhab-package-standard/0.0.0
2018-10-16 14:13:13.607 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-ui-homebuilder, openhab-persistence-rrd4j, openhab-ui-basic, openhab-misc-market, openhab-action-mqtt, openhab-ui-habpanel, openhab-ui-paper, openhab-binding-mqtt1’: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=system; type=karaf.feature; version="[4.1.5,4.1.5]"; filter:="(&(osgi.identity=system)(type=karaf.feature)(version>=4.1.5)(version<=4.1.5))"

Is my openhab version wrong

Dear Bernard,

I really like to help you but to be hones, I have no idea whats wrong with your setup. If I should make an educated guess I would tend to a complete reinstall of OH2. I am sorry.

Best,

Christoph

@cweitkamp

Thanks, but I already had done a re-install …

Question: Is it best to add the conf/* files manually after a re-install, or do “restore” with a previous backup file (from 2.3.0) The restore backs up the userdata directory as well, if data in there is from the older version, then added to the new version 2.4.0 … maybe that is upsetting things?

In general yes, but in your case I would restore it only partial. Extract the backup file in a different location and only restore things, items and rules.

@cweitkamp
Hi, I got it working with a complete re-install of the latest snapshot, and manually placing my files (items,sitemaps) etc back in place … it seems the snapshot from 4 Nov- 18 was broke…

I installed the latest 2.4.0 mqtt bindings, but it does not work …
I have told the mqtt-eventbus.cfg file the name of my broker:

#Name of the broker as it is defined in the openhab.cfg. If this property is not available, no event bus MQTT binding will be created.
broker=mosquitto

But that name has to be in openhab.cfg pointing to my broker, but for the life of me, I can’t find that file anywhere, anyone know where it lives … I can’t see it under conf or /etc

Use the 1.x version of the mqtt binding, see MQTT - big issues since upgrading to 2.4.0 Snapshot

Thanks, I did that … now works.

Regarding the weather, I have linked my item to the Temperature, but I still don’t get anything displayed …

The link is:

openweathermap:weather:api:local:current#temperature

and the item is:

Number:Temperature CurrentTemperature "Current temperature [%.1f C]" &lt;temperature&gt; { channel="openweathermap:weather:api:local:current#temperature" }

EDIT: Removed openweather things for the umteenth times, and re-instated … now works :slight_smile:

If I want to publish the openweather temperature is this correct:

Number:Temperature CurrentTemperature "Current temperature [%.1f %unit%]" &lt;temperature&gt; { channel="openweathermap:weather:api:local:current#temperature" }
Number CurrentTemperature {mqtt="&gt;[mosquitto:/Garden/Aeroponics/AirTemp:command:*:default]"}