How to receive sms messages on raspberry pi - text

I recently set up a Twilio account and got a registered Twilio phone number. Is there a way that I can get those messages on my raspberry pi? My intent is to display those messages on a LED screen.

You'd have to either expose the RasPi to the public internet (so Twilio's SMS callback could reach it), or use some proxy service in between.
The proxy would capture the inbound callback, then the RasPi could either poll, or use some better method, to check for new messages (meaning, the RasPi does not have to be on the public internet).
Temboo also has a set of tools that make it easier to build IoT applications that interact with APIs. I believe they can act like the proxy I describe.

Related

MQTT How to send back to client in IoT?

I am new beginner and try to create IoT network.
As I search on the Internet and see some information,
there is a device (MQTT client), and broker (MQTT server).
I have use node.js (masca) to setup a web server with static IP as "broker".
I have a TinkerBoard as "device", and it run bash command as publisher.
But I meet a problem and very confuse about the architecture... all the sample code I found are one-way communication.
The broker does not send anything back to device.
Is that necessary I have to create both publisher and subscriber program in the device to allow user send command through the broker to control the device?
Yes if you want to receive messages on your device as well as publish them then it will have be both a subscriber and publisher.
It is perfectly normal for a single client to do both.

Actions on Google perform operation in local network

Trying to create an action on Google that communicates with devices in my local network.
So my question is, is that even possible, to perform an operation directly through google home, without a need to have a webhook in a server somewhere??
and if so, and i will need to have a webhook, what is the best way to make the webhook communicate with my phone, other than push notifications.
If you want to control anything on your home network then you will have to run the fulfillment server in your house or let an external fulfillment server connect to something in your house. Either way you will need to poke a hole on your home firewall or use something like ngrok or bst proxy.
Then you will be in your home network and you can do your things on your local devices.
You should be more specific about the communication with your phone. What exactly are you trying to accomplish?

MQTT broker for Windows IOT Core?

I have a Raspberry Pi running Windows IOT Core and it is running my home automation application. Now I need to set up communication between the RB pie and ESP8266.
I've been considering the MQTT protocol but I don't want to have an external server running the MQTT broker and I can't find a broker for the Win IOT. Does a MQTT broker exist for Windows IOT Core? If not, what communication protocol would you recommend for this purpose?
Antonio there are a few options available for you on Windows IoT Core
If you're building an application using Node.js there's Mosca (http://www.mosca.io)
If you're building an application using Python, you can check out hbmqtt (https://github.com/beerfactory/hbmqtt)
Of course for .NET applications you can search Nuget. GnattMQ (www.nuget.org/packages/GnatMQ) seems to be pretty popular .NET library
The is the GnatMQTT which is written in C# so I guess should build on Window IoT
Possibly there exist some MQTT lib or another protocol. But I assume the following situation and going to suggest a solution:
Assumptions:
Rpi is at the core of the system.
ESP is working like satellite, sensor etc.
So ESP is reporting data to the Rpi
They (Rpi and ESPs) all are in the same subnet.
Solution:
On the Rpi side implement a simple UDP bcast listener and listen to some specific port on BROADCAST ip. (ex: 8889)
On the ESP side implement a UDP Client to send data to BROADCAST ip and to specific port. (ex: 8889)
Implement a message format and make ESP to send it and Rpi to parse it.
Example Message Format:
The message can be a string (ASCII encoded).
ABBBEEECCCDDDD.....DDD
A: Start Header
BBB: Sender ID
EEE: Receiver ID
CCC: Payload Byte Count
D..: Payload
OR
A|BBB|EEE|DDDDD..DDDDDD|F
A: Start Header
|: Seperator
BBB: Sender ID
EEE: Receiver ID
D..: DATA payload
F: End Header.
This config will allow you to use DHCP, not to record any IP address of the clients and it is cheap to implement (according to resources ram,cpu etc).
Note: I don't know how MQTT uses resources.
There are a ton of MQTT brokers available. ActiveMQ is built with Java and can be installed on any platform that supports Java. Mosquitto and RabbitMQ have installers for Windows.
However, if you want something even more lightweight than MQTT you might also want to look into CoAP.

Creating an SMS server on the PC

I am trying to create an application that would act as an SMS server between multiple virtual instances of Java ME.
I have searched online and have not found anything that dealt with this issue.
This is not to be confused with the link attached that was discussed on stack overflow before.
J2ME SMS Server on mobile phone
I am hoping to create the SMS Server to act as a tester for an actual SMS gateway in a production environment.
Any help will be appreciated
It is definitely possible with j2me
for testing you have to create two application.
In which one application will send sms to a phone no on predefine port and
the receiver application will listen on that port for incoming sms
go through this sample code it will help you.

J2ME SMS Server on mobile phone

Is it possible to have a j2me app on a mobile to act as a "SMS gateway" that will handle incommming messages, do a query on a database via GPRS and reply the user back?
This is entirely possible on any J2ME handset that supports JSR 120 (i.e.: most of them). However as Wonil said, you can't just process ANY incoming SMS message. It has to be an SMS sent to a port number on which your app is listening (using a server connection as Wonil explained).
It wouldn't be automatic unless the app was signed (as confirmation is generally required for sending SMS and network access).
Another approach is to tether your phone to a PC using a USB cable/bluetooth/IR, open a serial connection using the phone as a modem, and write a program to listen for new SMSs using AT+CGML as described here. This would allow ANY incoming SMS to be processed (no port number required), and without any annoying confirmation prompts.
HTH
I think you should check about JSR-120 documentation to confirm.
But, in my thought it might be impossible. If you want to receive message by using JSR-120, you should assign specific end point(port number) to listen as like below:
serverConn = (MessageConnection)Connector.open("sms://:5000");
So, you can't catch all SMS messages. It can't be a gateway then.
It probably depends if your phone supports it. Have a look at the J2ME Wireless Messaging API:
The Wireless Messaging API (WMA) is an optional package for the Java 2
Platform, Mobile Edition (J2ME) that
provides platform-independent access
to wireless communication resources
like Short Message Service (SMS).
http://java.sun.com/products/wma/overview.html
This article has some examples which can probably serve as a starting point for what you want to achieve: http://www.ibm.com/developerworks/wireless/library/wi-extendj2me/
Edit: as others have pointed out, you might not be able to receive all messages.

Resources