Skip to content

General Discussion

A place to talk about whateeeever you want
1.5k Topics 14.2k Posts
  • Seamless Smart Home Interface

    13
    0 Votes
    13 Posts
    5k Views
    Moshe LivneM
    @NeverDie it was about a year ago
  • Watchdog on Ethernet Gateway

    ethernetgateway attiny45 watchdog
    32
    0 Votes
    32 Posts
    21k Views
    Dan S.D
    @NeverDie All I can say is that after adding the watchdog I have not had a lockup in 2+ months. Before that, like you, I had random lockups. Based on this positive experience I also added a watchdog to the one repeater I have in my system. Had a brief power outage the other day and everything came back online by itself with no problems.
  • Multiple interrupts

    9
    1 Votes
    9 Posts
    6k Views
    G
    Hello, GreyGnome here. Glad to see the library is helping you. Sorry to see you had to edit code. In the next upcoming release I will include compiler directives that allow you to comment out conflicting interrupts. Also, as someone else mentioned- don't use attachInterrupt() together with EnableInterrupt(). It just makes the code fatter, and EnableInterrupt() can already cover both interrupt types; eg on an Arduino Uno: enableInterrupt(2, myFunkyExternalInterruptFunction, LOW); enableInterrupt(10, myExcellentPinChangeInterruptFunction, CHANGE); ...note that enableInterrupt will use External interrupts on pin 2 by default. You can force it to use pin change interrupts: enableInterrupt(2 | PINCHANGEINTERRUPT, myFunkyExternalInterruptFunction, FALLING); ...in which case, "myFunkyExternalInterruptFunction" is something of a misnomer. ALSO NOTE: Pin Change Interrupts do not support the LOW state!
  • tinyBrd = NRF24L01 + ATtiny84

    2
    0 Votes
    2 Posts
    2k Views
    Tomasz PazioT
    cheap and ready to work.... would be nice if it plays with mysensors setup...
  • LED toys

    1
    0 Votes
    1 Posts
    833 Views
    No one has replied
  • Solar Panel Sun Tracker

    7
    0 Votes
    7 Posts
    3k Views
    AWIA
    @Moshe-Livne I'm using a similar calculation, was not very hard to code. A real tracker would be a challenge. Measuring where the sun really is... and checking the calculation. I tried to adjust a solar panel to the place of most light. I you don''t damp (integrate and compensate) the movement it goes in all directions when there are some clouds. Lots of fun though.
  • nRF24L01 + and 433MHz RF on the same Gateware

    7
    0 Votes
    7 Posts
    5k Views
    NeverDieN
    @jesper said: the 433 Mhz sensor can range where nRF24L01 can not. What do you mean by "range"? Regarding memory, a Due would have enough memory to do both.
  • I would like to graph my sensors output

    vera graph
    9
    0 Votes
    9 Posts
    5k Views
    NeverDieN
    I'm using the free version of plot.ly to do plotting from an arduino. Here's a real-time feed, where you can see the effect of last night's irrigation on my soil moisture sensor readings: https://plot.ly/~WhiteRabbit/997 It's very similar to Xively, but I like how I can easily pan and zoom the data. That's helpful as you get a bigger dataset, like this: https://plot.ly/~WhiteRabbit/869/ Plot.ly has demo arduino code on their website you can use as a starting point. Also, I have read how some people are using mysql to collect their data and graph it. I'd like to learn how to do that too, as I think it would be a good data archiving tool, and would provide additional ways to slice and dice the data. With these solutions, you don't need to be dependent on owning or using a Vera. I'd be interested to read about what other solutions people are using.
  • Help!!! Binary & Relay Compilation Not Working

    15
    0 Votes
    15 Posts
    4k Views
    BulldogLowellB
    @jeylites to turn relay off automatically after two minutes (and send the updated "off status" to controller... try something like this untested code: #include <MySensor.h> #include <SPI.h> #include <Bounce2.h> #define NUMBER_OF_REEDS 3 const int relayPin = 3; const int reedPin[NUMBER_OF_REEDS] = {4, 5, 6}; int reedState[NUMBER_OF_REEDS]; Bounce debouncer[NUMBER_OF_REEDS] = Bounce(); unsigned long relayTimer; MySensor gw; MyMessage msg[NUMBER_OF_REEDS]; MyMessage relayMessage(0,V_LIGHT); void setup() { gw.begin(incomingMessage, AUTO, true); gw.sendSketchInfo("Test", "1.0a"); gw.present(0, S_LIGHT); pinMode(relayPin, OUTPUT); digitalWrite(relayPin, gw.loadState(0)); for (int i = 0; i < NUMBER_OF_REEDS; i++) { debouncer[i].attach(reedPin[i]); debouncer[i].interval(5); pinMode(reedPin[i], INPUT_PULLUP); gw.present(i, S_DOOR); gw.wait(250); } } void loop() { gw.process(); for (int i = 0; i < NUMBER_OF_REEDS; i++) { debouncer[i].update(); int value = debouncer[i].read(); if (value != reedState[i]) { gw.send(msg[i+1].set(value), false); // device number mismatch here because of the array reedState[i] = value; Serial.print("updating state for switch: "); Serial.print(reedPin[i]); Serial.print(" state: "); Serial.println(reedState[i]); } } if (millis() - relayTimer > 2 * 60 * 1000UL && digitalRead(relayPin)) // two minute timer { digitalWrite(relayPin, LOW); gw.saveState(0, false); gw.send(relayMessage.set(false), true); } } void incomingMessage(const MyMessage &message) { if (message.type == V_LIGHT) { int newState = message.getBool(); digitalWrite(relayPin, newState); gw.saveState(0, newState); if (newState) { relayTimer = millis(); } Serial.print(F("Incoming change for relay, New state: ")); Serial.println(newState); } }
  • Spud Gun

    5
    6 Votes
    5 Posts
    2k Views
    tbowmoT
    @hek So that's what you have been so occupied with the last days? :) Looks fun though..
  • How would I interface with Protection 1 alarm sensors?

    9
    0 Votes
    9 Posts
    6k Views
    sowardS
    I agree with @sparkman, swapping that out for a semi-modern DSC will allow you to easily connect it to the VERA and use the existing sensors in scenes, as alerts/alarms, etc for not a whole lot of work or $, and maintain a traditional keypad/panel, especially if you sell the house one day. The DSC stuff is pretty well documented and easy to work with, and available cheaply on Ebay and other places. It can be a bit fiddly and you will probably need a WinXX box to program it ( though it can all be done via the keypad as well )
  • Total noob's question about building a PWM light controller

    arduino z-wave noob
    12
    0 Votes
    12 Posts
    5k Views
    J
    OK, it's beginning to become clear. My initial gadgets & gizmos should arrive today, so I'll start tinkering, and I'm sure more clarity will come. Thanks for the quick responses, and for your patience. This is so far the best HA forum I've found anywhere!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Charge battery while powering arduino

    3
    0 Votes
    3 Posts
    2k Views
    M
    Thank you. I will try this and report back.
  • Ethernet Gateway - How to get sensor data?

    1
    0 Votes
    1 Posts
    772 Views
    No one has replied
  • Sensor Location

    18
    0 Votes
    18 Posts
    7k Views
    Moshe LivneM
    @rickmontana83 have a look at http://zbar.sourceforge.net/ for example...
  • Adding DHT22 Module to a motion on nano

    @petewill
    2
    0 Votes
    2 Posts
    1k Views
    hekH
    You'll find plenty of multi sensors examples here on the forum.
  • Another famous and talented Ekblad!!!

    2
    1 Votes
    2 Posts
    1k Views
    hekH
    Well, do not share any genes with that guy. In fact, I'm a sport-analfabet. [image: 1435211652481-sports_cheat_sheet.png] https://xkcd.com/1107/
  • First project controling light-sensor and "smart" lightbulbs

    7
    0 Votes
    7 Posts
    4k Views
    AWIA
    @Cliff-Karlsson I is getting a little off-topic but the Ninja Spheres are open-source and should be able to act as a controller (i.e. gateway between Wifi/LAN and ZigBee. If you look for something out of the box than MySensors is probably not the way to go..
  • gw.send( ) and transmission errors

    12
    0 Votes
    12 Posts
    6k Views
    R
    Just my $0.02... Be careful with any while loops that could go on forever under "perfect storm" conditions. It's usually a safe bet that eventually your device will get into a state where comms will fail forever. If you're stuck in a while loop waiting for a successful send then you have no chance to detect or correct the error, and given how tricky it is to debug Arduinos you'll probably never figure out what went wrong. The device will just go silent, and a little while later the batteries will run out (because it's sitting there trying to send over and over). Do yourself a favor and put a fail-safe && retries++ < MAX_RETRIES clause on your while loop. This doesn't speak directly to your case, but in a broad sense my assumption going in to any wireless design is that packets will be dropped, so I always design with that constraint in mind, rather than trying to design a system where no drops occur. For example, you might consider adding a "resync" timer that sends the current state regardless of changes every so often. So even if something is dropped you have a bounded amount of time where things are in the wrong state. I do this with my presentations: Every 5 minutes my sensors retransmit all presentation messages just in case the controller missed the first set, or the controller reset, or whatever... Handling lossy comms is not usually too hard if you aren't trying to back-engineer that into a system that was designed with the assumption that messages would always succeed. Incidentally, this is more or less the same as "UDP" vs "TCP" networking, if you've ever worked in that realm. So strategies would overlap pretty nicely.

13

Online

11.7k

Users

11.2k

Topics

113.0k

Posts