Comments (9)
I was able to solve it by executing:
$ brew install coreutils
$ nano start-app.sh
In start-app.sh
, I changed readlink
with greadlink
I will create a pull request with this change in start-app.sh
.
from openmtc.
After getting it to run, were you able to get the ipe with the respective gui working correctly? Having the gui receive notifications when content is pushed to the subscribed containers?
from openmtc.
Hello @lcoimbra. After executing:
$ brew install coreutils
$ nano start-app.sh
and changing readlink
with greadlink
in start-app.sh
, I was able to run the OpenMTC examples.
from openmtc.
Hello! Thank you for getting back to me! I'm not using macOS so I didn't have that issue. My problem is with the communication of notifications from the backend to the gui, where the request always results in 404, this is visible in the backend logs below:
Configuring M2M backend...done
DEBUG:openmtc_gevent.main:Trying config file location: /config-backend.json
DEBUG:openmtc_gevent.main:Trying config file location: /etc/openmtc/gevent/config-backend.json
DEBUG:openmtc_gevent.main:Reading config file: /etc/openmtc/gevent/config-backend.json
DEBUG:rdflib:RDFLib Version: 5.0.0
::ffff:172.17.0.3 - - [2020-08-05 20:46:42] "POST /~/in-cse-1/onem2m HTTP/1.1" 201 569 0.020918
::ffff:172.17.0.3 - - [2020-08-05 20:46:42] "GET /~/in-cse-1/onem2m HTTP/1.1" 200 496 0.010105
::ffff:172.17.0.1 - - [2020-08-05 20:46:50] "DELETE /onem2m/TestGUI HTTP/1.1" 404 183 0.000955
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "POST /onem2m HTTP/1.1" 201 568 0.004598
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "GET /onem2m/TestGUI?rcn=5 HTTP/1.1" 200 563 0.006829
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&fu=1&lbl=commands HTTP/1.1" 200 352 0.035137
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&fu=1&lbl=measurements HTTP/1.1" 200 401 0.020118
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "GET /~/mn-cse-1/onem2m/TestIPE/devices/Temp-1/measurements?rcn=5 HTTP/1.1" 200 677 0.030798
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "POST /~/mn-cse-1/onem2m/TestIPE/devices/Temp-1/measurements HTTP/1.1" 201 953 0.032633
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "GET /~/mn-cse-1/onem2m/TestIPE/devices/Humi-2/measurements?rcn=5 HTTP/1.1" 200 748 0.031940
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "POST /~/mn-cse-1/onem2m/TestIPE/devices/Humi-2/measurements HTTP/1.1" 201 953 0.023399
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "GET /~/mn-cse-1/onem2m/TestIPE/devices/Humi-1/measurements?rcn=5 HTTP/1.1" 200 676 0.047576
::ffff:172.17.0.1 - - [2020-08-05 20:47:03] "POST /~/mn-cse-1/onem2m/TestIPE/devices/Humi-1/measurements HTTP/1.1" 201 954 0.030878
::ffff:172.17.0.1 - - [2020-08-05 20:47:04] "PUT /onem2m/TestGUI HTTP/1.1" 200 563 0.006206
::ffff:172.17.0.1 - - [2020-08-05 20:47:04] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A03.611139%2B00%3A00&fu=1&lbl=commands HTTP/1.1" 200 236 0.024195
::ffff:172.17.0.1 - - [2020-08-05 20:47:04] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A03.844831%2B00%3A00&fu=1&lbl=measurements HTTP/1.1" 200 290 0.030844
::ffff:172.17.0.1 - - [2020-08-05 20:47:04] "GET /~/mn-cse-1/onem2m/TestIPE/devices/Temp-2/measurements?rcn=5 HTTP/1.1" 200 680 0.025316
::ffff:172.17.0.1 - - [2020-08-05 20:47:04] "POST /~/mn-cse-1/onem2m/TestIPE/devices/Temp-2/measurements HTTP/1.1" 201 954 0.029276
::ffff:172.17.0.3 - - [2020-08-05 20:47:05] "POST /_/openmtc.org/in-cse-1/CTestGUI HTTP/1.1" 404 183 0.021268
::ffff:172.17.0.1 - - [2020-08-05 20:47:05] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A04.638004%2B00%3A00&fu=1&lbl=commands HTTP/1.1" 200 236 0.056333
::ffff:172.17.0.1 - - [2020-08-05 20:47:06] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A04.947689%2B00%3A00&fu=1&lbl=measurements HTTP/1.1" 200 236 0.046836
::ffff:172.17.0.3 - - [2020-08-05 20:47:06] "POST /_/openmtc.org/in-cse-1/CTestGUI HTTP/1.1" 404 183 0.005611
::ffff:172.17.0.1 - - [2020-08-05 20:47:06] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A05.702681%2B00%3A00&fu=1&lbl=commands HTTP/1.1" 200 236 0.012797
::ffff:172.17.0.1 - - [2020-08-05 20:47:07] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A06.014767%2B00%3A00&fu=1&lbl=measurements HTTP/1.1" 200 236 0.024260
::ffff:172.17.0.3 - - [2020-08-05 20:47:07] "POST /_/openmtc.org/in-cse-1/CTestGUI HTTP/1.1" 404 183 0.008673
::ffff:172.17.0.1 - - [2020-08-05 20:47:07] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A06.719502%2B00%3A00&fu=1&lbl=commands HTTP/1.1" 200 236 0.015317
::ffff:172.17.0.1 - - [2020-08-05 20:47:08] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A07.042444%2B00%3A00&fu=1&lbl=measurements HTTP/1.1" 200 236 0.021980
::ffff:172.17.0.3 - - [2020-08-05 20:47:08] "POST /_/openmtc.org/in-cse-1/CTestGUI HTTP/1.1" 404 183 0.005285
::ffff:172.17.0.1 - - [2020-08-05 20:47:08] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A07.738322%2B00%3A00&fu=1&lbl=commands HTTP/1.1" 200 236 0.012859
::ffff:172.17.0.1 - - [2020-08-05 20:47:09] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A08.068041%2B00%3A00&fu=1&lbl=measurements HTTP/1.1" 200 236 0.021762
::ffff:172.17.0.3 - - [2020-08-05 20:47:09] "POST /_/openmtc.org/in-cse-1/CTestGUI HTTP/1.1" 404 183 0.004436
::ffff:172.17.0.1 - - [2020-08-05 20:47:09] "GET /~/mn-cse-1/onem2m?drt=1&rcn=5&cra=2020-08-05+20%3A47%3A08.755494%2B00%3A00&fu=1&lbl=commands HTTP/1.1" 200 236 0.013045
The gui application is able to detect containers it is looking for, but after subscribing to a container to receive notifications of new content pushed to that container it never receives anything.
[1] onem2m-gui-sensors-actuators-final.py
[2] onem2m-gui-sensors-final.py
[3] onem2m-ipe-sensors-actuators-final.py
[4] onem2m-ipe-sensors-final.py
Choose the app to start: 1
discovered commands container: /mn-cse-1/onem2m/TestIPE/devices/Switch-AirCon/commands
discovered commands container: /mn-cse-1/onem2m/TestIPE/devices/Switch-Window/commands
Subscribing to Resource: /mn-cse-1/onem2m/TestIPE/devices/Temp-1/measurements
Subscribing to Resource: /mn-cse-1/onem2m/TestIPE/devices/Humi-2/measurements
Subscribing to Resource: /mn-cse-1/onem2m/TestIPE/devices/Humi-1/measurements
Subscribing to Resource: /mn-cse-1/onem2m/TestIPE/devices/Temp-2/measurements
Did this ever happen to you when you got the start-app script running on your system?
from openmtc.
Hi @lcoimbra,
I checked again and I am obtaining the same results as you (some 404s) and I am not sure why this is happening.
Sorry for not being able to help you.
We should be obtaining what appears in the following page right?
from openmtc.
Hi @lcoimbra,
How are you trying to run the example please? I am trying the following:
First, in one terminal window I run the backend image by executing the run-backend
script inside OpenMTC/openmtc-gevent/
Then, in another terminal window I run the gateway image by executing the run-gateway
script inside OpenMTC/openmtc-gevent/
After that, in another window I run the start-app.sh
script inside OpenMTC/doc/training
executing ./start-app.sh
and I enter the number 4 to run onem2m-gui-sensors-actuators-final.py
(I am not sure why this option is number 4 for me and not number 1 as it appears to you).
In the windows were I ran the backend and gateway images, I see some successful GET requests, but no POST requests.
Have you been able to run this example correctly?
Thank you.
from openmtc.
Hello,
Thank you for checking on your side too! Yes, I was expecting an output like the one on the outputs page.
I have been working with the project running inside docker containers. I started by following the quick start guide, then I tried following the example demonstrated in the webinar: https://youtu.be/gBF4gCTLGww?t=1766 (timestamp 29:26) where they use several other environment variables.
Initially I thought that, since I was working with docker and using the start-app.sh
locally, the docker container was unable to communicate with the host system to send the notifications asynchronously. I then replicated one of the containers and ran the consumer and producers from there, but the result was the same.
I have also attempted to customise the config files for both the gateway and backend without success. I have launched a clean install of ubuntu in a virtualbox virtual machine and the outputs were the same.
I also don't know why for me the start-app.sh
options listing shows different, but probably just a difference in ordering from macOS to Fedora. When running the examples, it is the ipe
and gui
pair of the same example, the ipe
represents the producer and the gui
the consumer that should be notified of new content pushed to the containers.
I will keep trying to figure this out.
from openmtc.
Hello!
After running the backend and gateway locally the way you mentioned, I actually got it to work!!
First, in one terminal window I run the backend image by executing the
run-backend
script insideOpenMTC/openmtc-gevent/
Then, in another terminal window I run the gateway image by executing the
run-gateway
script insideOpenMTC/openmtc-gevent/
I still don't understand why it is not working with docker, but I will work with everything local for now while investigating this further.
from openmtc.
Hello @lcoimbra,
That's great to hear! Hm, I am not sure why it is not working with Docker.
If I am able to figure out what is going on, I will update you.
from openmtc.
Related Issues (20)
- [SHOULD] Work towards fulfilling the requirements for a full GE HOT 1
- [MUST] Show versioned documentation HOT 1
- [MUST] Roadmap is missing HOT 1
- Installation HOT 1
- After delete specific subscription, How can i create subscription automatically without restarting OCB
- Why my gateway can't register with backend ? HOT 1
- get latest resource seems to be broken following docs HOT 4
- exception when installing gateway
- Cannot find ch = [ ] attribute when i run gateway HOT 3
- IoT-data-visualization.py: socketio import failures
- Gateway Notification problems: CSETargetNotReachable HOT 1
- Issue while trying to create an application resource HOT 7
- Semantic Discovery
- Error while running backend image HOT 1
- Dashboard
- Quick Start Guide Instructions are not working HOT 4
- create-binary-docker not working in macOS Catalina HOT 1
- Dead project?
- OpenMTC without Docker?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openmtc.