electricImp - Missing required POST parameters: platform un key origin args kwargs

Hi Folks - I’ve been running an electricimp based temperature monitoring setup since January, but just today (10th Nov 2015) I’ve started getting back a “Missing required POST parameters: platform un key origin args kwargs” message from the API whenever I attempt to post data. My data does include all of the parameters listed in the error message.

My code was working fine yesterday, but today it isn’t, and I haven’t changed a thing at my end.

Does anyone know if anything’s been changed in the Plotly API which might have stopped things working for me?

Cheers!!

1 Like

Here’s a link for my code… in case anyone wants a look… https://github.com/jimconner/greenhouse_monitoring/tree/lux_pressure

I stumbled across your post while searching for solutions as I had the same issue. And just like you, my code had not changed but I was suddenly getting the error “Missing required POST parameters: platform un key origin args kwargs”.

After some troubleshooting I managed to figure out that the issue is caused by setting the Content-Type header on the request. To confirm, I looked at a previous version of your code (you have since worked around the issue) and I saw we were both setting:

“Content-Type” : “application/json”

Removing the explicit “Content-Type” : “application/json” header resolved my issue and I suspect should work for others facing similar problems with the RestAPI.

Thanks sutherlandmj - I can confirm that leaving the headers as {} does indeed fix the original error message with Missing POST parameters. This is great for me as I was having problems getting the electric imp plotyly library to use more than two y-axes.

I’m onto a new problem now though, which seems to have cropped up in the last couple of days (both using the electric Imp libarry, and with my older code)… For reasons I don’t yet understand, I’m only getting two of six of the temperature readings that I’m sending through being plotted on the graph.

I think that plot.ly must be making a lot of changes to their API this month.

Thanks again for the improved fix.

Cheers!!

Scrub that… the new problem was actually an electrical issue, whereby four of my sensors had come unplugged from the breadboard. I’m not 100% functional once again. Cheers!!

Glad to hear, I’m hoping the “not” is a typo and you meant “now”. :smile:

Well… it was a typo when I wrote it, but since then I’ve found that plot.ly is now rate-limiting me as it thinks I’m trying to create a new plot every time I paste data… It’s telling me that I’m creating more than 50 charts per day… I’ll have to switch over to the electricimp library and use it’s plot.update method instead. That’ll keep me out of trouble for tonight :smile:

I’ve switched my setup over to the electricimp plotly library now… but I’m still getting the same rate limiting problem as before, even when I’m using the plot.append() method… Hmpf… Any ideas anyone?