WIA is a platform to works with MQTT protocol. Yo can implement a simple Python script to send two random values and a GPS location.
Create a Profile on WIAFirst of all go on WIA
Sign up on the site. After that you can create your dashboard. In the dashboard, you can see all the signals that receive from your devices.
Install Python on OSXOpen Terminal on your Mac OS X system. In the Spotlight search type Terminal
.
Now you can copy some commands to install programs and library. After that you can write your Python program and run it.
First of all, install homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After that, install Python:
brew install python
Verify your Python version:
python --version
Install Wia LibraryNow you are a Osx system with WIA library installed.
sudo pip install wia
Write the CodeType:
sudo nano test.py
In the editor, put the code "WIA simple Python code" that is in the Attachments of this tutorial. Now is the time for modify the API code with your API WIA code.
Create Your First DashboardNow you can go on wia.io and Login your account. Create a new Dashboard, and copy your API code. The API secret key.
Go on Devices
Select Add Devices
Choose ESP8266
. Then go inside this device and select Configuration.
Inside the configuration copy the API secret key.
You can substitute the *********************
inside the code with your API secret key.
Now in your console, type:
sudo python test.py
Open you WIA space. Add some graph and a map in your space. Read the random values online and the GPS position.
Comments