Jump to content

Emoncms can't logging an input


NICLOS

Recommended Posts

Hello

I've burned ICC image on SD card. In spite an initial error reported in other topic, ICC works and shows information from inverter.

However, when I'm trying to use emoncms site to see historical information, it doesn't show anything.  Before logging succesfully in site, I could see input data but when I modify an input process to logging to feed data, after a while, it displays a "wait..." message that let me think that something gone wrong. In order to see if there is any problem, I check a modified input process and I noticethat log to feed doesn't work, it shows an error message "Feedid does not exists or was deleted".

Attached some screenshots that could explain my problem.

Anyone with similar problem? Is there my fault? Maybe there is something I must do and I forget to do it?

Thanks in advance.

feed does not exists.png

wait.png

node.png

input.png

Link to comment
Share on other sites

The input comes directly from the reader so I would say delete the input , pvwatt , from Emon and when the reader sends the new data it should then be logged correctly. Alternatively you could also create a new user on the server and just change the key for a minute so that the data logs to the new account and confirm that the PV watt is now working on the new account then you can delete the pvwatt input and the correct data should then word. If I have to guess the pvwatt input in the sql got corrupted so you could also check in the sql if you can find the input.

Alos I noticed that you have not added any processes yet so it should look something like this when you are done:

2017-02-01_075012.png

Keep in mind that Emon local is heavily developed and not nearly as stable as the online version so you are bound to have so hiccups now and then.  

Link to comment
Share on other sites

Sorry for posting in the wrong thread. I've noticed there is an specific thread for emoncms at Renewable Energy topic.

I understand what PaulF007 says. Before to try your suggestion, I would explain a doubt. I could see input values on local emoncms without doing anything, just login as ICC. All inputs have been setup at ICC image, I haven't done anything and inputs get correct values. So I'm worried if I delete any input I would like to log, it won't appear. Could it happen? Could be any other explanation for this feed error?

Thanks

Link to comment
Share on other sites

@KIKE NICLOS I can't say for certain as I am not familiar with ICC but they way Emon works is data is sent via MQTT protocol once the data is received it is placed in the Inputs in emon. If you delete the input it will just "create" a new input once the data is received from the reader. The data you see in the inputs is not logged and is just showed as it comes in. So there should not be an issue with deleting the input but @Manie maybe you can just confirm? Worst case you might need to reset the image but again that's out of my league.

Regards

Paul 

Link to comment
Share on other sites

I'm afraid your suggestion haven't worked on emoncms. I've deleted default inputs and it's true that new inputs appears but result don't change. I've get same error on process list "Feedid does not exists or was deleted". At input site shows a "wait.." message according to previous pictures.

I've checked emoncms log file to have a look in case a mistake have been registed. I could see same error repeats always: "ERROR input_controller.php ! Format error, json value is not numeric". Its an odd thing because it seems input values are right but I'm not sure. I've tested information got from emoncms. maybe a json string received can't be readed so thats why I can log any input. I'm not sure if modifying input_controller.php solve the problem

Could anyone give me a clue about my problem? Attached there are different screenshots about my problem

input.png

Captura de 2017-02-03 17:06:41.png

Captura de 2017-02-03 17:51:50.png

Captura de 2017-02-03 22:03:56.png

Link to comment
Share on other sites

Hi Manie, I'm battling to get past the local emon login page, as explained in the Pi overheating thread, but i think this thread is more appropriate, so I will repeat my problem briefly, in that I don't get to the local registration page, just the login page. What am I missing. I checked the emoncms help pages, and it clearly shows the registration page. Thanks in advance.

Link to comment
Share on other sites

I found this on the openenergy forum:

"Re: EMonCMS Pi Login failing

Submitted by glyn.hudson on Wed, 06/11/2013 - 17:45.

you're running the 'old' emoncmspi SD card image not the new 'gateway' image. The default ssh login is user 'pi' and password 'raspberry'. The default emoncms login (for the web interface) is user 'raspi' and password 'raspberry'

 

I have updated the documentation with user name and password and note at the top to explain the difference between the new and old image: http://emoncms.org/site/docs/raspberrypiimage"

So I know whats wrong, but am stuck how to fix this. The link in quote above is blank, so digging further, i found:

Sorry, long post....but my question is: Do I follow the whole process, or just the part where one creates the user and password. I was under the impression that the ICC Image has already emoncms installed?

Updating emoncms via Git

Emoncms is regularly updated to add new functions and general improvements, and updating your emoncms installation can be achieved quickly and easily using Git.

It is however important, that emoncms was initially installed by following the Raspberry Pi installation guide or by git-cloning the emoncms github repository.

