Published © CC BY-NC-SA

Smart Outlet

A simple to build and highly useful project that allows one to power on or off any connected device from their smart phone or computer.

ExpertFull instructions provided1 hour196
Smart Outlet

Things used in this project

Hardware components

Quantum Starter Bundle
Quantum Integration Quantum Starter Bundle
×1
Relay (generic)
One is included in the Quantum Integration Starter Kit.
×1
Jumper wires (generic)
Jumper wires (generic)
×3
Miniature Extension Cord
×1
Quantum Component Kit
Quantum Integration Quantum Component Kit
×1

Software apps and online services

Quantum Integration Platform
Quantum Integration Platform

Hand tools and fabrication machines

Small flat-head screwdriver
One is included in the Quantum Integration - Starter Kit
Wire Stripper, Serrated Plier Nose
Wire Stripper, Serrated Plier Nose

Story

Read more

Schematics

Smart Outlet Fritzing File

Relay Case .stl file

Code

Outlet App.json

JSON
This code is made to only be imported to our application builder on our Q-Server's OS as it is customized to work with our UI.
{"id":"9","name":"Outlet","identifier":"Outlet","offsetX":16.05499634167902,"offsetY":10.798832397765686,"zoom":97.11777750651042,"gridSize":0,"links":[{"id":"90","internalFlowId":null,"type":"default","selected":false,"points":[{"id":"1071669c-f248-4b79-a391-2da01cb8f400","selected":false,"x":272.781273740305,"y":215.49998198368002},{"id":"f90e8ce6-335a-4201-a862-03a833260725","selected":false,"x":444.39378799337504,"y":214.5297572046746}],"labels":[],"width":3,"color":"rgba(255,255,255,0.5)","curvyness":50,"source":"108","target":"107","sourcePort":"399","targetPort":"396"}],"nodes":[{"id":"107","internalFlowId":"fcad3e9ac7","type":"quantum","selected":false,"x":426.407,"y":168.045,"name":"Outlet","mappingDescription":"No instructions defined!","description":"An outgoing digital signal which can turn things on or off.","color":"#02B0EF","qType":"Widget","originalName":"Digital Out","factoryId":"widget_digital_out","properties":{"mappableCategory":{"category":1,"subCategory":2},"multiMapping":false,"manufacturer":"generic"},"ports":[{"id":"396","internalFlowId":"ebed0697-67e7-43ab-8535-a2bcd61c7560","type":"quantum","selected":false,"name":"bfad2f48-a789-4029-898a-beb55f74122b","in":true,"label":"State","description":"This output is used to send out the state of the digital In.","qTrigger":true,"defaultValue":null,"properties":{"clientService":{"key":"q_digital_out","name":"Digital Out","uuid":"efc403fb-d447-5100-8f26-c6942cc3db39","value_len":"1","props":["write","read"],"propChar":[],"signalType":{"key":"digital","name":"Digital","baseType":"Boolean","defaultValue":false},"characteristics":[{"key":"q_info","name":"Info Characteristic","uuid":"6375a20d-31ae-4456-aaf6-8fc84e3cce26","properties":["read"],"type":"utf-8"},{"key":"q_value","name":"Value Characteristic","uuid":"a97ba6d9-c409-4118-8735-b5bef87b9afd","properties":["write","read"],"type":"user"},{"key":"q_properties","name":"Prop Characteristic","uuid":"93d79faa-21ed-4ce7-b658-d9bcb06bd943","properties":["read"],"type":"utf-8"},{"key":"q_subClient","name":"Subclient Characteristic","uuid":"1270fde2-fd5e-4e4f-b866-241f105f7b15","properties":["read"],"type":"user"}],"drivers":["custom_gpio_out","custom_mcp23017_out","custom_Q74HC595"]}},"signalType":{"key":"digital","name":"Digital","baseType":"Boolean","defaultValue":false},"index":0,"clients":[{"id":89,"createdAt":"2020-12-10T23:58:01.890Z","updatedAt":"2020-12-10T23:58:01.890Z","clientId":6,"subClientId":45,"serviceId":155,"PortId":396,"client":{"id":6,"name":"Q #33663","mac_address":"08:6b:d7:4a:83:7f","proxy":"02:81:e6:8e:59:ca","state":"ON","rssi":-70,"batteryLevel":100,"batteryMode":"BATTERY PACK","lifeCycle":false,"manufacturer":"Quantum","category":{"category":null},"advertisement":{"localName":"Q #33663","serviceData":[],"serviceUuids":["5155414e54554d430002ffffffffffff"],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]},"energyInformation":{"batteryLevel":"100%","batteryVoltage":"3310mV","deviceVoltage":"3.319V","internalResistance":"0.89","powerTypeNumeric":2,"powerType":"BATTERY PACK"},"createdAt":"2020-12-10T23:53:14.383Z","updatedAt":"2020-12-10T23:53:14.833Z","proxyLinkId":1},"subClient":{"id":45,"name":"Relay","category":{"category":1,"subCategory":2},"index":1,"createdAt":"2020-12-10T23:53:14.787Z","updatedAt":"2020-12-10T23:53:14.787Z","ClientId":6},"service":{"id":155,"client_mac_address":null,"name":"State","signalType":"Digital Out","serviceKey":"q_digital_out","uuid":"efc403fbd44751008f26c6942cc3db39","characteristics":[{"uuid":"6375a20d31ae4456aaf68fc84e3cce26","name":null,"type":null,"properties":["read"],"value":"State"},{"uuid":"a97ba6d9c40941188735b5bef87b9afd","name":null,"type":null,"properties":["read","write"],"value":"OFF"},{"uuid":"93d79faa21ed4ce7b658d9bcb06bd943","name":null,"type":null,"properties":["read"],"value":"-"},{"uuid":"1270fde2fd5e4e4fb866241f105f7b15","name":null,"type":null,"properties":["read"],"value":"010052656c61797e317e32"}],"type":null,"createdAt":"2020-12-10T23:53:14.834Z","updatedAt":"2020-12-10T23:53:14.834Z","SubClientId":45}}],"NodeId":107}],"category":"Generic","version":"0.0.1"},{"id":"108","internalFlowId":"27fbcecd6c","type":"quantum","selected":false,"x":92.791,"y":167.015,"name":"Switch","mappingDescription":null,"description":"A switch that let`s you toggle between on and off on the dashboard.","color":"#07D174","qType":"Gadget","originalName":"Switch","factoryId":"gadget_switch","properties":{"gadgetType":{"name":"Switch"},"gadgetLabel":"Switch","gadgetColor":"info","gadgetGroup":"1","gadgetIcon":"buttonIcon","gadgetStyle":"full"},"ports":[{"id":"397","internalFlowId":"10e8b9a3-6b06-4c9a-bf1d-ebc5c34f11ac","type":"quantum","selected":false,"name":"2358438c-8a9b-47cc-9d1a-853202c0b6e3","in":true,"label":"Label","description":null,"qTrigger":false,"defaultValue":null,"properties":{},"signalType":{"key":"string","name":"String","baseType":"String","defaultValue":""},"index":0,"clients":[],"NodeId":108},{"id":"398","internalFlowId":"53379f2d-576a-4d5a-b9fe-be44535e56e1","type":"quantum","selected":false,"name":"5273fc48-58d0-4f7c-9a30-5d0b65c557ff","in":true,"label":"State","description":null,"qTrigger":true,"defaultValue":null,"properties":{},"signalType":{"key":"digital","name":"Digital","baseType":"Boolean","defaultValue":false},"index":1,"clients":[],"NodeId":108},{"id":"399","internalFlowId":"e3b6f6fd-7e3d-4590-904a-23ab24215f0a","type":"quantum","selected":false,"name":"eef394e2-29f8-41fc-b5ec-1efe3402d2ca","in":false,"label":"State","description":null,"qTrigger":null,"defaultValue":null,"properties":{},"signalType":{"key":"digital","name":"Digital","baseType":"Boolean","defaultValue":false},"index":2,"clients":[],"NodeId":108}],"category":"Action","version":"0.0.1"}],"status":"Running","rendering":{"id":"25","tabs":[{"id":"25","internalFlowId":"24","name":"Tab 1","position":0,"groups":[{"id":"25","internalFlowId":"24","name":"Group 1","position":0,"gadgets":[{"id":"72","NodeId":108,"GadgetGroupId":25,"position":0}]}]}]},"createdAt":"2020-12-10T23:39:22.983Z","errorLog":null,"debugFlag":false,"version":"0.0.1"}

Outlet Firmware.json

JSON
This code is the firmware file for the project. The code is customized to be used on the Q-Server's OS.
{"name":"Outlet","commit":"1.2.6-development-e6900041","lifecycle":false,"signal":[{"disabled":false,"subClientIndex":0,"subClientName":"Relay","subClientCategory":1,"subClientSubCategory":2,"serviceName":"State","service":"q_digital_out","driver":"custom_gpio_out","driverValues":{"port":"gpioPortD","pin":"13","mode":0},"signalType":{"key":"digital","name":"Digital","baseType":"Boolean","defaultValue":false}}],"version":"0.0.1"}

Credits

Comments