I'll have to keep this short because I have to get to bed as I have work in the morning. However, I just wanted to report that I was able to get sensor readings from Xtrinsic MEMS sensor board to be published to the web browser.
The process is as follows:
- Sensor board on Raspberry Pi B+ has a python script that handles communication between the board and the computer. This same python script then pushes the data to the mqtt server which is on the Raspberry Pi 2. This is set over port 1883.
- Once the server receives the data it then publishes it to all subscribers. In this case, the same RPi2 is subscribed and awaiting the information. The data is then received by the JavaScript code sitting on the lightttpd server.
- The JavaScript then updates the HTML and displays the data.
I've done it this way so that the server can be separate from the boards that will be sitting in the pizza bag/box. Of course, it is possible to have the mqtt server on the sensor board computer, but then that would mean having an mqtt server for each pizza delivery. It makes much more sense to have a single broker (that is what the mqtt servers are called) for all the pizzas.
Well, more progress next week. I'll continue to work on getting all the sensor information publishable to the web browser and then I'll have to start building out the interface. I'm leaving the actual pizza bag for last.