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.
Related
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.
Is there any way to create your own google IOT device based on webhooks and POST-request? Without using firebase, IFTT, node.js
Samples that Google are very poor, they don`t show all steps of creating your own app, they just showing how to deploy "their sample"
I tried to make action with dialogflow & webhook, it was pretty simple. Just processed JSON in POST request to Azure function.
But when I try to create IOT device, its ask me for fulfilment url and it does not even tries to reach that address. I read about action.device.sync, action.device.execute, it just does not communicate with the specified address, giving simulator some voice command doesn`t affect at all. Are there any ways to create IOT device to work with POST-requests & web-hooks?
The answer is it depends.
There are many different ways to do server-device communication: web sockets, local servers, hub/local control, polling, MQTT, and likely many others. All of these solutions have trade-offs, and work in particular circumstances. Depending on exactly what IoT device you want to build, its requirements and technical specs, and what cloud providers you are using, you may identify what works best.
If you run the sample, you'll see it is sending JSON requests to a server and expect JSON responses back. This is must like Dialogflow & a webhook. In this case, the smart home platform communicates solely with the server.
Your server can then communicate with the device in any way that you want. I'm not too familiar with Azure offerings. It might have an MQTT service as well, or some other sort of push notification service you might be able to use.
If you're seeing simulator issues, you may need to make sure your authentication is set up correctly, and you'll need to first complete account linking on your phone before you can use the simulator.
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
We required to send a word from one mobile device to another using wifi-direct. The wifi-direct, wifi-discoveryservice samples given in android sdk shows its usage with MainActivity. As we have app with multiple activities and from selected activities we need to send particular word to another device on wifi, we are looking for a simple 'SendWordWiFiService' approach.
Any related input in this regard is awaited. We are struggling for last 1 week trying to implement wifi-direct, wifi-discoveryservice in a project having multiple activities. But no success.
You need to use Sockets. If you haven't done them before, I suggest reading this as it got me started. Additionally you might find Oracle's documentation to be useful. In particular, you may want to read up on of using threads to run server sockets.
The steps you need to take are:
Discover peers using Wi-Fi Direct
Make a peer connection between decies (NB: Be mindful of who the group owner is once this is done, if you're application needs to differentiate between a group owner and a group client(s)).
Once the peer connection is made, sockets can be set up between the peers for the transfer of data streams, ie sending words in your case. You might find it most logical to set your Wi-Fi Direct GroupOwner as the server socket, and your GroupClient devices as a client which connects to the server.
I hope that helps.
I am a Ruby on Rails developer and I have a question about iOS development.
How do iPhone applications typically interact with a server?
For example, let's say you wish to send GPS coords from the iPhone to the server to be stored or processed. How is that typically done? Is it through a typical server API (like JSON)?
Sorry for such a basic question.
EDIT: Thanks for the answers below. Now, how about pushing data from the server to the iPhone app (without a request). How is that done?
The communication format is usually XML or JSON via HTTP call, but it depends on your data you wish to communicate between server and app. You may use socket connection.
Typically, every client and server exchange information via public API's.
in iOS, we prefer, RESTful webservices that deliver JSON. (There are other options also, but we prefer this)
I'd say that the best way to ensure delivery of data to the app from the server depends on whether you know the app is running or not. Push notification can deliver payload data, albeit in small quantities, to the app and it does not matter whether it's currently running or not. It's a big subject but thats a good start.