Giter Site home page Giter Site logo

arduino-ds18b20-exporter's Introduction

arduino-ds18b20-exporter

Little sketch with prometheus exporter for arduino nano and multiple Dallas temperature sensors.

Parts:

  • 1x ds18b20 sensor
  • 1x arduino nano
  • 1x enc28j80 ethernet shield

how it work's

Just curl http://192.168.1.41 :

sensor_exporter_uptime{mac="90:a2:da:0d:10:5a"} 1908564
sensor{mac="90:a2:da:0d:10:5a",addr="40.28.168.7.0.0.128.63",res="12",pwr="parasite"} 21.94
sensor{mac="90:a2:da:0d:10:5a",addr="40.129.18.124.6.0.0.87",res="9",pwr="external"} 24.00
sensor{mac="90:a2:da:0d:10:5a",addr="40.203.37.123.6.0.0.190",res="9",pwr="external"} 36.00
sensor{mac="90:a2:da:0d:10:5a",addr="40.255.47.100.102.20.2.94",res="12",pwr="external"} 8.75

⚠️ Warning ⚠️

Make sure that your Arduino is flashed with bootloader supporting AVR watchdog, like Optiboot. Otherwise Arduino may stuck in a boot loop.

Optiboot is already included in modern Arduino IDE versions. Connect external programmer, select new bootloader and press "Burn Bootloader":

How to burn bootloader from Arduino IDE

How to build

With default MAC and IP addresses (90:a2:da:0d:10:5a, 192.168.1.41):

make fw

To build with custom MAC and IP addresses:

make MAC=12:34:56:78:90:ab IP=192.168.0.123 fw

How to upload

avrdude -v -patmega328p -carduino -P/dev/$TTYDEV -b115200 -D -Uflash:w:fw/arduino-ds18b20-exporter-$MAC-$IP.hex:i

How to test

curl -v http://$IP/

Debug log is on Arduino's USB Serial port (115200 baud).

Note that watchdog resets the device if there was no HTTP requests during last 60 seconds.

arduino-ds18b20-exporter's People

Contributors

im-0 avatar ktkd avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

im-0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.