Problems with emonhub after updating

Hello,

I'm using emoncms on an raspberry pi with an external hd in a very old version since 2 years. Yesterday I installed an emontx V3 to monitor my energy consumption and it worked immediatly!

After that i also updated the emoncms Webserver. I read that the module rfm12pi is no longer supported and to use the new emonhub modulem is the better decision.

So, I installed also emonhub. After that my feeds didn't work anymore. I couldn't receive any data. The emnonhub installed correctly, but I got the following error:

2015-11-15 21:23:20,782 WARNING emonCMS send failure: wanted 'ok' but got '<br />
<b>Fatal error</b>:  Uncaught exception 'Exception' with message 'ABORTED: Engine id '1' is not supported.' in /var/www/emoncms_new/Modules/feed/feed_model.php:71
Stack trace:
#0 /var/www/emoncms_new/Modules/feed/feed_model.php(530): Feed-&gt;EngineClass('1')
#1 /var/www/emoncms_new/Modules/process/process_processlist.php(211): Feed-&gt;insert_data('25', 1447615099, 1447615099, 136)
#2 [internal function]: Process_ProcessList-&gt;log_to_feed('25', 1447615099, 136, NULL, Object(Process))
#3 /var/www/emoncms_new/Modules/process/process_model.php(47): call_user_func_array(Array, Array)
#4 /var/www/emoncms_new/Modules/process/process_model.php(87): Process-&gt;__call('log_to_feed', Array)
#5 /var/www/emoncms_new/Modules/process/process_model.php(87): Process-&gt;log_to_feed('25', 1447615099, 136, NULL)
#6 /var/www/emoncms_new/Modules/input/input_controller.php(169): Process-&gt;input(1447615099, -136, '2:-1,1:25,4:28,...')
#7 /var/www/emoncms_new/core.php(64): input_controller()
#8 /var/www/emoncms_new/index.php(122): controller('input')
#9 {main}
  t in <b>/var/www/emoncms_new/Modules/feed/feed_model.php</b> on line <b>71</b><br />

 

I didn't find any hint in the forum yet, so I like to ask if any knows this problem.

To loose no data, I switched back to rfm12pi and now it works as before.

Thanx in advance,

Michael

 

pb66's picture

Re: Problems with emonhub after updating

Hi Michael.

The error message you supply tells us there is an issue in emoncms and that error message is being passed back to emonhub, which in turn is objecting because it expects "ok" to confirm succesful posting.

Is emonhub loglevel set to "DEBUG" in emonhub.conf? this may provide more info IF emoncms is erroring due to a bad posting from emonhub.

Is "$display_errors = false" set in emoncms settings.php ? This isn't likely to fix the issue but it will stop emoncms tripping emonhub up unnecessarily and is therefore the correct setting for use with emonhub.

When you say you have reverted to the rfm2pi module, do you mean with the older emoncms or with the new v9?

The emoncms error seems to point to a unsupported data engine so could (hopefully) be just a setting in emoncms settings.php, pay particular attention to the "feed settings" as you have to specify which engines to NOT to support.

Although feed engine type 1 is not available as "timestore" is no longer used . You will probably need to convert the timestore feeds, see usefulscripts, perhaps someone in the know about timestore can assist further.

Paul

Bill Thomson's picture

Re: Problems with emonhub after updating

Perhaps the same issue/fix this user had?

http://openenergymonitor.org/emon/node/11526

 

mik42's picture

Re: Problems with emonhub after updating

Hi Paul,

thanx for your answer. I'll try that and post the result.

Michael

mik42's picture

Re: Problems with emonhub after updating

Hi Bill,

thanx for the hint. I already stumpled many times over that entry. I didn't think, that this solution is a real one, because I couldn't understand, how the cache in an external browser could affect a service on my pi, even if this browser isn't connect. I'd tried it nevertheless and the result was as predicted.

Michael

mik42's picture

Re: Problems with emonhub after updating

Hi Paul,

till now no succes. I started emonhub again, this time in DEBUG Mode. It seems to work correctly, because I can see the data of the sensors coming in, but also the error persists.

What I didn't do yet, is to transform my feeds. There I have an question: Is mysql no longer supported? I got a little confused with the various possibilities to store the data. Have understood it right, that all these PHPFINA, PHPFIWA and so on are only file based methods to store the data.

