-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device does not wait for a response even specifying hono-ttd=60 #3466
Comments
Your device already has received a (one-way) command from Ditto as indicated by the HTTP reponse's content-type application/vnd.eclipse.ditto+json. Ditto has sent this one-way command in response to your modify message. The HTTP response will only contain a If you want to see the device waiting for a command instead, you should send an empty-notifcation by means of POSTing an HTTP request with no payload to the HTTP adapter: curl -XPOST -u [email protected]:demo-secret -H 'content-type: application/vnd.eclipse-hono-empty-notification' http://${HTTP_ADAPTER_IP}:${HTTP_ADAPTER_PORT_HTTP}/telemetry?hono-ttd=60 In this case, Ditto will not find any message to process and will therefore not send the one-way command acknowledging the modify message ... |
Thank you @sophokles73, so how should I retrieve the {"topic":"org.eclipse.packages.c2e/demo-device/things/live/messages/start-watering","headers":{"correlation-id":"d84b1ceb-797b-45f5-bc87-78e9b5396645","x-forwarded-for":"10.244.0.1","version":2,"timeout":"0","x-forwarded-user":"ditto","accept":"/","x-real-ip":"10.244.0.1","x-ditto-dummy-auth":"nginx:ditto","host":"172.17.0.2:30385","content-type":"application/json","timestamp":"2020-02-28T08:04:43.518+01:00","user-agent":"curl/7.58.0"},"path":"/inbox/messages/start-watering","value":{"water-amount":"3liters"}}` |
My understanding is that you are trying to follow the tour of the e2e Eclipse IoT package tour. So can you please describe what exactly you are doing on both the device side as well as in the back end? What request(s) you send to the Hono HTTP adapter and what requests to you send to the Ditto HTTP API? |
Simply I run |
@Lando-Ant is this still an issue? |
Please re-open if you still experience this problem. |
I am using Eclipse Hono and I am experiencing an issue with hono-ttd, that is, when I launch the HTTP POST command from the device to send telemetry data by specifying e.g. hono-ttd=60, the device does not wait to receive a command instead it continues its execution. Moreover, I have no idea where to found the hono-cmd-req-id that should be returned by the device receiving the command.
This is the command I used to send telemetry data from the device:
curl -i -u [email protected]:demo-secret -H 'application/json' --data-binary '{ "topic": "org.eclipse.packages.c2e/demo-device/things/twin/commands/modify", "headers": {}, "path": "/features/temperature/properties/value", "value": 45 }' http://${HTTP_ADAPTER_IP}:${HTTP_ADAPTER_PORT_HTTP}/telemetry?hono-ttd=60
After sending the above telemetry data, I expect the device to wait for a command. Instead, the device does not wait and immediately returns:
HTTP/1.1 200 OK hono-command: modify-response content-type: application/vnd.eclipse.ditto+json content-length: 361
Thanks in advance for helping out!
The text was updated successfully, but these errors were encountered: