Posting core readings to remote webserver

Hi Guys, first of all: great work, my sparks arrived last week, and now I’m fiddling around!

What I have to do is posting analog readings to my couchdb server…

I did this with my RPi, and played with arduino ethernet shield successfully …

Due to no ethernet available at the target location, i thought spark was the best solution at now.

my target url is only reachable via DNS, not via IP, so I failed while playing with TCPClient…

In ‘curl-speach’ all what I have to do is:

curl -X POST -H “Content-Type: application/json” http://admin:xxxxx@mycouchserver.com:5984/dbname -d ‘{“type”:“emonLog”,“value”:“1234”}’

any hints or ideas?

thx in advance

Pitt

Theoretically you should be able do this with TCPClient but you’d need to send http headers for the basic authentication.

Read this thread for more info: https://community.spark.io/t/how-to-send-http-post-request-to-a-secure-url/740/5

1 Like

Eventually we’ll be implementing a feature where Spark can publish events, and you’ll be able to hit web servers that way. However this feature’s still in progress, and will be a couple more weeks at least

2 Likes

hi … got it working … see: https://community.spark.io/t/code-not-working-which-runs-well-on-arduino/2089
thx for helping …

1 Like