I had my data in a mysql database and I like to continue with that. So, if I convert my data in my be PHPFINA, I don't need the mysql database any more?

You asked if I used the v9 version of rfm12: No. It was the previos installation that I had and sorry, but I don't know the version, neither do I know how to find out.

Ok, if there's something new, I'll post it.

Michael

 

Paul Reed's picture

Re: Problems with emonhub after updating

I'm not altogether sure of the steps that you took with this installation, but...

Do you have 2 rf interfaces running at the same time, the rfm12pi software and emonhub? i.e. Was the rfm12pi software installed first, then when you have installed v9 you have also installed emonhub?

if so, that may explain the error you are having, and to correct it, you will need to remove the rfm12pi software, so you only have emonhub handling the data.

Does that sound likely pb66?

Paul

mik42's picture

Re: Problems with emonhub after updating

Hi Paul,

I know, that only one of the two, is allowed to run at the same time. I installed both, but only started the one I'm testing with. I think I don't made a mistake there.

So, for today this is it. Will continue tomorrow.

Thank you, for your help!!

Michael

pb66's picture

Re: Problems with emonhub after updating

@Paul - What you say is correct but unlikely to be the issue at hand as the reported error is generated by emoncms, confirmed now as Michael seems confident that part is ok,

@Bill - I think that post may be a bit of ared herring as I cannot see any link between the reported error (which is of the same type) and clearing the cache, I think that error was unrelated to the reason a browser cache "fixed" the issue and the "engine 1" error was fixed or is still present. On that post the error is reported as emoncms.log contents rather than a reply recorded in emonhub.log.

@Michael - the main check should be is "$display_errors = false" set in emoncms settings.php ? then you can see if the correctly parsed data is being forwarded to emoncms and if an "ok" response is given, 

As long as emoncms receives the data and confirms receipt, emonhub should be fully functional and then you can see if the data is or isn't being processed in emoncms.

mySQL is supported in v9 (if not excluded by the "hidden engines" settings in settings.php) it is normal for mySQL feeds NOT to be active in low-write mode to reduce SDcard wear but since you have a hdd you should be ok with SQL feeds, the mySQL tables for non-feed data ie settings, users, dashboards, inputs etc are present in all emoncms versions and not to be confused with the mySQL data feeds.

You can get a report of all your feeds including engine type using 

http://IP.OR.HOST/emoncms/feed/list.json&apikey=123456.......

Do you have any timestore "engine 1" feeds? if so are they active ?

I wouldn't worry too much about converting feeds just yet until it's confirmed to be needed, at most it should only be datastore (engine type 1) that could be an issue if you have that type and the issue persists after emonhub is posting without the error being returned, with the correct "$display_errors = false" set there should only be one of 2 replies expected from emoncms "ok" is successful and "" is not, 

As yet we cannot be sure of the accuracy or validity of the error message, since it could be under suspicion due to the possible red-herring or coincidental "cache fix".

Paul

mik42's picture

Re: Problems with emonhub after updating

Hi Paul,

here is the list of my feeds:

