Azure IoT Hub, connecting two devices and make them communicate - raspberry-pi

i am new to IoT and Azure but at the moment i want to connect a raspberry pi and the philips hue bulb to the IoT Hub. I already did this and i can communicate between the raspberry pi and the IoT Hub. I can send messages and store them in a Storage container.
But the biggest problem for me is to make the two devices communicate. My goal is that i send a message from the pi to the hub with a certain word, for example 'blue' and then the bulb changes its colour to blue. What is the best way to this? I really dont know how to proceed.
Help and advice would really be appreciated.
Greetings, Julian

Device to device communication is not available, hence you have to use IoT Hub as the broken between the two devices. There are a few ways to do this:
Use your Raspberry Pi as a controller by building a back-end application to control other devices. You can find a tutorial on how to control other devices here. You'd need to connect the Phillips hue bulb to IoT Hub as well.
Use your Raspberry Pi as an event triggering end-device, and use our integration features to route the command and then sends the command to Phillips hue bulb using Microsoft Flow.
Our reference architecture is documented here.

Related

How do I create a Near Edge computing system? (Send sensor data with Raspberry Pi/DHT11 sensor)

I am working on edge computing for IoT applications and expected to create a system that acts as a near edge computer with the use of a raspberry pi hooked up to a dht11 sensor. How do I send this data over to a computer that is at the edge? Ideally I want to use my PC as this device but I have no clue how to send this data over in real time.
So far I have created the circuit and can view the temperature and humidity readings on the raspberry pi in python. Unsure of what the next steps are - I don't want to send this data over to the cloud just yet.
Side note: I believe i may be missing knowledge regarding this but is the raspberry pi an edge device because it is hooked up to the sensor directly?
Any help is greatly appreciated.
You need to think this through a bit more. What will you do with the temperature and humidity data that you receive?
For example, if you're just experimenting and want to just see the readings in a console on your PC, you can use netcat to send the console output of your Python program from the RPi to PC. No SW development needed, they just have to be in the same network. Not particularly useful for anything else, either.
Otherwise you need to set up some client-server solution between the RPi and your PC. There's a ton of possible solutions, all depending on what you plan to do with the data. You can use MQTT, HTTP, a straight database connection (MySQL, PostgreSQL), etc. You have to supply both sides of the connection. The Python code on client side which connects and sends data; and the server side thing that accepts the samples and stores them somewhere. Plus all the networking, authentication etc.
Or you can just download the Python client libraries for your favourite cloud solution and set that up according to a tutorial. TBH, this sounds a lot less work to me.

Control Google Home with Raspberry Pi

I have a Google Nest and a Raspberry Pi. I would like to be able to send commands from the Raspberry to the Google Nest. I have done some research and I have found ways to control the rpi with the Google Nest but not the other way around. Any clue would be helpful Thanks!
EDIT: I think Google Nest may not be the target but the google home app. In the end I want to be able to do something like this: rpi sends request => light device registered in my google home app opens/closes.
You can target the Google Nest using the Smart Device Management API.
However, there are currently only a few traits supported for controlling the Nest, specifically targeting the on-board camera.

IBM Presence Insight RpiProx

i've been struggling lately with integrating Rasperry Pi and IBM Presence Insight
for wifi proximity detection
the official documentation describes raspberry pi as possible Wifi Proximity sensor, but there is no available documentation
someone tried it before ?
In order to use Raspberry Pi as a proximity sensor, you will need to:
Build a raspberry pi device with two different wifi adapters
Configure one wifi adapter to be an publicly visible endpoint
Write code to capture every time a mobile device tries to connect to the endpoint
Report that information back to Presence Insights.
Unfortunately, the chunk of code you need to write has not been open sourced, so you will need to do this on your own.
You could probably hack together a solution. It looks like there are a lot of resources out there online about "seeing who connects to my network [1], [2]" You could probably use one of these solutions and just feed the data into Presence Insights in the correct format (see the documentation about "proximity connectors.")
[1] http://www.howtogeek.com/204057/how-to-see-who%E2%80%99s-connected-to-your-wi-fi-network/
[2] https://github.com/tlhunter/node-wireless

Raspberry-pi as connectable beacon

I want to build some kind of two-way bluetooth connection on Raspberry-pi which actually works as beacon. Based on RadiusNetworks tutorial (How to Make an iBeacon Out of a Raspberry Pi http://developer.radiusnetworks.com/2013/10/09/how-to-make-an-ibeacon-out-of-a-raspberry-pi.html) I've built beacon on my Raspberry-pi, but it's working in "advertise and not-connectable" mode (which is connected with problem described here: Raspberry Pi iBeacon connection timing out).
What I want to achieve is beacon device, which works in advertise mode and also allows to receive some events from other device (i.e. iPhone). When iPhone discovers Raspberry-pi beacon I want it to send some data to Raspberry-pi to trigger some action. I know that in the simplest way my iPhone should send data via network to raspberry while it enters to the beacon region, but unfortunatelly my solution has to work in offline mode, so I'm looking for some kind of direct (and possibly fast) connection. I think that PayPal beacon is a good example of my needs (as it is decribed here: https://devblog.paypal.com/how-does-paypal-beacon-work/ their device works as gate for communication user smartphone with PayPal services).
I'm complete beginner in BLE topics, so I would be grateful for any hints where I can start exploration or how to properly ask Google for any good answers in this topic.
For complex interaction, you need to learn how to build a connectable Bluetooth service with BlueZ, which is the Linux open source Bluetooth stack. Once you have this service, you can write iOS code using CoreBluetooth to connect to this service when the beacon is nearby.
Unfortunately, I do not know of a good tutorial for building services on BlueZ. The BlueZ code is open source at least, so the code is a good place to start looking:
http://www.bluez.org/development/

Communication between MS Metro and an Arduino board?

I've received a project from someone that includes an Arduino (Uno) board with some sensors and lights with an USB cable and a documented protocol for communicating with this board through a COM port. It works fine with some existing code, but I need to port the whole project to a Windows RT environment using an ARM processor and including the Metro interface for the application. And it's going to be completely rewritten...
First of all, my Windows RT device does have an USB port so it can connect to the board. But the challenge is to communicate with the board to read out the sensors and manipulate the lights and I happen to have problems finding some useful libraries, tutorials or other information about how to make these work together.
This project works fine with other Windows versions, though. I just need something specific for Windows RT/ARM/Metro.
Currently it is not possible to do this on Windows RT, and here is an explanation why. As a work around I am using a standard full screen WPF application in combination with the Surface SDK for touch enable UI components. The obvious disadvantage here is that you cannot publish the app to the store.
I think that we should actually try it on a real machine instead of the rt. The surface rt is basically for documents and the internet.
You'd be better off trying all of this with a Toshiba 2032.
A PDA from about 2003.