Skip to content
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

MQTT features #162

Merged
merged 3 commits into from
Jan 29, 2020
Merged

MQTT features #162

merged 3 commits into from
Jan 29, 2020

Conversation

egekorkan
Copy link
Member

@egekorkan egekorkan commented Jan 17, 2020

Added features:

I am not able to write tests for this due to 2 reasons:

  1. See [testing] mqtt test is not working/old #161
  2. A test for this would require to fetch the TD from the broker. This is not possible with the fetch() function since it always maps to readResource() which is not implemented in the mqtt binding. Then I have tried the following but was blocked by the same reason as in the point 1:
                            let broker = mqtt.connect("test.mosquitto.org");
                            broker.on("connect", () => {
                                broker.subscribe("TestWoTMQTT");
                                broker.on("message", (receivedTopic: string, payload: string) => {
                                    if (receivedTopic == "TestWoTMQTT"){
                                        expect(payload).contain("TestWoTMQTT")
                                        console.log(payload)
                                    }
                                });

However, I have tested using mosquitto_sub and mosquitto_pub and gotten the TD, even multiple times or published before subscription. Only writeable properties are written to and their form show up in the TD. Same for readable properties.
Signed-off-by: Ege Korkan egekorkan@gmail.com

Signed-off-by: Ege Korkan <egekorkan@gmail.com>
Signed-off-by: Ege Korkan <egekorkan@gmail.com>
@egekorkan egekorkan changed the title feat: add publishing TD to MQTT broker MQTT features Jan 17, 2020
@egekorkan
Copy link
Member Author

I am not fully understanding the error produced by Travis but it seems that it is failing since it is taking too long to build node.js from the sources. There are the following lines in the raw log file:

Downloading https://nodejs.org/dist/v13.6.0/node-v13.6.0.tar.xz...
Computing checksum with sha256sum
Checksums matched!
$>./configure --prefix=/home/travis/.nvm/versions/node/v13.6.0 <
Node.js configure: Found Python 2.7.12...
�[1m�[93mWARNING�[0m: C++ compiler (CXX=g++, 5.4.0) too old, need g++ 6.3.0 or clang++ 8.0.0
�[1m�[93mWARNING�[0m: warnings were emitted in the configure phase
�[1m�[32mINFO�[0m: configure completed successfully
make -C out BUILDTYPE=Release V=0

... (lots of difficult to understand lines)
The job exceeded the maximum time limit for jobs, and has been terminated.

@danielpeintner
Copy link
Member

1 out of 4 Travis builds failed. I guess there was another issue since the Travis build was stopped after 50 minutes while all other builds finished after around 4-6 minutes (see https://travis-ci.org/eclipse/thingweb.node-wot/builds/638673659)

I will restart the build and let's see whether the issue is resolved...

Signed-off-by: Ege Korkan <egekorkan@gmail.com>
@danielpeintner danielpeintner merged commit 090b21a into eclipse-thingweb:master Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants