I Installed emoncms on a BananaPiPro with Armbian installed.
Installation works finde, I created an account…everything’s fine.
Then, I wan’t to imprt data via the api.
When I enter the URL in a browser, I get:
URI not acceptable. No controller ‘api’. (post/)
When I use the same URL (with a different apiky) on emoncms.org everything’s working,
So I thing the URL is correct.
Any hints about this?
Any Ideas how to find the cause of this? Emoncms seems not to log anything…
Daniel - Can you post the URI for what worked (on emoncms.org) and what did not work?
Do not post your API Key. Change your API Key to something like this:
This URI worken when I opened it in a browser.
When I test this URL, I get “URI not acceptable. No controller ‘api’. (post/)” and now data is visible at the emoncms gui.
I cannot answer why the Emoncms - site home works and the http://my_emoncms/emoncms/api/post did not. The /api/post is not something I have seen before.
This works for me for the local emoncms:
Also for the &time= portion I’ve only seen the time represented in epoch seconds (for the Input API)
you should be able to see examples at:
EDIT: I just tried &time: with the ISO 8601 format (&time:2017-12-12T16:54:57) and it did work! Cool!
https://emoncms.org/api is intended for the api documentation which is unique to emoncms.org, it doesn’t exist on local emoncms. You should be using Emoncms - user login as per the examples given on the https://emoncms.org/api#input page.
The reason you are getting to the “input” api via a “api” api url is because of this little redirection (correction?) in the index.php on emoncms.org but it is not present on the main emoncms repo.
The wrong url…thats it. Thanks a lot.
Works like a charm now
Useful to know. Just spent a while converting to milliseconds…
EDIT - I tried this and the data posting is reported as successful (the http response) but the feed is flagged as inactive.
Note also, Emoncms expects seconds (10 digits) not milliseconds IME.
I don’t believe it does. Hopefully someone else can confirm.
I have discovered that if you use a non-numeric date/time in the URI, that is not ‘now’, then although the API responds with OK, the feed is marked as n/a.
Date/time in seconds, that is not ‘now’, is OK.