Hackster is hosting Impact Spotlights: Industrial Automation. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Industrial Automation. Stream on Thursday!
Saranya rm
Published

Smart Home Automation

To build a simple smart home automation system using the Bolt WiFi module to control appliance

IntermediateShowcase (no instructions)2 hours322
Smart Home Automation

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
Incandescent Lamp, 230 V
Incandescent Lamp, 230 V
×1
Relay Module (Generic)
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1
Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
Bolt IoT Android App
Bolt IoT Android App

Story

Read more

Schematics

Smart Home Automation

Build a simple smart home automation system with Bolt IoT to control appliance remotely

Code

Smart Home Automation

Python
Build a simple smart home automation system using the Bolt WiFi module to control appliance remotely.
import json
import time
from boltiot import Bolt

API_KEY = ""
DEVICE_ID = ""

mybolt = Bolt(API_KEY, DEVICE_ID)

def turn_appliance_on():
    mybolt.digitalWrite("0", "HIGH")  # Turn the appliance on

def turn_appliance_off():
    mybolt.digitalWrite("0", "LOW")   # Turn the appliance off

while True:
    print("1. Turn On\n2. Turn Off\n3. Quit")
    choice = input("Enter your choice: ")

    if choice == "1":
        turn_appliance_on()
        print("Appliance turned on.")
    elif choice == "2":
        turn_appliance_off()
        print("Appliance turned off.")
    elif choice == "3":
        print("Exiting...")
        break
    else:
        print("Invalid choice. Please enter 1, 2, or 3.")

Credits

Saranya rm
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.