![]() ![]() Open a Slack channel to see messages posted by ESP8266 NodeMCU board. HttpsClient.addHeader("Content-Type", "application/json") #include Ĭonst char *WIFI_SSID = "YOUR WIFI NETWORK NAME" Ĭonst char *WIFI_PASSWORD = "YOUR WIFI PASSWORD" Ĭonst char *FINGERPRINT = "71f8c380fe88b8ab308b3fe15eb8f6769878cc30" Messages to a Slack channel are send in a JSON format using POST requests. In the loop function, we generate the random number from 1 to 100 (inclusive). We set the station (STA) mode in order to connect to a Wi-Fi network. In the setup function, serial communication is initialized. We define constants to store Wi-Fi network SSID and password, a Webhook URL, and fingerprint of an SSL certificate. Note: fingerprint should be updated when the certificate expires. In the new window, select the "Details" tab and find "Thumbprint" field in the list.Click on the lock icon in the address bar and choose "Certificate" option.Open a browser and enter the URL address of a Slack website.If you use Chrome browser, then follow these steps: In order to send a GET request using HTTPS protocol from ESP8266 NodeMCU to the server, we need to get the fingerprint of an SSL certificate. Copy the generated webhook URL so you can paste it into your Slack connector form. Use your Incoming Webhook URL to post a message. Pick a channel that the app will post to, then click Authorize. Create a Slack app, enable incoming webhooks, then create an incoming webhook. In Slack Click Add New Webhook to Workspace. In this case, general channel has been selected. Configure a Slack account for incoming webhooks edit Log in to as a team administrator. It will be used to send a message to a channel that selected in the setup. ![]() You can see a Webhook URL which look something like this:. ![]() You will be redirected back to Incoming Webhooks settings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |