Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1427 Posts: 7608
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 81 Posts: 350
I have my XDK posting data to the XDK portal.
Trying out Kepware's v6 feature "IoT Gateway", and it seems to connect, but I can't see individual values. Any documentation on this?
I can not quite tell what you are trying to do. Could you explain what you are attempting?
Especially the following points: - Where is your XDK via MQTT connecting to? - How do you employ the Kepware's IoT Gateway feature? Since I do not have knowledge about Kepware yet., I can not fully help you without more information on what you are trying to achieve and what your setup for that is. As such, there is also no documentation on how to use this specific plugin.
It would be very useful to know what changes you made, for me to better understand the issue and to help you.
Kind regards, Franjo
The XDK is connecting to mqtt.bosch-si.com.
What I call "IoT Gateway" is defined as an MQTT Client agent in Kepware.
Broker defined as tcp://mqtt.bosch-si.com:1883
Topic: BCDS/XDK/single/<my XDK's MAC address>/out/
I think we can agree that the issue does not lie with the XDK or its configuration, but I can propose some ways to test where the issue actually lies in.
Firstly, since the XDK publishes in JSON format, I'd like to know if you can read the raw data that your IoT Gateway is supposed to receive? Am I correct in assuming that your IoT Gateway simply does not receive any data at all from the client? If so, the only possible error should be the topic name. Are the values of your MAC address separated by ':' or by '-' in the topic name? I.e. XX:XX vs XX-XX. They should be separated by ':'. Do you receive data from any other topic? I.e. have you considered using the topic name '#' to receive arbitrary data (not only of your XDK).
The second point of error could be the broker. The Bosch-Broker does a lot under the hood. Have you tried using a different broker? I recommend the broker that is given here. You can additionally use the websocket client provided by that website to watch what data is being sent. For example, I can receive data from my XDK via the Websocket Client using the broker URL 'broker.hivemq.com' when subscribing to the topic 'BCDS/XDK/#'.
Please tell me if this is helpful and do not hesitate to ask if you have further questions.
The MAC values are separated with ":"
I was able to use broker Hivemq and connect and see the raw JSON strings being published using the websocket client.
I've done further investigation in regards to the Bosch Broker. I've tried to connect to the Bosch Broker via a lightweight MQTT Client on a Linux OS.
What I've found is, that the Bosch-MQTT-Broker runs into trouble with so called retained messages. Retained Messages are the last available Message that was published on a topic. So, if there is a retained message available, and somebody new subscribes to that topic, the subscriber receives the retained message.
The Bosch-Broker behaves in such a way, that it often leads to a Network Protocol Error, concerning retained messages. This is a issue that is not found with the hivemq-broker. If there is an option for your IoT Gateway Agent to ignore retained messages on subscriptions, try turning that on.
A more mundane solution would be to set the topic to "BCDS/XDK/single/<your XDK's MAC address>/out/stream" This topic only receives sensor data from the XDK.
In any case, I am curious about this topic, so please tell me if this is helpful and do not hesitate to ask if you have further questions.