On Watson MQTT foundation, how do I publish a message from one device (publish-"iot-2/evt/xxxxxxxxx") to another device (subscribe-"iot-2/cmd/xxxxxxxx")?
How is this possible as devices' publish and subscribe topics cannot be same? Is it possible without first receiving it in an application and republish to 2nd device, or devices can only send/receive data to/from an application?
Is this Watson implementation or MQTT spec?
Devices publish events and subscribe to commands. An application can send commands to a device.
A device can not send commands to another device.
The Watson IoT platform has specific topic strings, refer to documentation.
If you have a device such as a raspberry pi sending commands, have you tried connecting it as an application to publish the command and then have the other device connect as device to subscribe and receive the commmand?
Related
I'm creating an app that communicates with an IOT board via Bluetooth low energy. When I install the app for testing directly from my pc it works perfectly. But when I published it, it doesn't list the Bluetooth devices.
I am using the following permissions
android.permission.INTERNET
android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
android.permission.ACCESS_COARSE_LOCATION
'These permissions are in'
'android/app/src/main/androidManifest.xml'
'android/app/src/profile/androidManifest.xml'
I'm using the ble component: ^2.0.0
I have a raspberry pi in my local wifi network. Also I bought smart socket which can be integrated with Alexa or Google Home Assistant. What is a best option to turn the socket on/off from my raspberry?
I thought about installing alexa or google home assistant on the raspberry and somehow use one of these to control my socket. However I don't want to do that by voice but simply a bash script.
It is possible to control the local wifi device with a bash script. You can use ifconfig to bring an interface up/down and configure it accordingly. But, it also depends on the integration of the smart socket with Alexa/Assistant, whether the manufacturer provides their own API endpoints for you to use or whether the user interacts through Assistant/Alexa. If you are using Google Assistant, you can leverage automations on Google Home App to control the device automatically.
When running an app via Flutter run or VC, we see the flutter console log of the app.
Is it possible to send keyboard events from the developer PC to the app via STDIN which we receive in the app (without VM extensions).
The idea is to use this during development to trigger certain actions in the app.
I ended up building a simple TELNET server into the app. This I way, I communicate with the app running on a phone for debugging purposes.
I want to develop an app to control IoT devices via Bluetooth, but I don't know which Bluetooth plugin use in ionic 4 application to control IoT devices(send and receive messages)
You should use this ionic plugin : https://ionicframework.com/docs/native/bluetooth-serial
that enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino (not Android to Android or iOS to iOS).
I wrote an app which runs on two android tablets at the same time. The app enables both devices to communicate with a java server which is running on the pc, via WLAN socket communication.
The problem with the WLAN connection is that it doesn't always seem to be reliable. So I wanted to setup a socket communication to the server via USB cables.
My problem no is how to connect TWO android devices to the server via USB cables. I found this tutorial for connecting ONE device to the server via ADB, but I see no possibility using this approach for two devices:
http://www.anothem.net/archives/2010/10/15/android-usb-connection-to-pc/
Has anyone an idea how to solve it? Thanks!
If your tablet is runs ICS or newer Android OS, then it is very likely that it has OTG capable micro-USB socket, and you can add a USB-Ethernet dongle, and then connect the 2 tablets to your PC over ethernet, instead of USB. This, might be the most elegant solution.
Of course, you'd need a switch (or hub) to connect them together. Also note that, not all USB-Ethernet dongles may work out-of-the-box. You might have to experiment with few models, especially the el-cheapo ones to get them to work.