EDS OW-SERVER Emulator for 1-wire devices

This is not really a topic related to MySensors devices, but rather an alternative for some to converting to MySensors 1-wire devices.

Do you have a setup where you are using Dallas 1-wire devices on an existing 1-wire network on a Raspberry Pi or similar device? I had this setup that I was using with Domoticz before I got my Vera. The setup used a 1-wire USB interface and I had multiple sensors already wired in an inline setup. This, and I already had OWFS installed and working on my Pi device.

I noticed that Vera had a 1-wire plugin, but it was for a 1-wire to ethernet device called OW-SERVER-ENET. In some searching on this device, I cam across a post on the Vera forum called "MiPi 1wire plugin". This guy had written a perl script that created an XML file that emulated the one that the OW-SERVER device used. In researching his plugin, it did not work for me. It did however give me enough information to build my own using PHP. The emulator that I wrote can be modified to support a number of different 1-wire devices. I currently have temp sensors (DS18S20 and DS18B20) support, 1-wire RTC support (Might need a tweak or two) and a DS2890 1-wire digital pot. It is only 55 lines of PHP code. It uses two commands from the OW File System, "owdir" and "owread" to get the devices and create the XML file.

Once you have that set up on your Pi device, you will need to set up Apache2 and PHP. I will not go into the setup of these. Place the owserver.php file in the root web folder and add a root cron job to run every minute.

The last thing is to install the EDS OWServer plugin and set it up using the instructions here . On your Vera, navigate to Devices > OWServer > Add Devices, and you should see something like this:

I had some trouble trying to add my new temp sensors using UI7 on my Vera Plus. I tracked the problem down to the J_OWServer.js file. The original was trying to use a Hash object which gave me errors in my Firefox browser. I made changes to use a plain javascript Object, and I can now add the sensors. I have made changes to that file and have a copy of it in my github repo.

@urbanus in your wiring, did you flip around the leds? (i.e. did you connect the longer pin to the gpio pins instead of to vcc?
With your wiring, are the leds on when there is no traffic?
My guess is that you have reversed the connections. Which is fine, but by default the leds will be on.

Use a latching relay. Here is one I found on Amazon. https://www.amazon.com/dp/B015MRQNXS/?coliid=I3LXTGKX4GEPUR&colid=31WWM91JAUE22&psc=1&ref_=lv_ov_lig_dp_it
If you are trying to use with existing 3 ways use https://www.amazon.com/dp/B015MSYQ8Q/?coliid=I3RP8X9OMYWU97&colid=31WWM91JAUE22&psc=1&ref_=lv_ov_lig_dp_it
Use an optocoupler to indicate lamp status...see the last diagram in this post. https://forum.arduino.cc/index.php?topic=435506.0
ELECTRONICS-SALON Panel Mount Momentary-Switch/Pulse-Signal Control Latching SPDT Relay Module,12V
undefined available
ELECTRONICS-SALON Panel Mount Momentary-Switch/Pulse-Signal Control Latching DPDT Relay Module,12V
$14.99
1 available

@halo6 I use Domoticz instead of Vera, but the general idea should work.
Add another child sensor to your parking sensor that is a binary switch. Maybe S_DOOR, V_TRIPPED or S_BINARY, V_STATUS. That switch gets presented to your controller. Then have the parking sensor listen for a message to that child ID and work normally if on or do nothing (but listen for messages) when off.
In Vera, write a small script that turns on the new parking sensor switch when the garage door is open, and turns it back off again when the garage door is closed.