Struggle with new emoncms and shortened API write key

Tags: #<Tag:0x00007f13e4132ff0>

(Alco) #1


I’m a proud user of the openenergymonitor for many years now (I think 7 years :slight_smile: )
But it was time to upgrade my outdated raspberry pi OS. So I did that (moved to the latest dietpi OS).

Works fine, but I have one problem:

I have a (custom build) emonbase nanodeRF (Arduino) where I must use a short API write key in the sourcecode (no memory left).

I migrated all the feed and database data from my old emoncms version: 9.8.28 | 2018.01.27 to my new installation 9.9.5, that works fine (I think)… but I get a write error when I use this short API key that I used in my old installation, error:[ 2018-12-24 21:50:38.068|ERROR|index.php|Invalid API key '1234567' ]

But when I make a new test user with a new generated API key it will works: sample key:

any idea why this new installation doesn’t accept the old “short” API key? another test with a new key (updated the record in the database) “12345678901234” also failed …
So there must be a line of code that forces the 32 characters… but where? I found a line of code with on the emoncms.ORG index.php but not on the normal “public” emoncms index.php that I use…

Edit - fixed thread title, as there is a big difference between shorted and shortened.
BT - Moderator

(Alco) #2

Solved, by editing the arduino script a bit and getting a “long” API code into it.