Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenHAB crashes and restarts after changing an item in landroid sitemap #80

Open
Mercur13 opened this issue Apr 22, 2023 · 4 comments
Open

Comments

@Mercur13
Copy link

The binding does its work if nothing is changed....
But today:
After I changed i.e. mowing duration for today or set the Onetime EdgeCut strange things happened (today twice) ...
The OH-App shows "Not network connection" Http-Error 404. In the log all items from all bindings (homematic, zwave, openweather are reset and after a while (30 sec) slowly inititializing and go online again and so the sitemap.
Neither the Event.log nor the Openhab.log shows what is causing the crash.

Openhab 3.4.2 on Raspi 4, Landroid-Binding 09.04.23; Landroid items and sitemap was copied from nibi's example.

@Mercur13
Copy link
Author

I'm surprised if no one else should have this problem,
my configuration is not exotic (now Openhab 3.4.4 out of the box on a Raspi 4, 16GB SD card,
the sitemap was taken from Nibi's example....)
Based on my layman's understanding, I suspect an overflow that is causing the system to crash.
Unfortunately, the logs do not give any information about the cause.
Who has an idea how to get to the bottom of this phenomenon.

@sihui62
Copy link

sihui62 commented May 23, 2023

I'm surprised if no one else should have this
problem

Nope, sorry 😗

@nibi79
Copy link
Owner

nibi79 commented May 23, 2023

I also have no idea and I don't know how to help you, sorry.

@Mercur13
Copy link
Author

I once described my problem in the German Openhab forum and received the following message from the user/maintainer J-N-K:

[url=https://openhabforum.de/viewtopic.php?p=54850#p54850]Betreff: System-Crash nach Veränderung einer Sitemap-Einstellung[/url]

[quote=J-N-K post_id=54850 time=1685119838 user_id=3736]
So ganz generell kann man sich natürlich fragen, warum man MQTT mit AWS implementiert (was letztlich zu diesem Crash führt), aber:

[code]
@OverRide
public void processMessage(AWSMessageI message) {

    updateStatus(ThingStatus.ONLINE);

    JsonElement jsonElement = JsonParser.parseString(message.getPayload());

    if (jsonElement.isJsonObject()) {
        processStatusMessage(jsonElement.getAsJsonObject());
    }
}

[/code]

ist jetzt keine besonders gute Idee. Laut [url=https://javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonParser.html#parseString(]JavaDoc zu JsonParser.parseString[/url] muss man JSONParseException und JSONSyntaxException handlen, also eher so

[code]
@OverRide
public void processMessage(AWSMessageI message) {
updateStatus(ThingStatus.ONLINE);
try {
JsonElement jsonElement = JsonParser.parseString(message.getPayload());
if (jsonElement.isJsonObject()) {
processStatusMessage(jsonElement.getAsJsonObject());
}
} catch (JSONParseException | JSONSyntaxException e) {
logger.warn("Received invalid JSON content '{}': {}", message.getPayload(), e.getMessage());
}
}
[/code]
[/quote]

@nibi79. Can You please take a look to that ? Because I am far away to understand this.
Thx in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants