chaozmc/ioBroker.oekofen-json

Wrong object tree

Closed this issue · 7 comments

Touch: V3.00a 01052019
oekofen-json: 0.2.2
iobroker: 7.0.1

initialScan uses as query parameters "??''.
The parsing of the reponse creates an unusable object tree consisting of items with numbers as names.
The content of the reponse is like this:

Start of json when .../all?? is used:
{
http://www.oekofen.at

usage:
http://touch_ip:JSON_port/password/command

read example:
http://192.168.178.19:4321/********/all?

all[?] displays values of all available components
optional parameter [?] adds meta data

system[?]
system global variables

weather[?]
current weather data

forecast[?]
date|temp|cloud|speed|image|code|unit[|sunrise|sunset] code see https://openweathermap.org/weather-conditions

power[?]
powermeter data

stirling[?]
stirling data

hk[1..6][?]
heating circuit data
.....

When I change the code to use just one "?" the reponse looks much better.
The object tree is built correctly with items like 'hk1' and filled with data.

Hi @grueni - thanks for the report. I've used a single "?" at first too, but then it stopped working with a single "?" and i received that help-page. Instead, only when i called the URL with "??" I got the expected response from the interface again. With the double questionmark at least it runs since nearly a year now without any troubles. I tried now to open the URL again with single questionmark in my browser and it also works as expected.

Thats really strange... I'll try if running within the dev-server with the changed url (single questionmark) for longer stops working again and if maybe a power-cycle of the oekofen had "repaired" it on my side...

I've ran a dev-server for longer now with the single question mark and it worked too for quite a long time... i'm going to change it on my iobroker-test installation, which runs on linux, whereas the dev-server runs on windows to see if that makes a difference maybe. If not, i guess I'd change it to single question mark back if that little difference makes it compatible with the V3.00a version of the touch interface too.

Yesterday I got the firmware version V4.00b.
I updated oekofen-json to the current version in the github repo v0.2.5.
The object tree is OK.
Both urls ../all? and ../all?? delivers now identical results.
/all??? (or more question marks) delivers now the help page.

And I'm running the Adapter with the single-? now for 12 days without any issue. I guess this means i can change it in the repo source code too...

LGTM

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has beed automatically closed due to inactivity.