Hello all,
I have bought and installed OneMeter device to measure my electricity consumption. It is working fine with its own Android phone application e.g. reading information and sync with OneMeter cloud.
There is description how to connected it to OpenHAB. It is using HTTP, JSONPath and MAP Transformation binding. I did what was requested (like adding DEVICE_ID and API_KEY, both are correct), but all values in OH are NULL
/etc/openhab2/services/http.cfg
onemeter.url=https://cloud.onemeter.com/api/devices/<DEVICE_ID>{Authorization=<API_KEY>}
onemeter.updateInterval=900000
Be sure to remove the symbols
<
&>
!
/etc/openhab2/items/onemeter.items
Number onemeter_kwh "OneMeter kWh [%f]" <kwh> { http="<[onemeter:900000:JSONPATH($.lastReading.OBIS['15_8_0'])]" }
Number onemeter_voltage "OneMeter Battery Voltage [%f]" <voltage> { http="<[onemeter:900000:JSONPATH($.lastReading.OBIS['S_1_1_2'])]" }
DateTime onemeter_timestamp "OneMeter Last Readout [%t]" <timestamp> { http="<[onemeter:900000:JSONPATH($.lastReading.OBIS['S_1_1_4'])]" }
Number onemeter_this_month "OneMeter Current Consumption [%f]" <this_month> { http="<[onemeter:900000:JSONPATH($.usage['thisMonth'])]" }
Number onemeter_previous_month "OneMeter Previous Consumption [%f]" <previous_month> { http="<[onemeter:900000:JSONPATH($.usage['previousMonth'])]" }
String onemeter_firmware "OneMeter Firmware Version [%s]" <firmware> { http="<[onemeter:900000:JSONPATH($.firmware.['currentVersion'])]" }
/etc/openahb2/transform/onemeter.sitemap
sitemap onemeter label="OneMeter" {
Frame label="OneMeter" {
Text item=onemeter_kwh
Text item=onemeter_voltage
Text item=onemeter_timestamp
Text item=onemeter_this_month
Text item=onemeter_previous_month
Text item=onemeter_firmware
}
}
I am not sure about transformation itself, naming convention of files and their location.
Is anyone able to see any error in that configuration?
Thanks
Jan K.