Hi,
I’m currently using OpenHAB 1 for my smart home installation. I’m thinking about migrating to OpenHAB2 and ran some tests, but I’m struggling with a simple HTTP item:
- I cannot receive an reading. In the console:
openhab> smarthome:items
L1_Voltage (Type=NumberItem, State=NULL, Label=L1:, Category=null)
openhab> smarthome:status L1_Voltage
NULL
- In the {Classic|Basic}UI, I don’t see my sitemap.
I’m running a fresh install of OpenHABian. I’m using GoSDM630 to read my smart meter. The JSON interface of this software is up and running:
$ curl http://10.23.1.253:8080/last/23
{"UniqueId":"Instrument23","Timestamp":"2017-06-22T14:36:53.288588402+02:00","Unix":1498135013,"ModbusDeviceId":23,"Power":{"L1":0,"L2":0,"L3":0},"Voltage":{"L1":229.6999969482422,"L2":0,"L3":0},"Current":{"L1":0,"L2":0,"L3":0},"Cosphi":{"L1":1,"L2":0,"L3":0},"Import":{"L1":0,"L2":0,"L3":0},"TotalImport":0.39500001072883606,"Export":{"L1":0,"L2":0,"L3":0},"TotalExport":0,"THD":{"VoltageNeutral":{"L1":0,"L2":0,"L3":0},"AvgVoltageNeutral":0}}
I have the HTTP and JSONPATH bindings installed. My (minimal) configuration looks like this:
-
powergrid.items
:
Number L1_Voltage "L1: [%.1f V]" { http="<[http://10.23.1.253:8080/last/23:1000:JSONPATH($.voltage.L1)]" }
-
smartmeter.thing
:
Thing http:device:smartmeter "Smart Meter" @ "Keller" []
-
default.sitemap
:
sitemap default label="Smart Meter Demo" {
Frame label="Strom" {
Text item=L1_voltage
}
}
I don’t see anything unusual in the log:
2017-06-22 13:18:17.202 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.items'
2017-06-22 13:18:50.615 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
2017-06-22 13:18:53.715 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'SmartMeter.things'
2017-06-22 13:19:16.395 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2017-06-22 13:19:30.108 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-06-22 13:19:33.656 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2017-06-22 13:19:38.180 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-06-22 13:19:43.173 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-06-22 13:19:45.332 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-06-22 13:21:26.091 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2017-06-22 13:21:26.609 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2017-06-22 13:22:03.213 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-06-22 13:22:07.253 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-06-22 14:23:57.015 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
I’m clearly missing something. I tried to figure out how to link the smartmeter thing to the L1_voltage item, but the documentation of the HTTP binding does not give me any hint how to do this. Any thoughts?
Thanks,
-Mathias