Guest User

Untitled

a guest
Nov 14th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. //Replace with your Wifi SSID; example: #define ssid "MyWifi"
  2. #define ssid "MySecrets!"
  3.  
  4. //Replace with your Wifi password; example: #define password "12345678"
  5. #define password "MySecrets!"
  6.  
  7. //Replace with a human-friendly host name. Must not contain spaces or special characters and be unique on your network
  8. #define hostname "esp32_3"
  9.  
  10. //Replace with your MQTT Broker address; example: #define mqttHost IPAddress(192, 168, 1, 195)
  11. #define mqttHost IPAddress(MySecrets!)
  12.  
  13. //Replace with your MQTT Broker port; example: #define mqttPort 1883
  14. #define mqttPort 1883
  15.  
  16. //Replace with your MQTT Broker user; example: #define mqttUser "homeassistant"
  17. #define mqttUser "MySecrets!"
  18.  
  19. //Replace with your MQTT Broker password; example: #define mqttPassword "12345678"
  20. #define mqttPassword "MySecrets!"
  21.  
  22. //Replace with the room name where the node will be placed; example: #define room "living-room"
  23. #define room "Sovrummet"
  24.  
  25. //Specify the LED pin. For most dev boards, this is GPIO2
  26. #define LED_BUILTIN 2
  27.  
  28. // Logic level for turning the led on. Most boards use active low, meaning LED_ON should be set to 0
  29. #define LED_ON 0
  30.  
  31. //Define the base topic for room detection. Usually "room_presence"
  32. #define channel "room_presence"
  33.  
  34. //Define the topic for publishing availability
  35. #define availabilityTopic "presence_nodes/" room
  36.  
  37. //Define the topic for publishing JSON attributes
  38. #define telemetryTopic "presence_nodes/" hostname "/tele"
  39.  
  40. // Define bluetooth scan parameters
  41. #define scanInterval 5 // Define the interval in seconds between scans
  42. #define singleScanTime 5 // Define the duration of a single scan in seconds
  43. #define activeScan true // Active scan uses more power, but get results faster
  44. #define bleScanInterval 0x80 // Used to determine antenna sharing between Bluetooth and WiFi. Do not modify unless you are confident you know what you're doing
  45. #define bleScanWindow 0x10 // Used to determine antenna sharing between Bluetooth and WiFi. Do not modify unless you are confident you know what you're doing
  46.  
  47. // Maximum distance (in meters) to report. Devices that are calculated to be further than this distance in meters will not be reported
  48. #define maxDistance 4
Add Comment
Please, Sign In to add comment