I am trying to use sync to create a clone of my emoncms.org setup I have just updated my sync module however when I download the ‘inputs’ I get
“Notice: Uninitialized string offset: 1 in /home/pi/sync/sync-module/sync_controller.php on line 273
Fatal error: Cannot access empty property in /home/pi/sync/sync-module/sync_controller.php on line 273”
All I can determine from this is that this line fails :-
I downloaded the image “emonSD-26Oct17.img” on 11 May and I had already updated Sync today using git pull before my initial post. I have just done a git pull on emonpi then run “./emoncmsupdate” (I guess this last step probably inherently repeats the previous step?). So as far as I can tell I am fully up to date. Maybe this is data dependent, so I would be happy for you to access my data if that would help.
Is there a manual way of getting the “inputs” data from emoncms.org onto my emoncms raspberry pi?
Ok that’s fine I wanted to check if you had it running or not. Running sync_run manually should also work, if you first click on the feeds you wish to download and then run sync_run that should then run through the feeds you wish to download.
Your trick works just fine without using the service runner.
I have now checked all my feeds. There are a few I can’t download. I don’t know if this is related to the issue
you opened in Github. Maybe you could have a quick look. Here are the IDs:
Regarding the dashboards:
At some point you said you are working on it. That’s fine. I just would like to report a message I got
when running the download process from the web interface:
Fatal error: Uncaught Error: Call to a member function bind_param() on boolean in /home/pi/sync/sync-module/sync_controller.php:344
#0 /var/www/emoncms/core.php(64): sync_controller()
#1 /var/www/emoncms/index.php(189): controller('sync')
thrown in /home/pi/sync/sync-module/sync_controller.php on line 344
Would it not make sense to move the service-runner to the emoncms repo? We can expand the emoncms install guide to include the service-runner rather than documenting how to install the whole emonpi repo, setup and use the service-runner in each module repo that uses it.
Yes I think that’s a good idea, it makes sense that it can be used for different self-hosted setups. Perhaps to be reviewed alongside @Paul and your suggestions about wider emoncms installation changes.
When I sync’d with this I got the list of inputs with all the processing lists intact but the feed in each case was the first feed in the feed list. I went through all of the inputs correcting this but now when I display the feeds the waiting symbol appears in the browser and finally the error:
Notice: Array to string conversion in /var/www/emoncms/Theme/basic/theme.php on line 165
Also I don’t have either of my multigraphs present, shouldn’t they have copied too?
It looks to me there is a problem downloading feeds if their names contain square brackets.
I have renamed such feeds and now I can download them.
That resolved problem reported in some of my feeds.
I have still a few “ERROR” in Process list. I will try to fix them and report if I can’t.
Same here, I couldn’t get the Sync module to Sync the data out, but the Backup module worked great after I deleted the folders & reset the permissions as suggest in the other thread. The Sync module then copied over all the Dashboards correctly, and the Inputs (with Process Lists) mostly OK. I had to manually fix some of the feeds it was logging to for some reason. It’s now seems to logging locally OK, a few days of testing will hopefully confirm all is well.
I have setup sync module, and now it appears in Setup area. When I fill up Host, Username, Password and press Connect, then it try to connect and failed with authentication failure. I checked Host, Username and Password in a browser for the remote host and they are correct.
When I check apache error log I can see following PHP warning and errors every time sync module is trying to connect remote host:
PHP Notice: Trying to get property ‘host’ of non-object in /home/emoncms/sync/sync-module/sync_controller.php on line 50, referer: https://emoncms.domain.com/sync/view
PHP Notice: Trying to get property ‘apikey_read’ of non-object in /home/emoncms/sync/sync-module/sync_controller.php on line 50, referer: https://emoncms.domain.com/sync/view
PHP Warning: file_get_contents(/feed/listwithmeta.json?apikey=): failed to open stream: No such file or directory in /home/emoncms/sync/sync-module/sync_controller.php on line 50, referer: https://emoncms.domain.com/sync/view
PHP Warning: Invalid argument supplied for foreach() in /home/emoncms/sync/sync-module/sync_controller.php on line 82, referer: https://emoncms.domain.com/sync/view
Looks like sync_controller cannot initialize $remote object properly.
Is there any PHP or PECL modules required for sync module to operate properly for http, as well https remote hosts?