Hello,
I converted my DIY Pro to One using the new mainboard.
However I cannot send data to the dashboard anymore.
When adding a new device to the dashboard, which model should I choose for the One (ESP-C3) ? I only see cryptic names like O-1DIY…
I also used the full MAC address (12 characters) as sensor ID.
I am using the code from @MallocArray to send to the dashboard:
esphome:
name: "${devicename}"
friendly_name: "${upper_devicename}"
# name_add_mac_suffix: true # Set to false if you don't want part of the MAC address in the name
on_boot:
priority: 200 # Network connections setup
then:
- http_request.post:
# Return wifi signal -50 as soon as device boots to show activity on AirGradient Dashboard site
# Using -50 instead of actual value as the wifi_signal sensor has not reported a value at this point in boot process
url: !lambda |-
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
headers:
Content-Type: application/json
json:
wifi: !lambda return to_string(-50);
But in the logs I always see this message:
HTTP Request failed; URL: http://hw.airgradient.com/sensors/airgradient:<MAC address>/measures; Code: 400; Duration: 617 ms
(replace MAC address by the 12 characters MAC address I also entered as sensor ID above)
Is there something I am doing wrong ?
Thanks