To check if an emoncms update is available, and update your installation:

cd /var/www/emoncms && git pull

The command 'git pull' will compare your installed version of emoncms with the emoncms software stored in Github, and if any new files are available, they will be automatically downloaded to your installation.

Carefully note the message displayed after running the command, as it will tell you if the update was sucessful, and also list which files were updated in the process. With the majority of updates, nothing more needs to be done and your installation will now be up to date, however if you see that the default configuration file - 'default.settings.php' has been updated, it will be necessary to update the settings.php file as follows.

NOTE The following is only necessary if the default.settings.php has been updated!

Backup your settings file:

cd /var/www/emoncms/ && mv settings.php oldsettings.php

Copy the new updated default.settings.php as settings.php

cp default.settings.php settings.php

Open settings.php in an editor:

nano settings.php

Update your settings to use your Database 'user' & 'password', which will enable emoncms to access the database:
This is exactly the same process which was done during the initial emoncms installation.
If you cannot recall your Database 'user' & 'password', you can obtain them from the 'oldsettings.php' backup file.

$server   = "localhost";
$database = "emoncms";
$username = "emoncms";
$password = "new_secure_password";

Save and exit.


Module installation

Apps Module
Device Module
Dashboard Module
OpenBEM Module

Install emoncms Apps Module

Installing 'Apps' to emoncms adds a number of pre-formatted templates, enabling data to be displayed across a wide range of devices such as desktops, tablets and smartphones.

To install Apps, cd to the Modules folder, and git clone 'apps':

cd /var/www/emoncms/Modules && git clone https://github.com/emoncms/app.git

The 'apps' need to save their configurations in the emoncms database, so in your browser - update your emoncms database: Setup > Administration > Update database (you may need to log out, and log back into emoncms to see the Administration menu).

App configuration

You should now see a new menu item - 'Apps' on the menu bar, with a number of sub-menus. At this stage they will not display any data as they have not been configured.
To configure each app, using 'My Electric' as an example, select the spanner/wrench icon top right which will open the 'My Electric' configuration options page, and select the appropriate feeds & currency details and 'save'.
The choice of feeds is totally a user preference, and you could use appropriate feeds to:

  • Display Power imported
  • Display Power exported
  • Solar Generation
  • etc!
App update

The emoncms 'apps' are updated to add new functions and general improvements, and updating your apps installation can be achieved quickly and easily using Github.

To check if an 'apps' update is available, and update your installation:

cd /var/www/emoncms/Modules/app && git pull

The command 'git pull' will compare your installed version of 'Apps' with the 'Apps' software stored in Github, and if any new files are available, they will be automatically downloaded to your installation.

Carefully note the message displayed after running the command, as it will tell you if the update was successful or not.

Install emoncms Device Module

The device setup will allow the creation of inputs and feeds automatically from a device template, and use a devicekey per device that is user configured, instead of an apikey.

To install 'device', cd to the Modules folder, and git clone 'device':

cd /var/www/emoncms/Modules && git clone https://github.com/emoncms/device.git

The 'device' module needs to save it's configurations in the emoncms database, so in your browser - update your emoncms database: Setup > Administration > Update database (you may need to log out, and log back into emoncms to see the Administration menu).

Install emoncms Dashboard Module

The dashboard module enables users to create customisable workspaces, by dragging and dropping widgets, visualisations and other custom objects.

cd /var/www/emoncms/Modules && git clone https://github.com/emoncms/dashboard.git

The 'dashboard' module needs to save it's configurations in the emoncms database, so in your browser - update your emoncms database: Setup > Administration > Update database (you may need to log out, and log back into emoncms to see the Administration menu).

Install OpenBEM Module

OpenBEM is an open source energy assessment tool to help you explore how you can achieve this level of performance improvement in your own home.

cd /var/www/emoncms/Modules && git clone https://github.com/emoncms/openbem.git


System Logs

System logs provide a valuable insight into the health of your system, however once you are satisfied that your emoncms installation is running smoothly, and you have no log errors reported, you may wish to disable your system logs.

This is purely optional, and a personal preference.

If at any stage you experience problems with your system, restoring your logs may help you resolve the problem, and can be achieved by reversing these instructions.

Disable emoncms log

In emoncms settings.php change log_enabled = true; to log_enabled = false;

Alternatively, you can specify the level of logging activity by changing log_level = 2; to any of the values shown in the settings.php file.

cd /var/www/emoncms && nano settings.php

Save & exit

Disable MYSQL log

You are only required to disable the MYSQL log in Raspbian Jessie, it does not apply to Raspbian Wheezy.

