Plugin / Device that measures distance?

I?m new in this forum and searching for a virtual device or suitable virtual sensor that measures distance in Vera. I was unable to find any for the moment.

Is it hard to create a new device?

I want this is as a part of my home automation system to graph how much pellets I use and warn if my pellet level in my heating system goes below 15 percent.

For the moment I use a virtual lighting sensor that measures percent light, data is reported to my Vera Lite with http. My Arduino recalculates distance to percent and reports with an http request. I added a scene that sends me an SMS when the Pellet level goes below 15%.

The reason why I would like to have a distance sensor instead of percent is to make this Arduino project more portable for other users. For the moment I need to measure when the pellet store is empty and then use that distance when calculating distance in percente.

If there were a device that measures distance instead, my project will be much easier to replicate for other home automation implementations, all that?s needed to be changed for in the Arduino code is ?Vera IP?, and ?device ID? .

My project and all Arduino code is posted on my blog, it?s in Swedish but google translate solves that.

// Ispep

I know there are ultrasonic sensors for measuring distance inside oil tanks, like this one:

but I doubt they would work for dry contents. Perhaps there are similar technologies, however, or you could fashion a hard, flat surface above the pellets that lowers as the pellet bin is depleted?

Look at, I saw there also a distance sensor.

If it going to work in your pellet room ??, I have one in a “day”- container , which is filled with wood pellets twice a day, but the issue is dust. After 3-4 days there is so much dust on the sensor the sensor senses “always full”


I would like to create a virtual device that?s measures units in CM or inch, don?t know if it?s hard to create new xml ?devices?. ???

My pellet store is an old oil drum, it enough pellets for 4 days (± 1 day) depending on outdoor temperature.

I use an ping sensor to measure distance with my arduino, and so far it has not been showing wrong values (I use the vacuum cleaner each time I soot )

Everything is working well, my problem is more aesthetic in Vera gui  :-[

This is the graph I get from vera with data mine (attachment PelletLevel.JPG). It seems like I add pellets all the time, but it?s pellets plummets down into the gap that the deed pipe created.