I'm just trying to set up a development environment on Ubuntu to see what I can do with emonCMS locally. I went through all the installation steps and thought I would use the import_inputs.php and import_full.php scripts to get my existing data from emoncms.org for testing.
The first issue I had was that my new emoncms database table 'input' did not have a record column. I added that with no problem, but still the import_inputs.php script would not work. It seems to be expecting a record value in the JSON feed, but there isn't one.
My JSON inputs feed looks like this:
[{"id":"115607","nodeid":"10","name":"3","description":"","processList":"","time":"1388957715","value":"0"},{"id":"115608","nodeid":"10","name":"4","description":"","processList":"","time":"1388957715","value":"0"},{"id":"115615","nodeid":"10","name":"1","description":"Solar Power","processList":"1:26298,5:26299","time":"1388957715","value":"9"},{"id":"115617","nodeid":"10","name":"5","description":"Mains Voltage x10","processList":"2:0.01,1:26295","time":"1388957715","value":"23932"},{"id":"115618","nodeid":"10","name":"6","description":"Temperature","processList":"","time":"1388957715","value":"0"},{"id":"116616","nodeid":"10","name":"7","description":"Solar Apparent Power","processList":"1:26828","time":"1388957715","value":"30"},{"id":"116617","nodeid":"10","name":"8","description":"Grid Apparent Power","processList":"","time":"1388957715","value":"913"},{"id":"116618","nodeid":"10","name":"9","description":"","processList":"","time":"1388957715","value":"0"},{"id":"116619","nodeid":"10","name":"10","description":"","processList":"","time":"1388957715","value":"0"},{"nodeid":"10","processList":"1:26403,5:26404,16:26405,11:115615,1:26402,5:26406,16:26407,22:115615,24:0,1:28121,5:28119,16:28120,11:124153,25:0,2:-1,1:28159,5:28168,16:28169","description":"Grid","id":"124153","name":"2","time":"1388957715","value":"936"}]
Are there other things I need to do to get this working?
Re: emonCMS import_inputs.php problem
I had the same problem, no "record" in the JSON feed (from emoncms.org) but the import scripts seems to think it should exist.
I "fixed" the problem by ignoring the record value, but it would be nice to know if it´s needed or not (seems to work so far).
If it isn't needed anymore the scripts could be updated.
/ David
Re: emonCMS import_inputs.php problem
The record field is no longer needed. thanks for the reminder, I've updated the file: https://github.com/emoncms/usefulscripts/blob/master/replication/import_...