What is the error in the server logs? I think it’s because you’re not sending data in the right format. From your curl command, you need to put quotes around the string data you’re sending. Also, it might need to be JSON? I can’t remember.
Here is the code I used in the HTM Engine Traffic Tutorial. It is a JavaScript HTTP client for the HTM Engine. Here is the code that POSTs data to the engine:
Look through that file for other examples of constructing HTTP requests for HTM Engine.
htmengine doesn’t natively have an interface to receive data in json format – json is not suited for streaming data. Instead, it implements a graphite-inspired TCP interface for accepting metric data – see http://graphite.readthedocs.io/en/latest/feeding-carbon.html for more information.
htmengine alone also does not have a web server. skeleton-htmengine-app does, but is only a minimal viable example of building an app using htmengine. webapp.py in skeleton-htmengine-app does implement a HTTP interface to receive metric data via POST, and can be modified to accept json starting around https://github.com/htm-community/skeleton-htmengine-app/blob/master/webapp.py#L81
I should also add that in your original curl command, if you surround the metric value and timestamp with quotes, e.g. -d “0.35 1470301465”, it should work. It’s failing because curl is interpreting the timestamp as a separate argument.