We have moved at community.getvera.com

Author Topic: Arduino Sensor Plugin - Build your own wireless sensors!  (Read 263957 times)

Offline chilump

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #75 on: September 26, 2013, 10:22:44 am »
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!

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #76 on: September 27, 2013, 09:59:16 am »
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

« Last Edit: September 27, 2013, 10:07:45 am by hek »

Offline axill

  • Full Member
  • ***
  • Posts: 183
  • Karma: +3/-0
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #77 on: September 27, 2013, 11:35:15 am »
hek it is unbelievable! thanks for release
will follow beta testing as soon as possible

Offline jduchon

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +1/-0
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #78 on: September 27, 2013, 05:42:26 pm »
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
« Last Edit: September 27, 2013, 06:12:31 pm by jduchon »
Jerome

Offline jduchon

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +1/-0
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #79 on: September 27, 2013, 07:07:46 pm »
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!
Jerome

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #80 on: September 28, 2013, 02:56:50 am »
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.

 
« Last Edit: September 28, 2013, 12:02:09 pm by hek »

Offline mitekdg

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #81 on: September 28, 2013, 12:52:38 pm »
hek, thx 4 update!
bug report: RelayActuator - stop working. ver #28 - work fine

Offline jduchon

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +1/-0
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #82 on: September 28, 2013, 01:34:31 pm »
Yes, moisture will be the big problem. Thank you for the advice for the batteries and voltage.
Jerome

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #83 on: September 28, 2013, 01:56:18 pm »
@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


Offline mitekdg

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #84 on: September 28, 2013, 02:22:54 pm »
1. gateway - updated
2. lib - updated
3. relay sketch - updated
non working

1. gateway - updated
2. lib - old ver28
3. relay sketch - old ver28
working


Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #85 on: September 28, 2013, 02:57:06 pm »
And vera plugin version?

Please check vera logs if we can find any problems there...

Offline mitekdg

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +0/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #86 on: September 28, 2013, 03:01:48 pm »
updated vera plugin.
ver 1.2

how to get this data from vera?

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #87 on: September 28, 2013, 03:31:16 pm »
You need to ssh into vera and run the command above.

Maybe it's better to look at serial log on relay first. Hook it up to your computer and select Tools->Serial Monitor in the Arduino IDE.

Then turn on/off relay in vera/browser and look at the output.

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #88 on: September 28, 2013, 04:06:27 pm »
I might have found something... w8 a bit...

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Arduino Sensor Plugin - Build your own wireless sensors!
« Reply #89 on: September 28, 2013, 06:01:22 pm »
Found a problem in vera plugin. It manifested itself when a sensor requested an id.
An updated "L_Arduino.lua"  has been checked in.

@mitekdg
Was your problem that no device showed up at all?