Author Topic: Switchmote kit contents  (Read 1147 times)

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Switchmote kit contents
« on: May 16, 2017, 11:28:01 AM »
Felix,

Just starting to assemble switchmote (2X10) and I don't have any 470ohm resistors.  I instead have 4.7k (yellow-violet-red) instead.  Can you please verify what I'm suppose to use and possibly what's in your kits.

Thanks 

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: Switchmote kit contents
« Reply #1 on: May 16, 2017, 01:36:06 PM »
Oh no it must have been packed wrong, it's supposed to be 470 ohm. Sorry about that.
You could use anything between 220-680 or even 1K (the green LEDs might be a bit dimmer at 1K).
If you don't have any available I can send you the 470ohm, let me know...

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: Switchmote kit contents
« Reply #2 on: May 16, 2017, 05:47:11 PM »
Thanks for the response.  Unfortunately I don't have any 470k resistors.  I'm planning on going out of town in a couple days so all I'm going to assemble now is the SwitchMote PSU to control some lights from my panel.  I will assemble the front panel PCB when I return. 

I possibly will need a few other items so maybe we can work something out like split the shipping instead of just shipping me 3 resistors..

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: Switchmote kit contents
« Reply #3 on: May 17, 2017, 07:51:33 AM »
So, the PSU is all assembled, and appears to be working, but does not show up on the UI when D4, D5, or D6 is grounded.

The only thing I added to the partial sketch (latest from Github) below was #include <WirelessHEX69.h> because it wouldn't compile;

Code: [Select]
*************************************************************************************************************
// SwitchMote sample sketch
// *************************************************************************************************************
// Handles the single 5A relay SwitchMote, as well as the dual 10A relay SwitchMote2x10A
// https://lowpowerlab.com/switchmote
// SwitchMote is a highly integrated wireless AC switch controller based on Moteino, the wirelessly programmable Arduino
// *************************************************************************************************************
// This sketch will provide the essential features of SwitchMote:
//   - wireless programming
//   - accept ON/OFF commands from a Moteino gateway (format is BTNx:y commands where x={0,1,2}, y={0,1})
//   - control the relay(s) to turn the AC load ON/OFF
//   - control up to 6 LEDs and 3 buttons on front panel
//   - SYNC feature allows out of box synchronization with other SwitchMotes
//     ie - when a button is pressed on this SwitchMote it can trigger the press of a button on another SwitchMote
//     so you can use a SwitchMote button to control a light/set of lights from remote locations
//     this sketch allows up to 5 SYNCs but could be extended
// This sketch may be extended to include integration with other LowPowerLab automation products, for instance to
//    control the GarageMote from a button on the SwitchMote, etc.
// *************************************************************************************************************
// Copyright Felix Rusu 2016, http://www.LowPowerLab.com/contact
// **********************************************************************************
// License
// **********************************************************************************
// This program is free software; you can redistribute it
// and/or modify it under the terms of the GNU General   
// Public License as published by the Free Software       
// Foundation; either version 3 of the License, or       
// (at your option) any later version.                   
//                                                       
// This program is distributed in the hope that it will   
// be useful, but WITHOUT ANY WARRANTY; without even the 
// implied warranty of MERCHANTABILITY or FITNESS FOR A   
// PARTICULAR PURPOSE. See the GNU General Public       
// License for more details.                             
//                                                       
// Licence can be viewed at                               
// http://www.gnu.org/licenses/gpl-3.0.txt
//
// Please maintain this license information along with authorship
// and copyright notices in any redistribution of this code
// **********************************************************************************
#include <EEPROMex.h>      //get it here: http://playground.arduino.cc/Code/EEPROMex
#include <RFM69.h>         //get it here: http://github.com/lowpowerlab/rfm69
#include <RFM69_ATC.h>     //get it here: https://github.com/lowpowerlab/rfm69
#include <RFM69_OTA.h>     //get it here: https://github.com/LowPowerLab/rfm69
#include <SPIFlash.h>      //get it here: http://github.com/lowpowerlab/spiflash
#include <WirelessHEX69.h>
#include <SPI.h>           //comes with Arduino
// **********************************************************************************
//Auto Transmission Control - dials down transmit power to save battery (-100 is the noise floor, -90 is still pretty good)
//For indoor nodes that are pretty static and at pretty stable temperatures (like a MotionMote) -90dBm is quite safe
//For more variable nodes that can expect to move or experience larger temp drifts a lower margin like -70 to -80 would probably be better
//Always test your ATC mote in the edge cases in your own environment to ensure ATC will perform as you expect
#define ENABLE_ATC         //comment out this line to disable AUTO TRANSMISSION CONTROL
#define ATC_RSSI          -75
// **********************************************************************************
#define GATEWAYID           1  //assumed 1 in general
#define LED_RM             15  //digital pin for MIDDLE RED LED
#define LED_GM             18  //digital pin for MIDDLE GREEN LED
#define LED_RT             16  //digital pin for TOP RED LED
#define LED_GT             19  //digital pin for TOP GREEN LED
#define LED_RB             14  //digital pin for BOTTOM RED LED
#define LED_GB             17  //digital pin for BOTTOM GREEN LE

