Skip to content

Friedjof/ESP32-433API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 433API

This projekt links an API to a 433MHz transmitter. This is based on the ESP32.

Hardware

  • ESP32
  • 433MHz transmitter

Endpoints

/

  • GET: returns the WiFi status

/styles

  • GET: returns the styles for the web interface

/logs

  • GET: returns the logs
    • ?key=your-api-key: returns the logs
    • ?clear: clears the logs

/config

  • GET: set or return the config
    • ?ssid=your-ssid&password=your-password: set the WiFi config
    • ?show: returns the config

/transmit

  • GET: transmit a code
    • ?key=your-api-key: authorization
    • &msg=your-message: the message to transmit
    • type=your-type: the type of the message (hex & bin are supported)

Software

Development

Setup

Visual Studio Code with PlatformIO

  • install PlatformIO

Move directory data-sample to data

mv data-sample data

Edit data/config.json

{
    "wifi": {
        "ssid": "myssid",
        "password": "mypassword",
        "hostname": "your-hostname",
        "port": 80
    },
    "microcontroller": {
        "serial_baudrate": 9600
    },
    "transmitter": {
        "pin": 27,
        "protocol": 1,
        "pulse_length": 500
    },
    "api": {
        "key": "your-api-key"
    }
}

Build filesystem and upload

pio run -t buildfs && pio run -t uploadfs

Build and upload

pio run -t upload

Monitor

pio device monitor

License

MIT

Author

Friedjof Noweck

About

This is a 433MHz web-API for the esp32 microcontroller

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published