1312 shaares
475 private links
475 private links
4 results
tagged
thingsboard
<pre>
Enable dallas sensor module on PIN 23
dallas:
- pin: 23
update_interval: 60s
The sensor itself
sensor:
-
platform: dallas
flash the config fist without the sensor block
and pick the dallas address from the log
address: 0xCD012062C7DCFFFF
resolution: 12
id: mysensor
filters:generate the median from 5 values to improve the quality
the sensor will transmit a value to influxdb each 5 minutes
-
median:
window_size: 5
send_every: 5
send_first_at: 5
on_value:
then:send the data
- http_request.post:
url: https://metrics.example.com/write?db=sensordataesphome is not able to verify a certificate
verify_ssl: false
headers:influxdb 1.x uses basic authorization
In a Linux shell:
echo -n "username:password" | base64
Authorization: 'Basic YWxpY2U6cGFzc3dvcmQ='
a few lines of C code to generate the influxdb request data
https://docs.influxdata.com/influxdb/v1.8/guides/write_data/#write-data-using-the-influxdb-api
body: !lambda |-
char buf[64];
sprintf(buf, "%0.1f", id(mysensor).state);
return ((std::string) "temperature,group=outdoor,locationkey=example-sensor,stage=test,platform=esphome,sensor=dallas value="+buf).c_str();
</pre>
- http_request.post:
-