Driveway Sensor?

I’ve been using openHAB on RPi 2 mostly with Z-wave and have been happy. SWMBO is even pleased with what I’m doing. The one thing that she has asked for is to have some type of sensor at the end of the driveway so that we can trigger and event when a car pulls in. The driveway is about 200’ long and I don’t have an always on power source at the end of it. With some effort I may be able to rig something up to my lamppost but that is not ideal. Does anyone have a suggestion on a device to use? It doesn’t need to be z-wave.

I use a Moteino running off a 9V battery. It lasts about 9-10 months. I have a simple reed switch for monitoring our entry gate. When it opens the Moteino sends an RF package to another Moteino connected to an Arduino w/ ethernet shield (gateway). The gateway translates the RF packet to an MQTT publish, and openHAB monitors that MQTT topic. I can then play a nice doorbell chime on the kitchen Squeezebox whenever the entry gate is opened.

The Moteinos are a pretty good little all-in-one device which you can program using the standard Arduino IDE. Their range is reasonable and their battery usage pretty conservative.

Worth a look if you are happy to get your hands dirty playing around with Arduino sketches etc!

1 Like

I use Sure Action driveway sensor, what I like about it is that unlike a switch it gives me car enter / exit direction.

Take a look at this links: , - they use HMC5883L magnetic sensor as car detector.

Do you have any comments on the ease of installation of the Sure Action device, or how easy/difficult it is to get OpenHAB talking to it?

Just dry contacts, I have a lot of the with door and motion sensors so I use Pokeys57E with modbus. Actually since I have so many dry contacts I use one for each floor. With 55 I/O pins that works out nicely.

Hi Nathan,

I’ve seen a couple of your posts recommending the Pokeys57E, I’m particularly interested out of this post as I’m looking for something to do multiple switching for dry contacts for wired door sensors and PIR’s.

I haven’t managed to find a great deal of information on the Pokey57E, would you be kind enough to share more of the details of your installation please - which motion sensors are you using, how do you have them wired/powered (are you using 5v PIR’s? ) etc.


Consider this with any of the cheap Arduino sensors available on eBay, like a HC-SR04 ($1 ultra sonic) , any PIR sensor, or even with the magnetometer someone mentioned above.

Btw, what’s wrong with any standard battery-powered zwave motion detector from Fibaro or Aeon ?

You can find the Pokeys57E manual here. As far as motion sensors I go with wired 12V PIR/MCW into Pokeys57E.

I’ve looked at too, and built a few prototypes. Lack of suitable cases/kits is the biggest issue, secondly is the time to build them - ultimately I’m interested in the rules/intelligence for automation rather than building hardware.

what’s wrong with any standard battery-powered zwave motion detector from Fibaro or Aeon ?

  • Cost - £30-40 each z-wave sensor Vs £6 (
  • Batteries - z-wave eats them, adds to cost, increases maintainance
  • Reliability - the z-wave sensor I have works mostly - (Everspring)
  • Latency - there’s an inherent latency with z-wave
  • Configuration - The everspring motion sensor particularly is a nightmare to configure, it maybe contributing to the latency issue.

On balance, the Pokeys device looks like a good option - 55 inputs should more than suffice, I just need some advice on suitable PIR’s - I’ve got a bunch of standard alarm PIR’s, but would like to find some small ceiling mounted ones - those inside a downlighter sized case would be ideal, but are all 240v.


Cheers Nathan,

Are there any PIR’s you’d recommend, have you sourced any 360 or in-ceiling ones (downlighter sized)?
Any issues/gotchya’s with either wired PIR’s/door switches or the Pokeys57E I need to be aware of?
What have you powered the PIR’s with - I assume a standard 12v supply of some sort?


Interesting. Have you had any cold weather issues with the battery operation?

Nope - just been through a winter - didn’t notice any difference in battery drain. I would like to build a little solar PV module with a LiPo battery to give endless operation…it is on the TODO list.

1 Like

Hi Nathan,
can you please share your Modbus <-> OPENHAB Configuration examples for POKEYS57E?

for temperatursensor ds18b20?

Thank you.

I read temp from http, open/closed from modbus:


items modbus
Contact Basement_Door “Basement Door [MAP(]” (Basement_Main, Door) {modbus=“basement:0”}
Contact Basement_Slider “Basement Slider [MAP(]” (Basement_Main, Entry) {modbus=“basement:5”}
Contact Basement_Window “Basement Windows [MAP(]” (Basement_Main, Window) {modbus=“basement:3”}
Contact Basement_Closet_Door “Basement Closet Door [MAP(]” (Basement_Main, Door) {modbus=“basement:1”}

items for http
Number Hot_Water_Temp “Hot Water Temp [%.1f °F]” <hot_water> (Water) {http="<[]

transform for http

<?xml version="1.0"?>

xmlns:xsl=“” version=“1.0”>

<xsl:output indent="yes" method="xml" encoding="UTF-8" omit-xml-declaration="yes" />

<xsl:template match="/">
		<xsl:value-of select="(/devStat//sensor[@ID=06] div 100) * (9 div 5) + 32" />


1 Like

Thank you Nathan,
but I still can not read from Pokeys.
What do I have to config on Pokeys?
Now I can read temperature on ddashboard.
But openhab says:
“2015-12-10 23:30:07.765 [ERROR] [i.internal.GenericItemProvider] - Binding configuration of type ‘http’ of item æTemperature_GF_Corridoræ could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: bindingConfig ‘<[]>’ doesn’t contain a valid binding configuration”

any hints?
Thank you.

Nathan thank you for help. now it works for me as well.

do you have some examples for switch / relay over MODBUS?
Thank You.

Switch		Garage_Door_A_Relay		"Garage Door A"						<garagedoor>	(Garage)				{modbus="basement:51", autoupdate="false"} 
Contact		Garage_Door_A			"Garage Door A [MAP(]"			<garagedoor>	(Garage, Entry)				{modbus="basement:17"}
Switch		Garage_Door_B_Relay		"Garage Door B"						<garagedoor>	(Garage)				{modbus="basement:52", autoupdate="false"} 
Contact		Garage_Door_B			"Garage Door B [MAP(]"			<garagedoor>	(Garage, Entry)				{modbus="basement:18"}
Switch		Garage_Door_C_Relay		"Garage Door C"						<garagedoor>	(Garage)				{modbus="basement:53", autoupdate="false"} 
Contact		Garage_Door_C			"Garage Door C [MAP(]"			<garagedoor>	(Garage, Entry)				{modbus="basement:15"}