does MQTT API exist to send downlink to lora device? - mqtt

I'm making an application to communicate with LoRa Device.
I found a guide to the REST API to send downlink.
However, i'm finding MQTT API to do.
Does it exist?

MQTT is used by applications only to consume data in real time.
Device Management action (send downlink etc) must be done by using REST API
regards

Device state notification is not yet available throuh MQTT. You can get device status using REST API. See Live Objects documentation https://liveobjects.orange-business.com/doc/html/lo_manual_v2.html#NODE_STATUS and swagger https://liveobjects.orange-business.com/swagger-ui/index.html#!/Device_management_-Interfaces-_V1/listInterfacesForADeviceUsingGET
regards

Related

Thingsboard, Posting Data to Two Seperate Devices From One Physical Node(ESP8266/32)

I want to post data to 2 different devices from same esp32. And I want to do it like posting all the data to one device and sharing its telemetries with the second device. Is that possible on thingsboard?
I achieved this via ESP32 but when I am posting data with two different token, I need to cut the wifi and reconnect the Thingsboard with the other devices token. This situation contributes to enormous battery consumption. When I examine the thingsboard library I could not see a function about cutting the network only with thingsboard. What can be done to overcome this situation?
Any idea will be appreciated.
Thanks
One way I could think of, would be using ThingsBoard Integrations. Where one input payload can have multiple outgoing payloads (works even for multiple target devices or assets):
https://thingsboard.io/docs/user-guide/integrations/#converter-output
But this requires ThingsBoard PE & an external MQTT Broker in between your ESP32 & TB.
Or you could try the MQTT Gateway API:
https://thingsboard.io/docs/reference/gateway-mqtt-api/

how i can subscribe to topics in azure iot hub device to device communication

I set up an architect for my solution think that iot hub does the work of an mqtt broker, but when I started the implementation , I found that you cannot subscribe to a specific subject to retrieve messages published by another mqtt client, the notion of topic does not exist on iot hub.
I have read several articles about this subject but I have not found an appropriate alternative.
Iot hub has only two topics, and event hub endpoints are limited to 10 endpoints
Can you guide me or suggest a solution with a broker?
How can I subscribe to a specific topic?
I want a device to device communication with pub / sub
Example: a device publishes on a topic / home / room
another device subscribes to / home / room
using iot hub
I am open to all proposals
Thank you
Cloud development
IoT Hub has a limited MQTT broker implementation, because of that, you can't subscribe to device topics from other devices. You could use an Azure Function to catch all your messages and decide if it needs to send a Cloud to Device message. You could also leverage Stream Analytics to decide if a message needs to be sent before talking to that Function. This is probably your best bet if you want to play by Azure IoT Stack's rules.
No cloud development
If you really want your devices to listen to each other, there is an old blog post that describes a scenario where a device uses the service SDK to listen to messages sent to IoT Hub by a different device. It lists the pros and cons in the post.
Custom edge module
If your devices are on the same network, you could build an Edge Module that implements an MQTT broker. The devices would then connect to the edge device as they would in a normal gateway scenario, but also to your custom broker. In your routing, you would then send all the messages to your custom broker to be transmitted to any devices listening to that topic, while still sending the data to the cloud. I imagine their are a few security risks you want to look into if you go in this direction.
So in short: it's possible, probably in many other ways, but in the end you are leveraging a cloud platform that doesn't support this natively.

External MQTT server subscription

I am using IBM IoT service. Registered a device. Now i want to receive messages (this device) from external mqtt server (CloudMQTT). Please, provide detail info about the way can i subscribe to this external server.
Regards,
Mindaugas
Depends on how you are planning to subscribe: Using an app that the device came with? An app that you are going to write, if so which programming language? Node-RED?
Based on the vagueness of your question I am going to suggest that you haven't actually thought about this, in which case your best be is to use Node-RED, for which there already is a range of prebuilt IOT nodes that you can use.

Smart home device integration with Google home and Alexa

I am trying to integrate smart home devices with Google home and Alexa but I am facing following issue.
Communication between Google Home/Alexa and our device cloud server is HTTP.
Communication between smart home device and our device cloud server is MQTT.
How do I keep track of synchronous request-response? Is there a better way to implement this system?
Perfectly possibly to do with HTTP to MQTT and back again.
I've done it for both Alexa & Google Home for my Node-RED nodes.
You just need to keep track of on going requests and include a unique id in the request/response MQTT messages while also running a timer to handle no response from the device.
The project gBridge (https://github.com/kservices/gBridge; https://about.gbridge.io) basically implements plain Google Assistant/ Alexa to MQTT bridging.
Regarding your questions, there are two points that help to implement these solutions:
Think in terms of devices or endpoints, rather than requests. When you just want to "translate" HTTP to MQTT, you are inducing a lot of issues like you've figured out. You probably want to implement a logic that allows MQTT topics to control/ query your actual deviecs - not ones that respond to HTTP requests. This makes thing a whole lot simpler.
Caching is essential. Allow your bridge to have a local copy of your device's states. When having the properly implemented cache, you won't need for any response. Just use the cached data.

Ruby on Rails How to Integrate GPS Tracking System

I am using following versions
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux],
Rails 4.2.4
I have GPS Tracking Devices which works with SMS Commands.when we send sms they reply location,etc. The problem i'm sending SMS through SMS API. now, how can i can get reply and to which server (my server or server of SMS API providing company) and how to handle it.
They have given some documentation regarding protocol (works with ASCII codes) that totally i could not understand.
I am using Benway Technologies GPS Tracking Devices.
Kindly, help me.
Thanks in advance.
Reading a bit this https://benway.en.ec21.com/GPS_Tracker--9810443.html
"...Real-time reporting car status Mainboard support Voice monitor function Check location information via SMS and GPRS(TCP)..."
and this
"...GPS-blue, Power-red Data Transmit TCP..."
Your devices are using GPRS protocol, wich means that they have some IP address. With this functionality, the GPS devices work like a little server, so IT IS POSSIBLE to do what you are looking for: request GPS data to the devices and handle it in your own server.
To achieve this:
1) You need to configure the GPS devices by reprogramming them (via SMS or SERIAL) to allow incoming requests from your server. Also you need to configure your devices to send data to your server.
Just tell to your GPS devices that myownserver.tt or 276.333.456.23(your server public ip) will be the domain / ip to send and receive data via GPRS with TCP protocol.
I have some experience using ENFORA and RUPTELA trackers, there is a a lot of info about them, now, in your case, you must read all the info about your GPS devices, if there is none, just use another brand.
2) You need a proper server to handle incoming TCP data (the GPS devices data). Lets say some Debian based server. To handle the data, you need some script (PHP, Ruby, Java, your choice) in the server to decode this data (NMEA in most cases, you can read more here http: //aprs.gids.nl/nmea/) and then a front end if you wanna see this data (You already have RoR).
3) Rails is a web framework with all the Ruby magic ready for us. You need to do the step 1 and 2 first to integrate a GPS tracking system.
Hope it helps!

Resources