Hi, I’m trying to have inputs from iotawatt to get to my emoncms instance, but my problem is I never get inputs showing on my emoncms, I get this error message back from my web server: {“success”:false,“message”:“Username or password empty”}
My emoncms is a self hosted instance on a internet server that I manage.
With tcpdump, I see packet arriving to emoncms server. Here is an example of an arriving packet and the answer:
09:37:54.244523 IP (tos 0x0, ttl 245, id 44491, offset 0, flags [none], proto TCP (6), length 1500)
[my_public_ip].51931 > [my_internet_server].com.http: Flags [P.], cksum 0xfb06 (correct), seq 1:1461, ack 1, win 5840, length 1460
E…>b…w.C.H…P.|…c…P…POST HTTP://energy.myserver.com/input/bulk HTTP/1.1
host:energy.myserver.com
Authorization:Bearer [my_readwrite_api_key]
Content-Type:application/x-www-form-urlencoded
Content-Length:2535
time=1551874570&data=[[0,“IotaWatt”,116.87,4551.54,4017.04,44.54,4129.55,2086.93,1433.59,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00],[10,“IotaWatt”,116.73,4070.76,3465.32,43.82,4118.81,1239.17,1353.19,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00],
… … …
09:37:54.284842 IP (tos 0x0, ttl 64, id 52412, offset 0, flags [DF], proto TCP (6), length 450)
[my_internet_server].http > [my_public_ip].51931: Flags [P.], cksum 0xedda (correct), seq 1:411, ack 2739, win 20440, length 410
E…@.@…C.H…w…P…c…|.xP.O…HTTP/1.1 200 OK
Date: Sat, 09 Mar 2019 14:37:54 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: EMONCMS_SESSID=8fb5266c8bddf67e676d23b79f; path=/; HttpOnly
Transfer-Encoding: chunked
Content-Type: application/json
38
{“success”:false,“message”:“Username or password empty”}
Alternatively, if I manually ‘post’ a json message to my emoncms with curl like this for example, it works:
curl --data “data=[[-10,16,1137],[-8,17,1437,3164],[-6,19,1412,3077]]&time=1552143454&apikey=[my_readwrite_api_key]” “http://energy.myserver.com/input/bulk”
Is someone had this same issue ?
Iotawatt firmware is 02_03_21
Emoncms is hosted on an Cpanel web server