sudo nano /etc/mysql/my.cnf

Comment out the line # log_error = /var/log/mysql/error.log with a # - as shown.

Disable Apache log

Edit the apache configuration file (according to your operating system):

sudo nano /etc/apache2/sites-available/000-default.conf (Raspbian Jessie) OR sudo nano /etc/apache2/sites-available/default (Raspbian Wheezy)

Comment out the line - # CustomLog ${APACHE_LOG_DIR}/access.log combined

Save & exit, then disable the log to other-vhosts:

sudo nano /etc/apache2/conf-available/other-vhosts-access-log.conf (Raspbian Jessie) OR sudo nano /etc/apache2/conf.d/other-vhosts-access-log (Raspbian Wheezy)

Comment out the line - # CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined

Save & exit:

Disable Redis log

Configure redis to run without logging:

sudo nano /etc/redis/redis.conf

Comment out the line - # logfile /var/log/redis/redis-server.log

Save & exit:

That completes the log reconfiguration, now reboot to effect the changes:

sudo reboot

Link to comment
Share on other sites

Hi Manie, I'm battling to get past the local emon login page, as explained in the Pi overheating thread, but i think this thread is more appropriate, so I will repeat my problem briefly, in that I don't get to the local registration page, just the login page. What am I missing. I checked the emoncms help pages, and it clearly shows the registration page. Thanks in advance.


Did you login as ICC and password raspberry

Sent from my SM-G920F using Tapatalk

Link to comment
Share on other sites

On 3/2/2017 at 10:05 PM, KIKE NICLOS said:

I'm afraid your suggestion haven't worked on emoncms. I've deleted default inputs and it's true that new inputs appears but result don't change. I've get same error on process list "Feedid does not exists or was deleted". At input site shows a "wait.." message according to previous pictures.

I've checked emoncms log file to have a look in case a mistake have been registed. I could see same error repeats always: "ERROR input_controller.php ! Format error, json value is not numeric". Its an odd thing because it seems input values are right but I'm not sure. I've tested information got from emoncms. maybe a json string received can't be readed so thats why I can log any input. I'm not sure if modifying input_controller.php solve the problem

Could anyone give me a clue about my problem? Attached there are different screenshots about my problem

input.png

Captura de 2017-02-03 17:06:41.png

Captura de 2017-02-03 17:51:50.png

Captura de 2017-02-03 22:03:56.png

Same here....

Same error:   Format error, json value is not numeric.   All of 25 inputs have got json value numeric.  Any explanation?

Link to comment
Share on other sites

  • 2 weeks later...

I could finally fix this json error. I don't know why url string (that contains json string) sent by ICC to emoncms has a variable without value.  My solution was really simple, setting a zero to this variable.

In addition to this, I kept having problems to logging any input. The problem was redis database was enabled. Maybe this database was not properly setting and make impossible mysql to work as expected. I've disabled redis db and it works.

I'm wondering redis is job in this cms. Maybe to enable some input process but I'm not sure at all

Link to comment
Share on other sites

All this talk of json. Apologies to the people who don't speak the languages involved, but extremely humourous story of how a German joke got translated into Afrikaans. Both start out with a young gentlemen knocking on a door with the father of the young lady opening: First, the German:

Hallo, Ich bin Umberto. Ich bin hier um ihre Tochter zu ficken!

Um was!?

Nein, Umberto!

Now the Afrikaans version, picture a young man from the Western Cape:

Goeiemiddag meneer, my naam is Jason, ek is hier om jou dogter te n***.

Djy wat!?

Nee meneer, Djy-SUN!

Link to comment
Share on other sites

On 22/2/2017 at 9:11 AM, KIKE NICLOS said:

I could finally fix this json error. I don't know why url string (that contains json string) sent by ICC to emoncms has a variable without value.  My solution was really simple, setting a zero to this variable.

In addition to this, I kept having problems to logging any input. The problem was redis database was enabled. Maybe this database was not properly setting and make impossible mysql to work as expected. I've disabled redis db and it works.

I'm wondering redis is job in this cms. Maybe to enable some input process but I'm not sure at all

There are two variables without values or format error.    invertermode hasnt got value and battery_timetominute sometimes gives 00 and sometimes gives :1    .  When it gives :1 json error is reported to log.

Link to comment
Share on other sites

My case is that battery_timetominute shows : afterwards but there is no value.

If there isnt any suggestion, what I've done on php code is to detect this variable name and then set to zero.

For me is not important this value, so I fix json error.

Y esto es todo lo que he hecho

I expect it could help you

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...