Problem coomunication beetwen leshan client and iotAgent Fiware - iot

for a project i have to connect the Eclipse Leshan Client to a IoT Agent Server.
My problem is to read the device's mesurements with Postman or cUrl command.
The client after the configuration of the port (5683) look like it's connected to the server but i can't read the values of the dummy device.
I ask how i can connect the client to server. Which file have i to config for my work?.
Also i have set up an orion context broker on the port 1026. The listening port of the server is the port 5683.
I wish to use the devices registered in the client Leshan, but the data results EMPTY.
Fiware IoTAgent:
https://github.com/telefonicaid/lightweightm2m-iotagent;
Eclipse Leshan:
https://github.com/eclipse/leshan

You need to take a workaround through that port in order to achieve your goal.
Best luck!

Related

How to connect to open source emqx broker and build his own broker?

Protocol: mqtt
Version: 3.1.1
Gateway model: CloudGate Ethernet CG0102
I'm publishing json message from my gateway which is connected to an open source Emqx broker (broker.emqx.io) port 1883 for a test. I tried to consume the messages by connecting to it with MQTTX by giving the following informations: Name, Client_ID, Host, Port, Username and Password, and then giving my topic which is my_topic.
The problem is nothing appear in my MQTTX while the given broker informations are good and similar to those in my gateway. Why ?
Also I would like in the future to use my own mqtt broker mounted on my laptop ? Any simple references where I could start to make such thing ? I already use mqtt to consume messages with python from remote broker but never try to build one to receive messages from my remote gateway.
I'm working on a ubuntu bionic VM
Client_ID needs to be unique for every client, so you can not reuse Client_ID between clients.
The MQTT spec says that the broker should kick the oldest client off when a new client connects with the same Client_ID. This normally leads to a fight between the 2 clients as they both try and reconnect kicking each other off.

Home Assistant Mosquitto - What can I use as MQTT broker address?

I'm using Home Assistant OS as a Virtualbox in Windows 10. I'm accessing it via homeassistant.local:8123. So I'm trying to configure my Mosquitto broker in Home Assistant. It wants to know my broker address. I'm guessing I need to use an ip. Where do I find this? Should I use localhost, 127.0.0.1, homeassistant.local or maybe an unused ip like 192.168.1.99 from my router?
If you are following this page, I find it is a bit misleading. Hope the following steps help you.
Install mosquitto (broker)
Suggest follow official github doc to configure mosquitto addon; (This step doesn't require IP configure)
Configure client integration within home assistant
Refer to here for your client integration, use localhost for your ha integration to connect your mosquitto broker;
Configure MQTT client outside home assistant
you need to find the exposed IP of your mosquitto broker, in your case, it shall be your VM's IP.

edited how to make nginx pont to my mosquitto broker in docker [duplicate]

I have a server and I am using Ubuntu 20.04, nginx , mosquitto and node-red and docker , let's call the website http://mywebsite.com. The problem that I am facing that I have created a client lets call it client1 in docker so the URL will be http://mywebsite.com/client1
and I want to establish an MQTT connection via mosquitto and I'm sending the data on topic test
The problem that on node red node of MQTT when I write the IP address of my mosquitto container it works
But if I change the IP address 192.144.0.5 with mywebsite.com/client1 I can't connect to mosquitto and I can't send or receive any form of data
any idea on how to solve this problem
OK, you are going to have several problems here.
You can not do path based proxying with MQTT. If you want to have multiple MQTT brokers (1 per client) bound to a single public facing domain/IP address then they are all going to have to run on separate ports (other than the default 1883).
Nginx can do MQTT protocol proxying (e.g. like this), so you can use this to expose the different ports and forward them to the separate instances of mosquitto, but even if you had a different hostname (all pointing at the same IP address) nginx has no way to know which host name was used because there is no equivalent to the HOST HTTP header to direct it. If you were to use MQTT with TLS then you may be able to get it to work with SNI, but I've never seen anybody do that yet (possible docs for SNI based routing here) It works, explanation about how to do it here.
If you use MQTT over Websockets then you should be able to use hostname based routing.
Path based proxying for Node-RED currently doesn't work properly if you enable admin authentication, because the admin auth tokens are currently stored in browser local storage and only scoped to the hostname, not the hostname + path. This will mean that a client will only ever be able to log into one instance at a time.
You can work round this by using host based proxying, e.g. http://client1.mywebsite.com
A fix for this is on the backlog for Node-RED, probably (no promises) to be looked at after version 1.2.0 ships

Thingsboard CoAP Port opening

I am trying to send data from my NodeMCU to my local thingsboard installation on my computer. However, I don't know how to do it. I am really new at these stuff, I saw some fine examples with HTTP and MQTT, but there isn't any info about CoAP on thingsboard website.
There is a documentation about CoAP API Reference that says I need to send a post request to coap://localhost:5683/api/v1/........../telemetry but when i try to do it with Postman it says cant reach the following adress. I tried doing it with http://localhost:5683/api/v1/........../telemetry and it works. I saw my messages in Latest Telemetry Section in my Device on Thingsboard.
To connect to my Thingsboard installation I use localhost:8080 so I assume my thingsboard server is only started at port 8080 not 5683-> Coap. I would very much appreciate the help.
After enabling coap in thingsboard.yml file, you have to restart thingsboard service on your computer, to do that use
"sudo systemctl stop thingsboard" &
"sudo systemctl start thingsboard"

Monitoring Openshift Jenkins Gear via CCTray

I've managed to modify CCTray using a transport extension to connect to a local Jenkins server running on my locahost. I cannot however connect to the openshift remote jenkins server which has been setup on my account.
I can access it correctly from the Openshift Jenkins Web URL however I can't connect to it using the CCTray transport extension, it just times out. I think it's because it tries to connect to the actual port the Jenkins server is running on and this is being blocked.
Would installing and running the client tools/ssh comms fix this problem?
Or is this impossible to do. It is a very nice notifications tray program so would be great to get it working.
Any ideas would be very much appreciated!
So openshift only has 80 and 443 open externally and so if CCtray is trying to connect to the port itself then it won't be get to it. Can you configure CCtray to use the public URL to interact with Jenkins?

Resources