#define RELAY1              7  //digital pin connected to MAIN relay
#define RELAY2              3  //digital pin connected to secondary relay (SwitchMote 2x10A only)
#define RELAY1_INDEX        1  //index in btn[] array which is associated with the MAIN relay
#define RELAY2_INDEX        0  //index in btn[] array which is associated with the secondary relay (SwitchMote 2x10A only)

#define BTNCOUNT            3  //1 or 3 (2 also possible)
#define BTNM                5  //digital pin of middle button
#define BTNT                6  //digital pin of top button
#define BTNB                4  //digital pin of bottom button

#define BUTTON_BOUNCE_MS  200  //timespan before another button change can occur
#define SYNC_ENTER       3000  //time required to hold a button before SwitchMote enters [SYNC mode]
#define SYNC_TIME       20000  //max time spent in SYNC mode before returning to normal operation (you got this much time to SYNC 2 SMs, increase if need more time to walk)
#define SYNC_MAX_COUNT     10  //max number of SYNC entries (increase for more interactions)
#define SYNC_EEPROM_ADDR   64  //SYNC_TO and SYNC_INFO data starts at this EEPROM address
#define ERASE_HOLD       6000  //time required to hold a button before SYNC data is erased
#define MOTION_TIME_ON  60000  //time to hold a button/output HIGH after a motion triggered command




Here is the config parameters along with ACK's of me grounding D4, D5, and D6;



Any suggestions would be appreciated

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: Switchmote kit contents
« Reply #4 on: May 17, 2017, 08:49:06 AM »
Make sure you have the latest library and sketch. WirelessHEX69 is not used anymore, instead RFM69_OTA is used.

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: Switchmote kit contents
« Reply #5 on: May 17, 2017, 11:22:47 AM »
Felix,

Ok, I downloaded the library again and I still don't get anything come up on the UI when I ground D4 or D5.  Does it matter that I still have it connected to the programmer when testing it?



Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: Switchmote kit contents
« Reply #6 on: May 17, 2017, 11:27:35 AM »
I still don't get anything come up on the UI when I ground D4 or D5.  Does it matter that I still have it connected to the programmer when testing it?
Does not matter if connected to programmer.
You mean on the Gateway UI?
Do you have a Moteino with HW radio on the SM?
Your receiver matches all the settings and the IS_RFM69HW is set correctly?

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: Switchmote kit contents
« Reply #7 on: May 17, 2017, 11:29:17 AM »
Yes, I have the HW on the SM

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6370
  • Country: us
    • LowPowerLab
Re: Switchmote kit contents
« Reply #8 on: May 17, 2017, 11:42:23 AM »
1. What sketch is on your gateway Moteino? Should be this one.
2. Look in your gateway.sys.log to see if the gateway Moteino is receiving the messages. If not something is mismatched somewhere.

sparky

  • Sr. Member
  • ****
  • Posts: 293
  • Country: us
Re: Switchmote kit contents
« Reply #9 on: May 17, 2017, 12:40:40 PM »
Felix,

Loaded new sketch on Gateway as suggested, still nothing  :(

Looked thru gateway.sys.log, gateway.db, and gateway_nonmatches.db to check for mismatches or errors as suggested, not even a mention of node 5   :-\

Then it hit me like a ton of bricks.. (took almost 2 days) I remembered the network ID that I entered for node 5 was incorrect  :o

Works great!

Thanks for all your time Felix   8)