[
{"id":"9","name":"20 Spannung","userid":"1","tag":"null","datatype":"1","public":"0","size":"1976876","engine":"1","time":false,"value":null,"processList":""},
{"id":"12","name":"10 Temperatur","userid":"1","tag":null,"datatype":"1","public":"0","size":"1976836","engine":"1","time":false,"value":null,"processList":""},
{"id":"13","name":"18 Temperatur","userid":"1","tag":null,"datatype":"1","public":"0","size":"1976828","engine":"1","time":false,"value":null,"processList":""},
{"id":"14","name":"18 Spannung","userid":"1","tag":null,"datatype":"1","public":"0","size":"1976820","engine":"1","time":false,"value":null,"processList":""},
{"id":"7","name":"20 Temperatur","userid":"1","tag":null,"datatype":"1","public":"0","size":"1976916","engine":"1","time":false,"value":null,"processList":""},
{"id":"20","name":"20 Feuchte","userid":"1","tag":null,"datatype":"1","public":"0","size":"395564","engine":"1","time":false,"value":null,"processList":""},
{"id":"18","name":"19 Spannung","userid":"1","tag":null,"datatype":"1","public":"0","size":"988524","engine":"1","time":false,"value":null,"processList":""},
{"id":"17","name":"19 Temperatur","userid":"1","tag":null,"datatype":"1","public":"0","size":"988532","engine":"1","time":false,"value":null,"processList":""},
{"id":"34","name":"Phase2neu ","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"25","name":"Phase1","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"26","name":"Phase2","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"27","name":"Phase3","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"28","name":"Energie1","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"29","name":"Energie2","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"30","name":"VerbrauchTag2","userid":"1","tag":null,"datatype":"2","public":"0","size":null,"engine":"0","time":false,"value":null,"processList":""},
{"id":"31","name":"VerbrauchTag1","userid":"1","tag":null,"datatype":"2","public":"0","size":null,"engine":"0","time":false,"value":null,"processList":""},
{"id":"32","name":"Energie3","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"33","name":"VerbrauchTag3","userid":"1","tag":null,"datatype":"2","public":"0","size":null,"engine":"0","time":false,"value":null,"processList":""},
{"id":"35","name":"New Virtual Feed","userid":"1","tag":"Virtual","datatype":"1","public":"0","size":null,"engine":"7","time":null,"value":null,"processList":""},
{"id":"36","name":"Spannung Node9","userid":"1","tag":null,"datatype":"1","public":"0","size":null,"engine":"1","time":false,"value":null,"processList":""},
{"id":"37","name":"node:9:12","userid":"1","tag":"Node 9","datatype":"1","public":"0","size":null,"engine":"0","time":false,"value":null,"processList":""},
{"id":"38","name":"node:9:12","userid":"1","tag":"Node 9","datatype":"1","public":"0","size":null,"engine":"0","time":false,"value":null,"processList":""}
]

As you see there are lots of engine:1. I'll try to convert my data and see if this will help.

I'll also switch off the display_error and see what I get.

Till later!

Something else: Where can I get rfm12 V9 or how can I see if I have it already? 'sudo service rfm12piphp status' doesn't tell me anything...

Michael

mik42's picture

Re: Problems with emonhub after updating

Hi all,

sorry, that I didn't show up earlier. I'd tried all your suggestions but it didn't bring me anywhere. So, i decided to back up my data and perform a complete new installation. So, here I am.

The good part is: Emonhub is running without errors and I can the data coming in.

The bad part: If I try to create a new fees, I get the error: Feed could not be created, undefined.

So, I searched the forum and there many cases, but none of them worked for me!

Do you have any idea?

Thanx in advance!!

Michael

Paul Reed's picture

Re: Problems with emonhub after updating

Can you give a link to which installation guide you used please.
Also did you install a fresh OS, and which one - Wheezy or Jessie?

Paul

pb66's picture

Re: Problems with emonhub after updating

Hi Micheal, 

I haven't been about much lately and missed your last but one post.

rfm12piphp is replaced by emonHub so there is no v9 or need for it.

As Paul says more info would help, but the usual suspect is the feed folder permissions

Paul

mik42's picture

Re: Problems with emonhub after updating

Hi Paul,

I used the guide that comes with the installation:

https://github.com/emoncms/emoncms/blob/9.0/docs/RaspberryPi/readme.md

I didn't install a new OS (i have wheezy), only deleted all emoncms things.

Thx,

Michael

mik42's picture

Re: Problems with emonhub after updating

Hi together,

at last I succeded! 

The problem with the new installation was the browser cache!! (Someone mentioned this before, but in other circumstances). I used accidentally another browser, normaly firefox, and t o build a new fedd worked immediatly. So I cleared the cache in firefox and from that time it worked also.

I had then a working system (V9), but without my old data. To transfer the old timestore in the old database to the new database as phpfiwa I did the following:

  1. I dumped the new database.
  2. I restored the old one and copied the timestore data in /var/lib/timestore. I didn't install the old version of emoncms, only the database.
  3. I used the script usefulscripts/convertdata/phptimestore_to_phpfina_mv.php to convert my old data
  4. After starting emoncms I saw all my old feeds and could access the data. (I also started emonhub, but that doesn't work. No new data was collected)
  5. I printed the overview over the inputs and the feeds, to get all the original feedid's and my configurations.
  6. I dropped the old database and installed again the new database. When I started emoncms and emonhub, it worked, but I couldn't see my old data.
  7. I stopped emonhub and created the feed as I created them in old database.
  8. I used phpmyadmin to alter the feedid's in the feed table and also the link to the feed table in the input table.
  9. After that I started emonhub and since then the new data is added to the existing, as I wanted.

Thanks a lot for your help!

Till next tme,

Michael

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.