8000 GitHub - felipeasimos/esplamp: A simple esp8266 RGB lamp controllable by an API, with a simple Qt6 App for both desktop and mobile to control it
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A simple esp8266 RGB lamp controllable by an API, with a simple Qt6 App for both desktop and mobile to control it

License

Notifications You must be signed in to change notification settings

felipeasimos/esplamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Esp Lamp

A simple esp8266 rgb lamp controllable by an TCP API.

How to Run

  1. Install PlatformIO
  2. Create a .env based on env_example
  3. Plug a esp8266 to your computer
  4. pio run -t upload -t monitor
    • get the server IP from here
  5. Get lamp IP from console or monitor UDP broadcast on port 12345 coming from it with the message "openupitsme"
    • I recommend using wireshark to monitor and get a feeling for it!
  6. send 6 bytes through TCP to get color/alter color:
.-----------------------------------------------------.
| length | P or G |pwn_step|   R    |    G   |   B    |
| 1 byte | 1 byte | 1 byte | 1 byte | 1 byte | 1 byte |
`-----------------------------------------------------´
  • length - always 6.
  • P or G - P to change color and fade effect intensity, G to get these information
    • if G is used, all the other bytes are ignored, but must still be sent
  • pwm_step - fade effect intensity. Range from 0 to 100.
  • RGB fields - range from 0 to 100 each.
  1. receive back
.-----------------------------------------------------.
| length | status |pwn_step|   R    |    G   |   B    |
| 1 byte | 1 byte | 1 byte | 1 byte | 1 byte | 1 byte |
`-----------------------------------------------------´
  • length - always 6.
  • status - 1 if OK, 0 on error.
  • pwm_step - fade effect intensity. Range from 0 to 100.
  • RGB fields - range from 0 to 100 each.

Roadmap

  • Change colors with PWM
  • Connect to wifi
  • Accept TCP connection
  • Respond TCP connection
  • Optional POST parameters
    • duration of fade effect to new RGB color
  • GET pwm_step and rgb
  • return pwm_step and rgb in POST
  • respond to discovery broadcast message
  • Qt App
    • discover lamp ip
    • change color

About

A simple esp8266 RGB lamp controllable by an API, with a simple Qt6 App for both desktop and mobile to control it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0