Today I started the amazing Intel Edison board to try and use the XMPP-IoT tools to connect it securely over internet and it worked like a charm.
inittial setup and configuring for wifi was done with the instructions from Intel, i used the mac version. It didn’t take long to get i hooked upp to wifi. Activate a password on root for it to enable remote ssh
https://software.intel.com/en-us/iot/getting-started
https://software.intel.com/en-us/articles/getting-started-with-the-intel-edison-board-on-mac
Upgrade flash image to the latest
http://www.intel.com/support/edison/sb/CS-035280.htm
http://www.intel.com/support/edison/sb/CS-035180.htm
Get the software started
I am using a fork from the python SleekXMPP package. Just wget the SleekXMPP package with the XMPP-IoT extensions from my Github. Python 2.7.3 is already on the machine. The GPIO package ”mraa” for python is also installed from the beginning very handy.
You need two XMPP accounts on a server somewhere there are many https://xmpp.net/directory.php I usually use the swedish jabber.se. Create two accounts so they later can talk to each other.
in the /home/root folder on the Edison do:
wget --no-check-certificate https://github.com/joachimlindborg/SleekXMPP/archive/xep_0323_325.zip
unzip xep_0323_325.zip
Start off with blinking the magical led
Go down in the example katalog and start the python Edison example with your xmpp account.
cd SleekXMPP-xep_0323_325/examples/IoT/
python IoT_GPIODevice_Edison.py -j yourfirstaccount@domain.com -p password -n test_device
should look something like this
Now direct your browser to https://conversejs.org/# login with the other xmpp user you created. yoursecondaccount@domain.com. Then choose to add a contact and provide the first account it should just accept and you can start chat with the device. use ”hi”, ”toggle” ”relay=true” and ”?”
If you have a RELAY and a PIR sensor wire them up to the board use GPIO pin 13 for the relay and GPIO 8 for the PIR you can see the PIR sensor changing
Some more interesting articles
The journal logs keep filling up so I changed the journaling.conf
to restart a clean image but I failed totally the reflashed edison keeps all settings
http://www.instructables.com/id/Factory-Reset-your-Intel-EdisonTroubleshooting-Con/step5/Reflash/
I found dokumentation on the opkg package manager very useful, especially the command to remove a package with dependencies
http://wiki.openmoko.org/wiki/Opkg/Documentation
opkg --force-removal-of-dependent-packages remove <<yourpackage>>
Examples on using GPIO with python on the Edison Aurduion board
https://github.com/intel-iot-devkit/mraa/tree/master/examples/python
Jumpers on the Edison board
https://communities.intel.com/docs/DOC-23455