You may run is manually by installing the command in CRON via crontab, run node updatefiles from the command line or click the link on the about page. The next version of Server will do it automatically if you have the Config option set to Yes.
I have been thinking about this and there is not great solution. So, I will have the application send an alert if you have Pushover or Prowl installed and I will place a notice on the Home page of the built in Server.
There is no good way to limit the size but I can consider doing so. I recommend that you view the logs and delete them if there are no errors or issues. At this point, I suggest you delete all the logs and check them at least once a week.
Thank you. I have tablets all over my house as part of my home automation system. My wife likes to see the temperature so she knows if she will freeze. Sheâs from Saigon and there it is only have hot and hotter.
There are several good tools. I use Sysyog. You can even use the free GUI from MySQL.
On linux you can use Logrotate to compress logs, and delete them after a certain time/number of logs
Search for a tuto how to install on your raspberry and then config it to rotate the logs from wfarchive ÂŽ, else the good old way when you see them grow to big, delete via the server page.
I donât see the need for major changes in the near future so the applications should remain stable for the next two months. I will be working on all current issues that get reported and making small enhancements. The next addition is to add uploading to PWSWeather. Otherwise I will spend time cleaning the current code and playing with internal temperature sensors.
I am also working on a non-cloud based video doorbell.
Gary - playing around with the code this am (hope you do not mind) and came up with a slightly improved wind direction animation.
We have a small cold front with winds almost from due north and I noticed that when the wind is flipping from the 20s to the 350s, the arrow indicator sweeps all the way around to 350s.
Seems more natural to me to have it sweep from right to left from 20 to 358.
Here is one solution which I believe works to handle this case. Just a few lines of code and a local var moveDir and WindDirLast is global.
socket.on('wind', function(data) {
let j = JSON.parse(data);
let aa, dir, moveDir, windspeed;
W = j.ob[1];
let windColor = window.WeatherCalc.getWindColor(W);
if (j.ob[2] == null) {
//$('.windArrow').css('display', "none");
$('.windcompass').css('border', "9px solid rgba(" + windColor + ", .7)");
document.getElementById("winddirection").innerHTML = '';
document.getElementById("winddirectiontext").innerHTML = '';
windspeed = 0;
} else {
if (j.ob[2] == 0) {
dir = 360;
} else {
dir = j.ob[2];
}
// default to the current wind direction
moveDir = dir;
// handle case where wind changes from 0 to 90 to 270 to 360(0)
// This will rotate the arrow to the left instead of all the around to the right
if( dir > 270 && WindDirLast < 90)
{
moveDir = dir - 360;
}
// save current wind direction for next time around
WindDirLast = dir;
aa = 'rotate(' + moveDir + 'deg)';
$('.windArrow').css('display', "block");
$('.windArrow').css('-webkit-transform', aa);
$('.windArrow').css('-moz-transform', aa);
$('.windArrow').css('-o-transform', aa);
$('.windArrow').css('-ms-transform', aa);
$('.windArrow').css('transform', aa);
$('.windcompass').css('border', "9px solid rgba(" + windColor + ", .7)");
document.getElementById("winddirection").innerHTML = dir + '°';
document.getElementById("winddirectiontext").innerHTML = window.WeatherCalc.GetCompass16(dir);
windspeed = window.WeatherCalc.convertWindSpeed(j.ob[1], panel.unit.wind);
}
document.getElementById("windspeed").innerHTML = windspeed.toFixed(1);
});
You are close and I have tested this. The issue is the degrees can wind up like a watch and end up being a direction value that can increase to 1700 which is shown as 264 degreesâŚ
The compass is not actually a circle but a line that is curved. It starts at zero and ends at 359. If you set it to 360 it goes to 359 then wraps to 0 moving left to right. If you then set it to 0, it will actually look as it it is unwinding in a complete circle.
As for the formula, the method to accomplish this is calculate the amount of movement. We will set the default movement to left-to-right. Then calculate value of degrees to move. If that value is greater than 180, the movement would be right-to-left and the value would be the value to move - 360.
This works if the previous direction is less than the new direction. If the previous direction is greater than the new direction and the movement is more than 180 then an entire new set of code is needed. Once this is in place there is even more code to keep track and convert the actual direction to the pseudo direction.
Itâs actually several lines of code and while not complicated it can get confusing to non-programmers. Itâs a lot of IFs and Iâll put the code in if users really want this.
@GaryFunk, is this an issue because polar coordinates are not being used? Iâm not sure what routines or functions are available but it seems like a polar coordinate issue with a fixed radius. Calculate the polar coordinate steps and run the results through a polar to Cartesian routine to plot the results.
Itâs hard to justify extra code for some things. What does it look like if motion isnât animated? Is it too jumpy? I like seeing the animation on the WF app but Iâm not keen on the âswinging all the way aroundâ just for a few degrees across north.
it works but looks a little strange. The motion gives a better visual indication of direction.
Iâm testing the code between watching episodes of âKing of the Hillâ on Hulu. I truly like the idea of the animation emulating a physical compass. After all, itâs just a few lines of code on the browser side.
I have added the code suggestion provided by Mark (@mao) since preliminary testing shows it to be 99% accurate.
Full testing would require running through 46,656,001 irritations of previous and current wind variables. So, until I can prove exactly where it fails, I feel it is a good change.
A big Thank You to Mark for providing this change.
WeatherFlow has many more products than the Smart Weather Station and this application only deals with this one product. Therefore, I am renaming this application to ArchiveSW.
Updates will not affect current installs but future installs will be placed in the folder âarchiveswâ or the folder of your choice.