Skip to content

Remotely control a desk lamp connected to RaspberryPi

License

Notifications You must be signed in to change notification settings

Azmah-Bad/smartLamp

Repository files navigation

Lamp Pi

a NodeJS api that is hosted in Raspberry Pi that is powering my desk lamp via USB

Routes

the API has 2 routes :

  • POST /api/lamp/on: turns USB port up
  • POST /api/lamp/off: turns USB port down thus turning light off
  • GET / home page with 2 buttons to turn on or off the lamp (The UI is optimized for phones)

Technologies

I used uhubctl to control the USB port on the RaspberryPi and I used Express Typescript for the API

I used JS + HTML for the webpage

I also made an iPhone shortcut to make the api accessible from an iPhone

Credit

Icons made by Freepik from www.flaticon.com

About

Remotely control a desk lamp connected to RaspberryPi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published