naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
318 stars 63 forks source link

No graph data #20

Closed tomsteenbakkers closed 6 years ago

tomsteenbakkers commented 6 years ago

I have updated the plugin and uninstalled the eve app and reinstalled it to see the graphs. But, unfortunately, no graph data is shown. Is there another way to enable this?

naofireblade commented 6 years ago

The first points of the graph should appear after 10-30 minutes after starting homebridge.

sudo DEBUG=homebridge-weather-station-extended homebridge -D -U /var/lib/homebridge

/var/lib/homebridge is my homebridge folder, it might be different depending on your installation. If you are running homebridge as a service, you can either change your start options or stop the service and start homebridge manually with the given example command.

tomsteenbakkers commented 6 years ago

I will post the log when it is running for 30 min. Where can I find the log when I start Homebridge with the syntax you provided.

naofireblade commented 6 years ago

If you start homebridge with the command, the log will be in your console. If you start homebridge as a service the log should be a part of /var/log/syslog

tomsteenbakkers commented 6 years ago

@naofireblade

Enclosed the logfile log2.txt

naofireblade commented 6 years ago

Thanks for your log. I can see that the history module is starting and that 2 datasets are added. But I can't see any request for the history. Can you provide another log where you close, and reopen the eve app and select the history for e.g. temperature? Homebridge must be running for at least 20 minutes before that.

tomsteenbakkers commented 6 years ago

@naofireblade Enclosed the log file. I can see new entries in de chart. Every 10 min an entry is logged using the DEBUG method. After I restart the Pi the logging stops. The difference is that after the restart Homebridge starts using systemd.

note: I see this only history on the iPhone not on the iPad.

log_2018-02-09.txt

tomsteenbakkers commented 6 years ago

@naofireblade after running Homebridge in debug mode for several hours I stopped the program and started using systemd again. The measurements where working in debug mode. I made one adjustment by setting the debug mode on. It’s running now for 8 hours and all the graphs are recording measurements. Also the graphs for the evohome plugin.

naofireblade commented 6 years ago

Hm so it's working now? Also with systemd? The debug mode cannot be the reason.

PS: There were no graph requests in your log. Are you sure, you closed and opened the Eve app during the logging?

tomsteenbakkers commented 6 years ago

It’s working now. I also use the evohome plugin and I did have the same problems with the graphs. On the iPad I can see the graphs with measurements for the last 24 hours. On the iPhone and still have empty timeframes.

Ps. I did close the eve app several times during logging. And also did some forced refresh. Let’s hope is stays this way 😇

tomsteenbakkers commented 6 years ago

One last thing: can you explain why the iPhone is missing data in certain timeframes while the iPad shows data in the same interval.

awein commented 6 years ago

I came across problems around this as well. This plugin will set the global timer interval for FakeGatoHistory to 4032 minutes. This may affect other plugins as well since this timer will be shared across different plugins. This timer needs to fire to update the history entries and write the history to the filesystem (new feature of version 0.4.0).

https://github.com/naofireblade/homebridge-weather-station-extended/blob/cf38245b12e58f8d601f664f227d6350a3d8cb6f/index.js#L433

I updated the FakeGatoHistory package to 0.4.0 and replaced the line above with:

this.historyService = new FakeGatoHistoryService("weather", this, {
  storage: 'fs'
});

This resolved the issue of missing history data and added support for the new history persistence feature.

naofireblade commented 6 years ago

@awein The number ist the max amount of frames, not the interval. I will try to update to the recent fakegato package on the weekend :) .

@tomsteenbakkers The gaps happen when you restart homebridge before pulling the history on all your devices. After a restart homebridge currently no longer knows the old history data and can't provide it to devices that didn't pulled the history yet. This will be solved in the next update when I integrate the new fakegato release.

naofireblade commented 6 years ago

I'll close this issue as your initial problem is solved. If you have any other questions please don't hesitate creating a new issue.