0

I'm experimenting with command and control in Hono and got this:=>

enter image description here

Error Message

No credit available for sending request

anyone knows how to deal with this?

aduguid
  • 3,099
  • 6
  • 18
  • 37
  • It is kind of hard to tell without knowing a little more about your setup. What kind of device do you want to send a command to? MQTT, HTTP? The error itself indicates that there is no device connected and listening for commands. – Kai Hudalla Nov 16 '18 at 07:37
  • Through HTTP. Device-id: 4711 which is assigned to DEFAULT_TENANT. I followed the steps mentioned in getting started documentation on eclipse hono's site. – Shailesh Arya Nov 16 '18 at 17:05

1 Answers1

0

It seems that your device is not ready to receive any commands. In case of HTTP, the devices inform their readiness to receive commands using a telemetry or event message with an additional parameter named hono-ttd. Below example illustrates a telemetry message request (to sandbox) with hono-ttd value as 60 seconds using curl.

curl -i -X POST -u sensor1@DEFAULT_TENANT:hono-secret -H 'Content-Type: application/json' --data-binary '{"sensor1": 5}' http://hono.eclipse.org:8080/telemetry?hono-ttd=60

In the above case, after 60 seconds the device is no longer ready to receive any commands.

I would suggest that you first send a request from the device as above with the hono-ttd value. Then try sending a command to that device before expiry of the hono-ttd.

kaniyan
  • 1,391
  • 1
  • 7
  • 7