Arduino Sensor Plugin - Build your own wireless sensors!

@axhill
What happens to the eeprom when re-writing/downloading a sketch? Will it be wiped?

If not wiped - We have a probelm if a new sketch containing a different set of sensors is written to the arduino. It will send its old id back to vera and it mill missmatch the devices in vera.

If it gets wiped - We will create new vera device each time we update our sensor code because the sensor will request a new id.

Hmm…

The time variable was a good idea and i will implement it. It will work like the relay sketch does (when requesting state in startup).

2 hek: u r using Pro-Mini 5v now, but NRF24 module requires 3.3V power supply, how did u solve it?

EEPROM would not be wiped when u re-write a sketch.
To solve that problem, before upgrade the sensor, - delete an old one from vera.

I realized that a couple of days ago (when my pro minis arrived) also. I will buy some low drop power regulators. Probably these:
http://www.aliexpress.com/item/FREE-shipping-10-PCS-LE33-TO-92-VERY-LOW-DROP-VOLTAGE-REGULATORS-WITH-INHIBIT/481626589.html

I have some large step down power supplies that I can use while waiting;
http://www.aliexpress.com/item/10pcslot-LM2596s-DC-DC-step-down-power-supply-module-3A-adjustable-step-down-module-LM2596-voltage/912126670.html

Will update the wiki…

take a look at this LDO http://www.aliexpress.com/item/XC6206P332MR-XC6206P252MR-SOT-23-SMD-triode-transistor-Good-quality-ROHS-leave-message-model-you-need/473456552.html
looks like it can feet requirements and it is chiper

Yes, and MCP1700T or LD1117 also looks good.
But some of the are really tiny and hard to solder by hand I guess… ?

MCP1700 is nice but LD1117 better to check for datasheet
I have AMS1117 - drop voltage is at minimum 1V while MCP1700 and the one I mentioned early are about 0.25V

yes - it will be hard to use them on breadboard but soldering is simple even without hotair

Ok, I’ll also buy some 662K.

100 pcs for $6 is unbeatable. It does not matter if soldering fails for a few of them…

short question:
How many sensor elements can be served with one Arduino board ?

It depends…
You have 13 digital inputs and 5 analog on a arduino pro mini. The radio uses 5 of the digital ports. So left is 8 digital inputs.

In the code i’ve set the limit to 128 child sensors per radio…

so 8 digital and 5 analog left … thats a word !

i’m serching for a affordable solution for serval motion and distance Sensors to get things more “automated”.
my drawback was the expected cost of easy 400 bucks in z-wave hardware.

does that work with a VeraLite and a USB-Hub as well ? (i dont want to loose the logging and storage for datamine)

I have my arduino hooked up to a usb hub. So yes.

Hi!

hek: Impressive work! Have done some testing with your code and it works fine! I have a few ideas that may be of interest;

  • It is easy to connect a serial LCD to an arduino and in combination with a cheap PSU one could make small “info-frames/stations” around the house showing various Vera data. Or with Larger LCDs or dot-matrix displays one could make ?wall-clocks? showing whatever Vera data you like. Maybe a development of axill’s clocks? Sending text strings to a “sensor”?

  • A really low battery solution for one or two I/Os would be great to watch the mailbox (the physical one). I know it has been discussed but not sure if a good solution came up?

  • As for the ID of the sensor, I believe Dallas has some one-wire chips with just a unique ID on (DS2401). Maybe something that can be used? Or if all sensors have a DS18x20, one could steal the ID from those. [url=http://www.aliexpress.com/item/Ds2401-ds2401-to-92/892319599.html]404 page

Anywho, will continue to play with this system whenever there is some time leftover.
Keep up the good work! 8)

Thanks Ludde.

The Arduino vera plugin could very well relay messages to a sensor. It should be enough if I implement a sendMessage action where you can specify the (altId) of the sensor and a string message.
But bare in mind that there is a limitation of 29 bytes payload in each message to the sensors. So we will not be able to stream any video to a sensor :slight_smile:

The sensor would then use the waitForMessage and do the needful when a message arrive. BTW right now waitForMessage is busywaiting… I should probably do something about that aswell (or at least give an alternative).

The mailbox sensor should be pretty simple. Just register the sensor as a door or motion sensor and connect a magnet sensor between +5 and on of the digital in:s of the arduino. Using interrupts this sensor would sleep most of the time (see soil moisture sensor for an example).

@All
I am open to contributors. Improving documentation or code. Just give me a nudge.

thats great, i have a USB Hub in my “Router Room” already. but its connected to a Computer Power Supply for the 5 volts
serving the MiLight Bridge, and my in-wall Tablet (on the other side of the wall) and the Phone (3G Backup)
(the 12 volts serve all routers,switches, pbx, vera, hdd’s and so on)

just need to figure out how to have the vera use serial part of the usb hub with power coming from the Computer Power Supply

Thanks for tip, see that the soil sensor uses interrupts, will be fine!

Ooops, forget about the DS2401 ID idea, the ID is 0-255… DS2401 will be too large (48-bit).

As for the message length, anyway one could send two messages, like A and B from Vera? Have the same node ID but different message IDs?

Is there a limit on how many serial devices that can be configured in Vera?

nullx8: Cut the red wire? Keep the D+, D- and Ground? Maybe?

First I really appreciate you taking the time to post this guide for the community!

I was wondering if folks would be willing to post pictures of their devices they purchased using the links in the guide so Newbee like my self could have a visual to go along with the instructions?

Thanks everyone!

New release… see wiki for details…

CHANGES 1.2

  • Added possibility to request time from vera
  • Support for 5 custom variables (can be stored in any sensor device).
    Note that chixxis variable container is still not supported. But
    the functionality is similar.
  • Sensors reports their library version to Vera.
  • New example sketch showing time and variable functionality
  • SendCommand action added in vera plugin which makes it possible to send
    data to sensors from scenes (advanced-section) or via luup-calls.
  • Auto-id added. A sensor can now request id from vera at first start.
    The id gets stored in the sensors EEPROM.
    All example sketches now uses auto-id functionality.
    You can still use static ids if that is preferred.
  • Fixed “No Implementation” message when pressing Armed/Bypassed on security
    sensors.
  • Automatically sets LAST_TRIP and BATTERY_DATE
  • Cleaned up plugin code

hek it is unbelievable! thanks for release
will follow beta testing as soon as possible

Hello Henrik!

Congrats for this achievement.
I would like to use the distance sensor to inform me about the level of my tank (water not beer but I’ll offer you one) Do you think it can work?

I plan to power it with 1.5 V batteries. Do you think I need 3 or 4? The tank is 10 m away from the Vera with only 1 wall in between.
I will report my testing results.
Thank you.

Jerome

I just found the resolution of the ultrasonic sensor (0.3 cm), so it should work.
I have a large but flat tank with only 90 cm between empty and full levels.
I’m curious and impatient to set this up!