Things used in this project

Hardware components:
Google Home
×1
Phpoc blue per 100x1000 euk22wtv9i
PHPoC Blue
×1
Relay board t type jznmyjoo9g
PHPoC 4-Port Relay Expansion Board (T-type)
×1
Light Build
×1
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service

Code

index.phpPHP
This code handles HTTP request from IFTTT applet and turns on/off the light
<?php
	include_once "/lib/sd_spc.php";
	
	$text_ingredient  = _GET("state");
	$is_on = strpos($text_ingredient, "on");
	$is_off = strpos($text_ingredient, "off");
	
	if($is_on !== false || $is_off !== false)
	{
		spc_reset();
		spc_sync_baud(115200);
		if($is_on !== false)
	    		spc_request(14, 4, "set 0 output high");
	    	else
	    		spc_request(14, 4, "set 0 output low");
	}
?>

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Map Your Particles!
Easy
  • 522
  • 15

Protip

Locate your Particle Photons, P1s and Electrons on a map without needing extra hardware. Use Ubidots or an offline map alternative

Cheapest Smart Home for $38
Easy
  • 253
  • 4

Full instructions

Use Raspberry Pi Zero W to make the cheapest and easiest yet very useful smart home automation for $38 only and no skills needed!

Play a Song with Stepper Motor
Easy
  • 53
  • 6

Play a harmonized song with two stepper motors connected to a PHPoC blue or black and stepper motor smart expansion boards (PES-2403).

Boost Your Google Home With Prota OS for RPi
Easy
  • 2,346
  • 9

Full instructions

Extend your Google Home features to smart light, smart speakers, smart cam and smart appliances with those DIY tricks based on Raspberry Pi.

Internet Streaming Radio with Google AIY
Easy
  • 2,718
  • 22

Protip

Make a voice-activated Internet streaming radio with your Raspberry Pi and Google AIY. Can also be used to play MP3s or other audio files.

AssistantPi
Easy
  • 4,139
  • 34

Full instructions

Bring both Google Assistant and Alexa to your Raspberry Pi.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Feedback