I have some outlier data from T/H sensors in m time series that I would lie o remove. Is there a way of editing PHPFINA time series data? I did a bit of a search in the archives and there is a mention of emoncms post editing tool but I don’t think it does what I need it to do. Basically, I would like to edit OUTLIERS to NULL in the time series database, point by point. Is this possible?
Did you look at the “spike removal” post-processing? You would need to manually set the min/max levels, it would not automatically identify the values to be removed based on the data itself if that is what you seek.
I’v installed this in the /home/user/local folder on my server and created to the link to /var/www/html/emoncms as directed here and changed the postprocess.settings.php
I was getting errors at start-up of the PHP script with lines in the postprocess_run.php so decided to make the relative path changes in the main file as is below (you’ll see that I have EmonCMS in /var/www/html).
user@server:~/local/postprocess$ sudo php /home/user/local/postprocess/postprocess_run.php
PHP Warning: chdir(): No such file or directory (errno 2) in /home/user/local/postprocess/postprocess_run.php on line 9
Warning: chdir(): No such file or directory (errno 2) in /home/user/local/postprocess/postprocess_run.php on line 9
PHP Warning: scandir(/home/pi/postprocess/processes): failed to open dir: No such file or directory in /home/user/local/postprocess/postprocess_run.php on line 19
Warning: scandir(/home/pi/postprocess/processes): failed to open dir: No such file or directory in /home/user/local/postprocess/postprocess_run.php on line 19
PHP Warning: scandir(): (errno 2): No such file or directory in /home/user/local/postprocess/postprocess_run.php on line 19
Warning: scandir(): (errno 2): No such file or directory in /home/user/local/postprocess/postprocess_run.php on line 19
ERROR: Redis is not enabled
So the script is still picking up /home/pi when it does the scandir but I’m not quite sure why. The other thing is that its saying that REDIS is not running but that is not quite true as:
[Edit - As the use of /home/pi is so ingrained in the emoncms projects, you may even find it easier to just create a symlink at /home/pi to /home/user/local (or even /home/user/local/emoncms_modules to keep the modules together?) so that it appears the modules are in /home/pi.]
I’ve now set redis to Trus and change /home/username to /home/user. Reloaded Apache and now get:
user@server:~/local/postprocess$ php postprocess_run.php
PHP Warning: chdir(): No such file or directory (errno 2) in /home/user/local/postprocess/postprocess_run.php on line 9
Warning: chdir(): No such file or directory (errno 2) in /home/user/local/postprocess/postprocess_run.php on line 9
PHP Warning: fopen(/tmp/postprocess-runlock): failed to open stream: Permission denied in /home/user/local/postprocess/postprocess_run.php on line 11
Warning: fopen(/tmp/postprocess-runlock): failed to open stream: Permission denied in /home/user/local/postprocess/postprocess_run.php on line 11
PHP Warning: flock() expects parameter 1 to be resource, boolean given in /home/user/local/postprocess/postprocess_run.php on line 12
Warning: flock() expects parameter 1 to be resource, boolean given in /home/user/local/postprocess/postprocess_run.php on line 12
Already running
It seems to me that there is some permission problem somewhere?
Regarding your suggestion, are you suggesting creating a user pi on my server? and creating symlinks in there? I’d have to get all the permissions right … seems quite a lot of work.
Wouldn’t it be better to just install the modules in /var/www/htm/emoncms? Although the installation instructions recommend not doing this but just creating a symlink. Because of security?
No, I suggested a single symlink where the user pig’s homedir would reside IF there was a user pi. Since you are using it specifically for emoncms modules only, that single symlink would point to the folder you are actually installing the modules to.
The symlink is just for locating so permissions should not be an issue if your user has the right permissions and the folders are owned by that user (use “pi” as just a path, not a user). It was just a suggestion to avoid any hiccups borne from not using the location that is (wrongly) assumed to be where everyone is using.
Of course this isn’t “the right way to do it” so by all means try and get the paths right via settings etc and edit quoted commands etc to your user if you choose, my suggestion was just something else to try.
No, for security reasons. These modules should not be in the www path and have been designed to be installed, symlinked and used that way intentionally.
I also think you need to use sudo with the command according to the last paragraph of the readme
Really strange that it fails on the chdir() command of line 9. The directory is there. Could it be that by running this as root (using sudo) it won’t access the /home/user folder?
I’ve changed all the “/home/pi” to “/home/user” in the following files:
Yep, I finallly got rid of those two bad guys using editrealtime and added a min/max to inputs.
The data is every 2 minutes so easy to identify.
Thank you