The distance sensor is surprisingly accurate. Should work very well for your project!
Don’t know how it will survive long time exposure to moisture in the tank though…
3 batteries will give 4.5 volt which would give enough power and can be connected to the unregulated Vcc input of the pro mini.
@mitekdg
What parts did you update? Both plugin, library and relay sketch (using new library)?
Did you also update the ArduinoGateway sketch using new library?
Next step to debug is:
Have a look at Vera logs. Is data coming in from sensor?
grep Arduino /var/log/cmh/LuaUPnP.log
Also have a look at the serial output from relay sketch Tools->Serial Monitor
[quote=“hek, post:77, topic:176573”]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[/quote]
hek, could u give some example to work w/variables. And another question is how can i send a battery lev from sensor.
thx
Thank you so much for sharing this plugin!
I have a Vera since last Saturday, and I have immediately looked for a way to interface the Vera with my IR remote control (logitech harmony) to control the lights, and was disappointed not to find no solution at less than 100?.
I know pretty well Arduino, and the great IRremote library from Ken Shirriff’s (A Multi-Protocol Infrared Remote Library for the Arduino), so finding your plugin was a bless to put me at start on a cheap IR interface solution (approx 10?)
Thanks to your example, I had the plugin working on Sunday: for now it simply executes scenes with predefined names when I press buttons on the remote.
I am now trying to have the plugin generate events instead of directly running scenes, so that I do not have to use any particular names for the scenes… I am struggling with this for now: the documentation for luup is one of the worst I have ever seen
Anyway, thank you so much for this plugin! It is a great idea. I am sure I will be using your plugin in full very soon!
(for the IR plugin, once finished, I will post my plugin in a different thread. I do not want to pollute your thread, but just to say thank you )
What do you mean by security token? Some sort of AES key exchange and encrypted traffic would be the best but it would require quite complex handshaking and probably larger messages. But it would be nice, I agree… someone up for the challenge or having clever ideas, please let me know.
I see a couple of problems using nrf24 network. Relay nodes must always be “on”, ready to relay message. Which means no battery devices.
The node addresses (16bit) is also used to set topology would require me to redo the whole auto-id and message structure. It would be a quite a bit more complex for novice users to setup their sensor network. I really like the idea of a z-wave network better where nodes auto-configure their topology and routes. Don’r really know if I have the time to implement that type of behavior though.
2 purposes: pairing devices, so 1 device can interact with 1 gate, and the second one - secure (encrypting) messaging
Yes, the relay nodes must be always on-line, but it will allow to increase the range of network. Have u seen the maniacbug RF24Network meshnetwork example, its very easy to configure. Auto-config is excellent solution, but very complex, i think manual config will be enough
encryptions a nice thing to have but it costs hardware and it will slow down implementation.
I thing we should thing about two different things:
authentication
encryption itself
the first one can make our network more consistent because we can be sure that we react to the message of “a right” format from “a right” pair.
it can be archived by a few different ways:
1.1) simple check for the message body using our unique function. For example we can put one byte CRC to check that the rest of the message is matching CRC. If there is no match device should ignore the message assuming that message is of wrong format, wrong version, wrong pair etc.
1.2) through key-exchange algorithm - before two devices will communicate (or any new device will communicate with a gateway) a right format keys should be exchanged:
1.2.1 using any simple arithmetic function - will require about zero of additional programming and memory code but will be also zero resistant to intruders
1.2.2 using good encryption algorithm like DSA/RSA etc. It will be much more protected from the intruders but will require 1-4kb of programming code
after key exchange we should send a right key with each message. Probably key should have an expiration leading to the next key exchange session.
because 1.2.2 requires the same additional program code as 2.1 it probably a reason to use just encryption without authentication (encryption will act also as authentication using private/public keys)
but the cost… I personally will prefer to build network faster less secured instead of slower and secured. I do not plan to put locks using arduino and i have nothing against someone listen to my sensors. But at least 1.1 or 1.2.1 is nice to have - this will reduce dramatically a probability of unexpected behavior.
network
i think RF24Network is not a good solution
i’m thinking of:
keeping simplest design of end-user devices
add relays. You will just need a few of them across the house
relays can relay message both ways
they should have powered from the outlets, not batteries.
relay can be at the same time an end-user device but not necessary
relay should acts as a gateway to end-user device if end-user device was configured to talk with relay instead of GW
relay can talk to GW using another relay (not needed at first step but will allow to brake a restriction on a distance from a device to GW)
ID generation by vera&GW should also include relay assignment. Etc. wile adding a new device we should take vera & GW close to a new device and initiate ID & relay assignment. It can be like this:
vera sendsa new ID to device
device announce itself to the network
first replying relay should be recorded by a device as relay
relay should record a device as neighbor
relay should announce a new device as it’s neigbor to it’s relay (including GW itself)
this way:
relay will knew it’s neighbor
device will knew it’s relay
GW will knew all devices and their relays
the path can be constructed on the fly relaying one through one