-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90d8d83
commit 7716d95
Showing
5 changed files
with
49 additions
and
13 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
import airtrik.iot as iot | ||
|
||
device1 = "bulb" | ||
device2 = "fan" | ||
device = "bulb" | ||
|
||
def onConnect(): | ||
print("Connected To Network") | ||
# print(iot.logs()) | ||
|
||
def onReceive(deviceId, message): | ||
if deviceId == device1: | ||
print(device1, message) | ||
if deviceId == device2: | ||
print(device2, message) | ||
print(device, message) | ||
|
||
|
||
iot.onConnect = onConnect | ||
iot.onReceive = onReceive | ||
|
||
iot.connect("__APP_KEY__") | ||
iot.subscribe(device1) | ||
iot.subscribe(device2) | ||
iot.subscribe(device) | ||
|
||
# iot.waitForMessage() | ||
# print(iot.logs()) | ||
iot.waitForMessage() | ||
|
||
|
||
while True: | ||
msg = input("Enter The Message to send\n") | ||
iot.send(device1, msg) | ||
# while True: | ||
# msg = input("Enter The Message to send\n") | ||
# iot.send(device, msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source env/bin/activate | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name="airtrik", | ||
version="0.1.1", | ||
version="0.1.2", | ||
author="Vishal Pandey", | ||
author_email="[email protected]", | ||
description="Connect IoT Devices to cloud and manage from anywhere.", | ||
|