Rooted (locally accessible) Toon

@dries_dokter , sorry for this late answer. I have got your http way running, and its running like a charm !!
I’m now trying to get the data from the energy meter, done this by copy paste parts from your working example and the info out of the NodeRed example.
I will post it here, when it finished.

1 Like

Hello @DaanMeijer, I was wondering if you were still maintaining this binding.
I’m still happily using it, but every couple of days I get a weird disconnent and need to manually reconnect the binding to the toon (I’m doing this by changing the IP address in the Paper UI config to an invalid IP and back to the original IP).

The error message in paper UI is

OFFLINE - COMMUNICATION_ERROR: Not a JSON Object: “error”

I usually notice this because I use the power consumption from the Toon to create a nice Graph in openhab. My coding skills are not good enough to find the code causing this problem, unfortunately. So if you’re still maintaining this binding and I’d be happy to help in any way I can.

How can i get the different values ad things with a config file?, the comms is running:

Executing transformation ChannelStateTransformation{pattern=’$.metadata.data’, serviceName=‘JSONPATH’} failed: Invalid path ‘$.metadata.data’ in ’

I would like to read the values and set them with rules to control the heating based on heatloss and predicted heatloss

The files that I offered for download (link above) shows how channels are added to a thing and how the transformation can be performed…

I am not sure if I understand your question @Tribalmind

i write all my code in the config files and do not add items through the paper ui. the http thing looks like this:

//Stroom en gas
Thing http:url:toon1 “Toon Energie” [
baseURL=“http://192.168.0.101/happ_pwrusage?action=GetCurrentUsage”,
refresh=60] {
Channels:
Type string : text “powerUsage” [ stateTransformation=“JSONPATH:$.metadata.data” ]
}

// Thermostaat data
Thing http:url:toon2 “Toon Thermostaat” [
baseURL=“http://192.168.0.101/happ_thermstat?action=getThermostatInfo”,
refresh=60] {
Channels:
Type Number: number “Current Temperature” [ stateTransformation=“JSONPATH:$.metadata.data” ]
}

The yaml code you posted can be inserted if you create the http thing in the paper.ui , but i dont know (newb) how to get the same functionality through config files.
I like config files for backing up purposes, just copy the dir.

Is there a way to access the paper ui created config files?

my apologies for not responding Jan-Arie.
But looking at your Toon Energie request. If I do this request:
http://toon/happ_pwrusage?action=GetCurrentUsage
The result is:

{"result":"ok",
"powerUsage": {"value":1500, "avgValue":644.88},
"powerProduction": {"value":0, "avgValue":1.35},
"gasUsage": {"value":0, "avgValue":263.42}
}

That means that the transformation should be e.g. : JSONPATH:$.powerUsage.value
and not metadata.data

thanks, it seems to work , no more errors , but how do i use these things as items, the channels dont appear in the item list

I think the following informaiton would be helpful:
Things
Items

But for the thing that I use (described in the provided YAML) this is an example:

Number CurrentSetpoint "Toon current setpoint" {channel="http:url:Toon_Thermostaat:currentSetpoint"}

Think you should have a look at your Thing defintion because at the moment your channels are named “number” and " text"

I use VS Code as an editor, and the VSC openhab extensioninstalled I can really recommend that!