dm82m / hassio-addons

HAOS add-ons developed by dm82m
MIT License
26 stars 18 forks source link

json-live-data-server stops updating values #30

Closed Malfed closed 6 months ago

Malfed commented 7 months ago

Hey,

I don't know where to place this issue because I'm not sure if it belongs here to the Resol-VBus-Addon or to the json-live-data-server. However, since I didn't have the problem when using the json-live-data-server directly without this addon I'd like to address this issue here.

So, my setup is not completely "basic", but this shouldn't be a problem. I'm using two devices with Home Assistant, let's name them "HA-Main" for my main Home Assistant Installation on a Lenovo ThinkCentre and "HA-Pi" for a second Home Assistant installation on a Raspberry Pi. HA-Main is located on the first floor, HA-Pi is in the basement next to the Resol DeltaSol. HA-Pi has an UART-TTL USB adapter attached with the connection to the VBus. I've installed this Resol-VBus addon on HA-Pi, configured it and it's working after starting it. In addition I've installed hass-Deltasol-KM2 on HA-Main and configured it to get it's data from HA-Pi. With this configuration everything worked like a charm. But from time to time the json-live-data-server does not deliver any new data. It does not crash or timeout, it just stops getting new values. Here are some examples how it looks like when having a look at the system_time:

image

The time goes up until no new values are received (at 11.02.24 19:00). After I restart the Resol-VBus-addon (at 12.02.24 15:30) new data is received until it stops again (at 13.02.24 11:00). This keeps going on for days now. This also applies to all other values, like the temperatures.

While searching for a log file I've discovered "textLogging"-configurations and tried to enable them. This is my configuration right now:

const path = require('path');
const config = {
    logLevel: 'debug',
    httpPort: 3333,
    loggingInterval: 10000,
    loggingFilename: path.resolve(__dirname, 'live-data.json'),
    textLoggingInterval: 30000,
    textLoggingTimeToLive: 60000,
    textLoggingPath: path.resolve(__dirname, 'log'),
    textLoggingOptions: {
        columnSeparator: '\t',
        lineSeparator: '\r\n',
        separateDateAndTime: false,
    },
    connectionClassName: 'SerialConnection',
    connectionOptions: {
        path: '/dev/ttyUSB0',
        host: '192.168.13.21',
        password: 'vbus',
    },
    packetFieldNameMap: {
    },
    emSimulatorSubAdresses: [],
};
module.exports = config;

But this did not enable some kind of debug output, but additional logging to csv files in the folder "log". I don't know if this helps, but this logging continues when no new data is received, but the timestamp stops to increase, too:

image

In addition I'm able to call the webserver and get data, but this data is no longer updated. So all in all I'm looking for a way to get more detailed information on what is happening. Is there any log file I can take a look at or submit it here?

Before using the Resol-VBus-addon I had the json-live-data-server running on a second Rasperry Pi directly without noticing this problems. I wanted to save this second Pi and run json-live-data-server on my HA-Pi, but now I'm encountering this problems. Anyone able to help?

Thanks in advance! :)

Malfed commented 7 months ago

Little update on this: I've set up a second raspberry pi and installed the json-live-data-server directly on it (without Home Assistant) following the installation guide on https://github.com/danielwippermann/resol-vbus/blob/master/examples/json-live-data-server/README.md. I'm using the same config and the same USB device as with the Home Assistant addon. Right now everything is working without any problems for over 24h, so it seems like the problem has to do something with Home Assistant or the addon itself.

Update 2 days later: still working without any issue. So I think the problem must unfortunately be the combination with Home Assistant.

dm82m commented 6 months ago

as the add-on is only executing the json-live-data-server, so its a wrapper around it within the HA ecosystem I guess it has something todo with your setup or home assistant itself. as no other users are having this issue, I will close it here.

Malfed commented 6 months ago

Thanks for taking the time to read my issue, even though there is no solution. The json-live-data-server is still running without Home Assistant for two weeks now and it's having absolutely no issues. So if anyone else is reading this having similar issues the only solution is to run the json-live-data-server directly without this Home Assistant addon.