- Platform information:
- Hardware: VM on ESXi
- OS: Ubuntu 16.04
- Java Runtime Environment: Zulu-8
- openHAB version: latest
Hello guys and girls,
Long time Domoticz user, I got a bit tired of the very few updates it gets. It works OK at home, but I need something with more active development so I checked out OH2.
So, I’m just playing with it at the moment, went through the beginners guide in the documentation. But I can’t figure out what I’m not doing properly, googled around but still stuck.
Long story short, I got a few MyStrom plugs at home. I currently retrieve power/status in domoticz with a php script. I know there’s a MyStrom add-in for OH, but I do not have a mystrom account and do not intend to create one.
Here’s the situation. MyStrom ouputs a very simple JSON at the URL: http:/ip/report, and it looks like this:
{
“power”: 801.924622,
“relay”: true
}
So I figured using http binding and JSON transform was the way to go. in http.cfg I have:
mystrom1.url=http://192.168.3.243/report
mystrom1.updateInterval=5000
Created an item with this:
Number mystrom1 “mystrom1 Usage” { http=“<[http://192.168.3.243/report:5000:JSONPATH($.power)]” }
In events.log, I can see the power usage change every 5 seconds, so polling works.
Now my question is, how do I display this information in a sitemap? I tried this:
sitemap mine label=“Mine” {
Number item=mystrom1 label=“mystrom1 Usage”
}
But OH errors out saying it couldn’t find any number (in openhab.log). I just don’t understand exactly what I’m doing wrong so if someone could pich in that 'be great
Thanks