Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookbook: adafruit.io MQTT #116

Closed
hajdbo opened this issue Jan 7, 2019 · 1 comment
Closed

Cookbook: adafruit.io MQTT #116

hajdbo opened this issue Jan 7, 2019 · 1 comment
Labels

Comments

@hajdbo
Copy link
Contributor

hajdbo commented Jan 7, 2019

I could not find an esphomeyaml template that would work with adafruit.io: auto-generated MQTT topics would not be accepted by adafruit.io, and debug messages would go over the 30 msg/min rate limit.
To work around these problems, I had to:

  • Remove the birth_message and will_message, because they would spam the console every five seconds,
  • Remove the OTA debug stream, as it would also go over the rate limit. You can still upload new firmwares OTA, though.
  • Force adafruit.io MQTT topic naming convention for each sensor output.

Here is the template, for you to reuse. Replace XXXX by your user name, of course.

esphomeyaml:
  name: mqttbme280
  platform: ESP8266
  board: nodemcuv2
wifi:
    ssid: 'XXXXXXX'
    password: 'XXXXXXXXXXXXXXXX'
ota:
  password: 'XXXXXXXXXXXXXXXX'
mqtt:
  broker: 'io.adafruit.com'
  username: 'XX<USERNAME>XX'
  password: 'XX<APIKEY>XX'
  topic_prefix: 'XX<USERNAME>XX/feeds'
  birth_message:
  will_message:
  log_topic:
# Enable verbose logging on serial
logger:
    level: VERY_VERBOSE
    logs:
         spi: INFO
         i2c: INFO
i2c:
  sda: D6
  scl: D5
  scan: False
binary_sensor:
    - platform: status
      name: "BME280 Status"
      id: status
      internal: True
# note that bme280 is either on address 0x77 or 0x76
sensor:
  - platform: bme280
    address: 0x76
    temperature:
      name: "BME280 Temperature"
      id: temperature
      state_topic: XX<USERNAME>XX/feeds/bme280.temperature
      discovery: False
      filters: []
    pressure:
      name: "BME280 Pressure"
      id: pressure
      state_topic: XX<USERNAME>XX/feeds/bme280.pressure
      discovery: False
      filters: []
    humidity:
      name: "BME280 Humidity"
      id: humidity
      state_topic: XX<USERNAME>XX/feeds/bme280.humidity
      discovery: False
      filters: []
    update_interval: 15s
- platform: wifi_signal
    name: "BME280 WiFi Signal"
    update_interval: 15s
    id: signal
    state_topic: XX<USERNAME>XX/feeds/bme280.wifi
    filters: []
    discovery: False
switch:
  - platform: restart
    name: "BME280 Restart"
    internal: True
@github-actions
Copy link

#162

@github-actions github-actions bot added the stale label Oct 23, 2021
@github-actions github-actions bot closed this as completed Nov 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant