Hi all,
as Benjamin recently did some work to get Kura connected to AWS IoT,
I thought I'd better do the same for IBM's IoT Foundation :-)
I have got quite far. Kura is connecting, and I am able to send
event messages, but not quite in the format that IoTF is expecting.
An application has to use a client id of the form
a:orgid:app_id
and a provided username/password combination to
authenticate. This I can do by setting the clientid, username and
password properties of MqttDataTransport. So far so good.
Now we are expected to publish JSON formatted events on this topic:
iot-2/type/$(device_type)/id/$(device_id)/evt/$(event_id)/fmt/$(format_string)
I can set topic.context.account-name to "iot-2". But I don't want
the client id to figure in the topic name. I can get the
application to publish on topic:
iot-2/type/heater/id/pi-heater/evt/temperatures/fmt/JSON
but only by configuring the client id as "type" which won't allow me
to connect to IoTF. The appTopic I use is:
"id/pi-heater/evt/temperatures/fmt/JSON"
What about allowing the message topic prefix to be configured in the
same way as lwt.topic? Or any other suggestions?
I haven't got to subscribing yet, but the topics are the same for
receiving commands intended for a device:
iot-2/type/$(device_type)/id/$(device_id)/cmd/$(command_id)/fmt/$(format_string)
where wildcards can be used for the substituted variables.
Thanks
--
Ian Craggs
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto
|