Fork me on GitHub

pimatic-ultrasonic by Marek Kail | github | npm

pimatic-ultrasonic

Pimatic support for the HC-SR04 ultrasonic sensor.

Exapmle wiring

Example config

Add the plugin to the plugin section:

{ 
  "plugin": "ultrasonic"
}

Then add a sensor for your device to the devices section:

{
  "id": "ultrasonic",
  "name": "Ultrasonic HC-SR04",
  "class": "Ultrasonic",
  "echo": 22,
  "trigger": 18,
  "timeout": 750,
  "interval": 60000
}

You can also select the unit:

example: "displayUnit": "cm"

Credits

Luke for mmm-usonic

License

AGPL-3.0

Plugin Config Options

my plugin config options

Device Config Options

pimatic-ultrasonic device config schemas

Ultrasonic

Ultrasonic config options
OptionDescriptionDefault
echo
number
Echo pin
trigger
number
Trigger pin
timeout
number
Measurement timeout in µs
750
interval
integer
Interval in ms so read the sensor
60000
displayUnit
string
The unit of the attribute
""
pimatic-ultrasonic is written by Marek Kail