Hi everyone,
I built my custom sensor (AHT20 BMP280 SPS30 BH1750 and ICS43434) with my own custom firmware. I would like to push data to api.sensor.community but I do not now how to register the sensor. How can I register it?
Thanks
Hi everyone,
I built my custom sensor (AHT20 BMP280 SPS30 BH1750 and ICS43434) with my own custom firmware. I would like to push data to api.sensor.community but I do not now how to register the sensor. How can I register it?
Thanks
Sign up on Sensor.Community
Go to dashboard → “Add new sensor”
Select your sensor types (SPS30, BMP280, etc.)
You’ll get a Sensor ID
Then in your firmware:
Use API: https://api.sensor.community/v1/push-sensor-data/
Add headers:
X-Sensor: esp8266-<sensor-id>
X-Pin: <pin>
Send data in their JSON format
That’s it, once data is sent, it will appear on the map.
Thanks for your reply. The problem is to find the chipID to register the sensor.
After a long research I figured out that it is generated from the MAC address and now it should work.
I’ll try to send data to the APIs.
Thanks
An other rapid question. How can I add a sensor type later? I would like to add DNMS to esp32-50787D16ACB8 but from UI settings I cannot.
Thanks,
Matteo
yo, does it work for you? Here’s my esphome script which sends data to sonsor.community, madavi and opensensemap. Maybe you will find this helpful.
## HPM/PMS/SDS011/SPS30 => Pin 1
## BME280 => Pin 11
## BMP180/BMP280 => Pin 3
## DHT22/HTU21D/SHT3x => Pin 7
## GPS(Neo-6M) => Pin 9
## DS18B20 => Pin 13
## DNMS => Pin 15
script:
- id: send_pm_data
then:
- http_request.post:
url: https://api.sensor.community/v1/push-sensor-data/
request_headers:
X-Pin: "1"
X-Sensor: "esp8266-6xxxxx1"
Content-Type: "application/json"
body: !lambda |-
return R"({
"software_version": "esphome-custom",
"sensordatavalues": [
{"value_type": "P1", "value": ")" + id(latest_PM10) + R"("},
{"value_type": "P2", "value": ")" + id(latest_PM25) + R"("}
]
})";
- http_request.post:
url: https://api-rrd.madavi.de/data.php
request_headers:
X-Pin: "1"
X-Sensor: "esp8266-6xxxxx1"
Content-Type: "application/json"
body: !lambda |-
return R"({
"software_version": "esphome-custom",
"sensordatavalues": [
{"value_type": "SDS_P1", "value": ")" + id(latest_PM10) + R"("},
{"value_type": "SDS_P2", "value": ")" + id(latest_PM25) + R"("}
]
})";
- http_request.post:
url: https://api.opensensemap.org/boxes/6830xxxxxxxxxx0007e40e7d/data
request_headers:
Content-Type: "application/json; charset=utf-8"
body: !lambda |-
return R"([
{"sensor": "6830xxxxxxxxxx0007e40e80", "value": ")" + id(latest_PM10) + R"("},
{"sensor": "6830xxxxxxxxxx0007e40e81", "value": ")" + id(latest_PM25) + R"("}
])";
- id: send_env_data
then:
- http_request.post:
url: https://api.sensor.community/v1/push-sensor-data/
request_headers:
X-Pin: "7"
X-Sensor: "esp8266-6xxxxx1"
Content-Type: "application/json"
body: !lambda |-
return R"({
"software_version": "esphome-custom",
"sensordatavalues": [
{"value_type": "temperature", "value": ")" + id(latest_temperature) + R"("},
{"value_type": "humidity", "value": ")" + id(latest_humidity) + R"("}
]
})";
- http_request.post:
url: https://api-rrd.madavi.de/data.php
request_headers:
X-Pin: "7"
X-Sensor: "esp8266-6xxxxx1"
Content-Type: "application/json"
body: !lambda |-
return R"({
"software_version": "esphome-custom",
"sensordatavalues": [
{"value_type": "SHT3X_temperature", "value": ")" + id(latest_temperature) + R"("},
{"value_type": "SHT3X_humidity", "value": ")" + id(latest_humidity) + R"("}
]
})";
- http_request.post:
url: https://api.opensensemap.org/boxes/6830xxxxxxxxx007e40e7d/data
request_headers:
Content-Type: "application/json; charset=utf-8"
body: !lambda |-
return R"([
{"sensor": "6830xxxxxxxxx007e40e7e", "value": ")" + id(latest_temperature) + R"("},
{"sensor": "6830xxxxxxxxx007e40e7f", "value": ")" + id(latest_humidity) + R"("}
])";