[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Follow the advice I provided above in the following post

Except, when the code detects that the ultrasonic sensor has detected someone, simply send the following

smartthing.send(“button1 pushed”);

No child device will be created. Only the ST_Anything Parent Ethernet device will exist. Each time your Arduino sketch senses someone, it will send “button1 pushed” to SmartThings. You can then use whatever SmartApp you’d like (e.g. webCoRE) to implement your logic regarding time of day, etc… The issue with this design, though, is that triggering the real doorbell will then be cloud dependent. ESP8266 boards and Arduinos do not have a realtime clock onboard, and thus they really don’t know the time of day. Thus, that logic usually exists in the cloud.

1 Like

Hi @ogiewon
Following on from my alarm project last week you helped me with which now works great.
I’ve now been talking to someone who uses a esp board to connect to basically the same alarm but he uses Domoticz but he also has a small relay that’s connected between the alarm and Esp board that he can turn on and off with a IP command.
Is that ability in any of your sketches ,so say I have a dummy presence sensor that trips the relay back and forth.
Thanks


Edit:
I’ve just searched the thread and found all your previous comments showing I can do this so cheers.
Is there a specific pin I should use for a digital output on a NodeMcu board.?

Looks in the ST_Anything ReadMe file, toward the end. There is a chart with ESP8266 pins explained.

1 Like

Regarding the relay for the siren, any recommendations? I bought an ELK 100 siren driver because my existing wired speaker didn’t have a driver (was part of ADT panel). Using existing universal transformer that came with the alarm panel, it is 16.5 VAC output I verified that it operates the siren driver. Would something like this work: https://www.amazon.com/Youngneer-Raspberry-Arduino-Channel-Opto-Isolated/dp/B07M88JRFY/ref=sr_1_8?dchild=1&keywords=16vac+relay+8266&qid=1592412831&s=industrial&sr=1-8

I never replied to say THANKS! Got it all working. Now you’ve got my brain thinking of the many things that can be done with this little WiFi device.

1 Like

Hi @ogiewon is it just the serial monitor you use to monitor the inputs and outputs from each pin ?
I’m experiencing some delay within SmartThings and wondering wether there’s a local IP I can look at outside of SmartThings to see the live data ?
Thanks

@Steveuk23 if a faster response is what you are interested in, I would suggest looking at migrating to Hubitat. It is local and not cloud based like ST. I have both currently, but helped a buddy implement a Hubitat over this last month and it is very quick on response and currently uses an Arduino Mega with @ogiewon code inside. He is very happy with the speed and reliability.

I imagine you might hear the same from others and even @ogiewon as he is the one that pointed out this difference to me earlier.

1 Like

Thanks yeah I’ve looked at buying one of them before but seemed a bit pricey and I’m not the best at doing coding so thought SmartThings would suit me more.
Oh and the lack of a Android app (last time I looked) put me off.

If things a appearing sluggish, I’d recommend rebooting the ST hub as that seems to speed things up for users. Must be a change in a recent firmware update to the hub.

The Arduino IDE Serial Monitor window is the only way to debug the system.

We have just launched custom capabilities that will allow your commands/attributes to work in the new app.

Check it out:

2 Likes

There is an Android app and native dashboard generation

Looks like most ST DTH/SmartAPP are being ported or already ported over.

Biggest problem I see with Hubitat now is availability of hub. Production is slowed from Covid

Yeah it’s definitely a issue with SmartThings.
I hooked it up to the serial monitor and the events happened nearly instantly there was 1 or 2 times it took 6 seconds.
But when looking at SmartThings at the same time it was taking over 30 seconds to change sometimes.
Guess the new firmware is doing something as I’ve rebooted and it’s still the same.
Does all your St anything work similar on Hubitat?
I’m just used to creating smartapps and stuff so wasn’t sure I’d be able to do it on that platform.

Yes. The Arduino sketch simply needs two lines edited… The IP Address of the HUB, and the PORT of the hub. Setting up the Groovy code on the hub is a little different. There is no direct GitHub integration. So it takes a little time to get the Drivers installed. All setup and configuration is done via a web browser, versus an app on your phone. While there are native iOS and Android Hubitat apps for your phone, I really don’t use them. They can be used for Mobile Presence (I use Life360 as it is more reliable), Push Notifications (I use Pushover as it has more features), and for displaying Hubitat Dashboards (which I do use.)

If remote control of your devices via a mobile phone app is your number 1 priority, Hubitat may not be ideal for you. If a fully automated home, where you don’t need to use the mobile app, is what you’re after…then Hubitat ‘might’ be for you. For me, having all of my code run locally is a very high priority. Thus, I really like Hubitat.

If you have more questions, please take them over to the Hubitat Community so we can keep this thread on topic.

1 Like

Not sure if this is the best place to ask this but…

I had to get an ELK - 101 siren driver for existing speaker from alarm system. If I hook up Yelp + Neg to 16v and Neg respectively on my power adapter and the LOW and SPEAKER leads on the siren to the speaker it runs.

I’m trying to interface a relay to D0 defined as the alarm pin in ST_Anything_AlarmPanel_ESP8266WiFi sketch. The relay I bought (https://www.amazon.com/gp/product/B07M88JRFY/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1) has DC+, DC-, IN on one side and NO, COM, and NC on the other. Also has a high/low jumper set to high.

I have D0 to IN. I tried to hook DC+ to 3V and DC- to GND on 8266 but it doesn’t light the power led on the relay. I am powering 8266 with a 5V wall adapter to USB port. If I hook up DC+ and DC- to the respective posts on the 16v adapter the power light comes on.

From here, I’m lost. I’m currently splitting the DC post on 16v adapter to both DC+ on the relay and Yelp on the siren driver. I have neg on adapter split to DC- on relay and to COM on relay. Then I have Neg on siren driver to the NO on relay. I trigger alert and nothing happens. There is a relay status light that does nothing when it’s supposed to be triggered. The blue light on the Arduino shuts off when triggered. If I hook Neg into NC, the siren alerts with no action from ST.

Where do I go from here?

Thanks in advance.

EDIT:
I tested with a 5V adapter I had that I split apart and ran into DC+ and DC-. When I jump the DC+ to the IN on the relay it switches so I’m assuming D0 isn’t sending enough power. I think I need to power the 8266 via 5V adapter and this will solve my power to the relay issue. I’ve read not to use the USB power for 5V but I assumed that meant just if hooked up to a computer, not if using a 5V adapter. Can anyone confirm? I will update once I do further testing.

EDIT 2 - The solution:
So chalk this up to being unfamiliar with the 8266. Hooked up relay from Vin on 8266 to DC+ and GND to DC-. Got power to the relay. Hooked up Yelp on siren driver to NO and 16v adapter DC- to Common on relay. Then hooked up Neg on siren driver to Neg on 16v adapter. All is working now.

So…why is it labeled Vin on the 8266 if it’s, in fact, sending voltage? I was using the 3V pins before which is why it didn’t work.

1 Like

Hi Dan, sorry but i cant seem to get a child to create. In my ST IDE i have the Child Voltage Sensor DH, and all the other ogiewon* DH’s as well as ’ [ogiewon : On/Off Ethernet]’ . I upload this sketch to the 8266 after configuring the IP’s etc just to try it out, added the ‘smartthing.send(“voltage1 12.34”);’ , the device appears in ST’s when i upload it as a parent. If i say there is 1 button it turns the onboard LED on and OFF, but no Child devices are created. I can see the send you recommended in the logs but cant get at them as no child is created? i am definitely missing something? thanks

The On/Off sketch and associated DTH are a matched set. Just like the ST_Anything… sketches and DTHs are a matched set.

I suggested using the On/Off sketch with modifications to comply with the ST_Anything text communications protocol. This would allow you to use the ST_Anything Parent Ethernet driver, and thus be able to utilize the child devices.

The on/off sketch shows how to implement the SmartThings… communications library in a sketch. I am assuming you’re familiar with Arduino programming? If not, this is going to be a bit of a learning curve. Hopefully you’re a C/C++ programmer? :wink:

Hi @ogiewon do you see any issues on this sketch?
I’ve used it before fine but opened it again to add a switch but when it creates the child devices its only creating Contact1 and Switch1 but no Contact2 at first it did pop up with the child device creation failed message.
So after searching I deleted the parent device and re added but the same again.
I watched the live logging and didn’t spot any errors
Thanks

[f84e81e5-7269-47b8-addc-e9704e9f016b](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#f84e81e5-7269-47b8-addc-e9704e9f016b) 19:12:59: error Resync failed, code=429

[f84e81e5-7269-47b8-addc-e9704e9f016b](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#f84e81e5-7269-47b8-addc-e9704e9f016b) 19:12:59: debug Update detected: DeviceCreated 12a1c334-b343-4657-94c5-5c8558b6d303

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:59: debug 382B78038989-contact1 - name: contact, value: open

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:59: trace createChildDevice: Creating Child Device 'ACED (contact1)'

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:59: debug isChild = true, but no child found - Auto Add it!

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:59: debug Parsing: contact1 open

[12a1c334-b343-4657-94c5-5c8558b6d303](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#12a1c334-b343-4657-94c5-5c8558b6d303) 19:12:59: debug parse(contact open) called

[f84e81e5-7269-47b8-addc-e9704e9f016b](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#f84e81e5-7269-47b8-addc-e9704e9f016b) 19:12:59: debug Update detected: DeviceCreated 3e514dbe-e528-4822-a50f-9478a2a20df7

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:59: debug 382B78038989-switch1 - name: switch, value: off

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:58: trace createChildDevice: Creating Child Device 'ACED (switch1)'

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:58: debug isChild = true, but no child found - Auto Add it!

[acf758d7-28cf-4544-bbcc-78eb1f6016ad](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#acf758d7-28cf-4544-bbcc-78eb1f6016ad) 19:12:58: debug Parsing: switch1 off

[3e514dbe-e528-4822-a50f-9478a2a20df7](https://graph-eu01-euwest1.api.smartthings.com/ide/logs#3e514dbe-e528-4822-a50f-9478a2a20df7) 19:12:59: debug parse(switch off) called

this is the sketch code…

//******************************************************************************************
//  File: ST_Anything_Multiples_ESP8266WiFi.ino
//  Authors: Dan G Ogorchock & Daniel J Ogorchock (Father and Son)
//
//  Summary:  This Arduino Sketch, along with the ST_Anything library and the revised SmartThings 
//            library, demonstrates the ability of one NodeMCU ESP8266 to 
//            implement a multi input/output custom device for integration into SmartThings.
//            The ST_Anything library takes care of all of the work to schedule device updates
//            as well as all communications with the NodeMCU ESP8266's WiFi.
//
//            ST_Anything_Multiples implements the following ST Capabilities as a demo of what is possible with a single NodeMCU ESP8266
//              - 1 x Alarm device (using a simple digital output)
//              - 1 x Contact Sensor devices (used to monitor magnetic door sensors)
//              - 1 x Switch devices (used to turn on a digital output (e.g. LED, relay, etc...)
//              - 1 x Motion devices (used to detect motion)
//              - 1 x Smoke Detector devices (using simple digital input)
//              - 1 x Temperature Measurement devices (Temperature from Dallas Semi 1-Wire DS18B20 device)
//              - 1 x Relay Switch devices (used to turn on a digital output for a set number of cycles And On/Off times (e.g.relay, etc...))
//              - 2 x Button devices (sends "pushed" if held for less than 1 second, else sends "held"
//              - 1 x Water Sensor devices (using the 1 analog input pin to measure voltage from a water detector board)
//    
//  Change History:
//
//    Date        Who            What
//    ----        ---            ----
//    2015-01-03  Dan & Daniel   Original Creation
//    2017-02-12  Dan Ogorchock  Revised to use the new SMartThings v2.0 library
//    2017-04-17  Dan Ogorchock  New example showing use of Multiple device of same ST Capability
//                               used with new Parent/Child Device Handlers (i.e. Composite DH)
//    2017-05-25  Dan Ogorchock  Revised example sketch, taking into account limitations of NodeMCU GPIO pins
//    2018-02-09  Dan Ogorchock  Added support for Hubitat Elevation Hub
//
//******************************************************************************************
//******************************************************************************************
// SmartThings Library for ESP8266WiFi
//******************************************************************************************
#include <SmartThingsESP8266WiFi.h>

//******************************************************************************************
// ST_Anything Library 
//******************************************************************************************
#include <Constants.h>       //Constants.h is designed to be modified by the end user to adjust behavior of the ST_Anything library
#include <Device.h>          //Generic Device Class, inherited by Sensor and Executor classes
#include <Sensor.h>          //Generic Sensor Class, typically provides data to ST Cloud (e.g. Temperature, Motion, etc...)
#include <Executor.h>        //Generic Executor Class, typically receives data from ST Cloud (e.g. Switch)
#include <InterruptSensor.h> //Generic Interrupt "Sensor" Class, waits for change of state on digital input 
#include <PollingSensor.h>   //Generic Polling "Sensor" Class, polls Arduino pins periodically
#include <Everything.h>      //Master Brain of ST_Anything library that ties everything together and performs ST Shield communications

#include <PS_Illuminance.h>  //Implements a Polling Sensor (PS) to measure light levels via a photo resistor

#include <PS_TemperatureHumidity.h>  //Implements a Polling Sensor (PS) to measure Temperature and Humidity via DHT library
#include <PS_DS18B20_Temperature.h>  //Implements a Polling Sesnor (PS) to measure Temperature via DS18B20 libraries 
#include <PS_Water.h>        //Implements a Polling Sensor (PS) to measure presence of water (i.e. leak detector)
#include <IS_Motion.h>       //Implements an Interrupt Sensor (IS) to detect motion via a PIR sensor
#include <IS_Contact.h>      //Implements an Interrupt Sensor (IS) to monitor the status of a digital input pin
#include <IS_Smoke.h>        //Implements an Interrupt Sensor (IS) to monitor the status of a digital input pin
#include <IS_DoorControl.h>  //Implements an Interrupt Sensor (IS) and Executor to monitor the status of a digital input pin and control a digital output pin
#include <IS_Button.h>       //Implements an Interrupt Sensor (IS) to monitor the status of a digital input pin for button presses
#include <EX_Switch.h>       //Implements an Executor (EX) via a digital output to a relay
#include <EX_Alarm.h>        //Implements Executor (EX)as an Alarm Siren capability via a digital output to a relay
#include <S_TimedRelay.h>    //Implements a Sensor to control a digital output pin with timing capabilities

//*************************************************************************************************
//NodeMCU v1.0 ESP8266-12e Pin Definitions (makes it much easier as these match the board markings)
//*************************************************************************************************
//#define LED_BUILTIN 16
//#define BUILTIN_LED 16
//
//#define D0 16  //no internal pullup resistor
//#define D1  5
//#define D2  4
//#define D3  0  //must not be pulled low during power on/reset, toggles value during boot
//#define D4  2  //must not be pulled low during power on/reset, toggles value during boot
//#define D5 14
//#define D6 12
//#define D7 13
//#define D8 15  //must not be pulled high during power on/reset

//******************************************************************************************
//Define which Arduino Pins will be used for each device
//******************************************************************************************
//#define PIN_WATER_1               A0  //NodeMCU ESP8266 only has one Analog Input Pin 'A0'
//
//#define PIN_ALARM_1               D0  //SmartThings Capabilty "Alarm"
//#define PIN_BUTTON_1              D8  //SmartThings Capabilty Button / Holdable Button (Normally Open!)
//#define PIN_MOTION_1              D3  //SmartThings Capabilty "Motion Sensor" (HC-SR501 PIR Sensor)
//#define PIN_BUTTON_2              D4  //SmartThings Capabilty Button / Holdable Button (Normally Open!)
#define PIN_SWITCH_1              D5  //SmartThings Capability "Switch"
//#define PIN_SMOKE_1               D1  //SmartThings Capabilty "Smoke Detector"
//#define PIN_TEMPERATURE_1         D7  //SmartThings Capabilty "Temperature Measurement" (Dallas Semiconductor DS18B20)
//#define PIN_TIMEDRELAY_1          D3  //SmartThings Capability "Relay Switch"
#define PIN_CONTACT_1             D6  //SmartThings Capabilty "Contact Sensor"
#define PIN_CONTACT_2             D2  //SmartThings Capabilty "Contact Sensor"


//******************************************************************************************
//ESP8266 WiFi Information
//******************************************************************************************
String str_ssid     = "XXXX";                           //  <---You must edit this line!
String str_password = "XXXX";                   //  <---You must edit this line!
IPAddress ip(192, 168, 0, 79);       //Device IP Address       //  <---You must edit this line!
IPAddress gateway(192, 168, 0, 1);    //Router gateway          //  <---You must edit this line!
IPAddress subnet(255, 255, 255, 0);   //LAN subnet mask         //  <---You must edit this line!
IPAddress dnsserver(90, 207, 238, 97);  //DNS server              //  <---You must edit this line!
const unsigned int serverPort = 8090; // port to run the http server on

// Smartthings / Hubitat Hub TCP/IP Address
IPAddress hubIp(192, 168, 0, 78);    // smartthings/hubitat hub ip //  <---You must edit this line!

// SmartThings / Hubitat Hub TCP/IP Address: UNCOMMENT line that corresponds to your hub, COMMENT the other
const unsigned int hubPort = 39500;   // smartthings hub port (default)
//const unsigned int hubPort = 39501;   // hubitat hub port

//******************************************************************************************
//st::Everything::callOnMsgSend() optional callback routine.  This is a sniffer to monitor 
//    data being sent to ST.  This allows a user to act on data changes locally within the 
//    Arduino sktech.
//******************************************************************************************
void callback(const String &msg)
{
//  Serial.print(F("ST_Anything Callback: Sniffed data = "));
//  Serial.println(msg);
  
  //TODO:  Add local logic here to take action when a device's value/state is changed
  
  //Masquerade as the ThingShield to send data to the Arduino, as if from the ST Cloud (uncomment and edit following line)
  //st::receiveSmartString("Put your command here!");  //use same strings that the Device Handler would send
}

//******************************************************************************************
//Arduino Setup() routine
//******************************************************************************************
void setup()
{
  //******************************************************************************************
  //Declare each Device that is attached to the Arduino
  //  Notes: - For each device, there is typically a corresponding "tile" defined in your 
  //           SmartThings Device Hanlder Groovy code, except when using new COMPOSITE Device Handler
  //         - For details on each device's constructor arguments below, please refer to the 
  //           corresponding header (.h) and program (.cpp) files.
  //         - The name assigned to each device (1st argument below) must match the Groovy
  //           Device Handler names.  (Note: "temphumid" below is the exception to this rule
  //           as the DHT sensors produce both "temperature" and "humidity".  Data from that
  //           particular sensor is sent to the ST Hub in two separate updates, one for 
  //           "temperature" and one for "humidity")
  //         - The new Composite Device Handler is comprised of a Parent DH and various Child
  //           DH's.  The names used below MUST not be changed for the Automatic Creation of
  //           child devices to work properly.  Simply increment the number by +1 for each duplicate
  //           device (e.g. contact1, contact2, contact3, etc...)  You can rename the Child Devices
  //           to match your specific use case in the ST Phone Application.
  //******************************************************************************************
  //Polling Sensors
//  static st::PS_Water               sensor1(F("water1"), 60, 20, PIN_WATER_1, 200);
//  static st::PS_DS18B20_Temperature sensor2(F("temperature2"), 15, 0, PIN_TEMPERATURE_1, false, 10, 1); 
//  static st::PS_TemperatureHumidity sensor9(F("temphumid1"), 60, 40, PIN_TEMPERATUREHUMIDITY_1, st::PS_TemperatureHumidity::DHT21,"temperature1","humidity1");
//  static st::PS_TemperatureHumidity sensor10(F("temphumid2"), 60, 40, PIN_TEMPERATUREHUMIDITY_2, st::PS_TemperatureHumidity::DHT21,"temperature2","humidity2");
  
  //Interrupt Sensors 
  static st::IS_Contact             sensor1(F("contact1"), PIN_CONTACT_1, LOW, true);
  static st::IS_Contact             sensor2(F("contact1"), PIN_CONTACT_2, LOW, true);
//  static st::IS_Button              sensor4(F("button1"), PIN_BUTTON_1, 1000, LOW, true, 500);
//  static st::IS_Button              sensor5(F("button2"), PIN_BUTTON_2, 1000, LOW, true, 500);
//  static st::IS_Motion              sensor6(F("motion1"), PIN_MOTION_1, HIGH, false);
//  static st::IS_Smoke               sensor7(F("smoke1"), PIN_SMOKE_1, HIGH, true, 500);
//
  //Special sensors/executors (uses portions of both polling and executor classes)
  //static st::S_TimedRelay           sensor8(F("relaySwitch1"), PIN_TIMEDRELAY_1, LOW, false, 3000, 0, 1);
  
  //Executors
//  static st::EX_Alarm executor1(F("alarm1"), PIN_ALARM_1, LOW, true);
  static st::EX_Switch executor2(F("switch1"), PIN_SWITCH_1, LOW, true);  //Inverted logic for "Active Low" Relay Board
  
  //*****************************************************************************
  //  Configure debug print output from each main class 
  //  -Note: Set these to "false" if using Hardware Serial on pins 0 & 1
  //         to prevent communication conflicts with the ST Shield communications
  //*****************************************************************************
  st::Everything::debug=true;
  st::Executor::debug=true;
  st::Device::debug=true;
  st::PollingSensor::debug=true;
  st::InterruptSensor::debug=true;

  //*****************************************************************************
  //Initialize the "Everything" Class
  //*****************************************************************************

  //Initialize the optional local callback routine (safe to comment out if not desired)
  st::Everything::callOnMsgSend = callback;
  
  //Create the SmartThings ESP8266WiFi Communications Object
    //STATIC IP Assignment - Recommended
    st::Everything::SmartThing = new st::SmartThingsESP8266WiFi(str_ssid, str_password, ip, gateway, subnet, dnsserver, serverPort, hubIp, hubPort, st::receiveSmartString);
 
    //DHCP IP Assigment - Must set your router's DHCP server to provice a static IP address for this device's MAC address
    //st::Everything::SmartThing = new st::SmartThingsESP8266WiFi(str_ssid, str_password, serverPort, hubIp, hubPort, st::receiveSmartString);

  //Run the Everything class' init() routine which establishes WiFi communications with SmartThings Hub
  st::Everything::init();
  
  //*****************************************************************************
  //Add each sensor to the "Everything" Class
  //*****************************************************************************
  st::Everything::addSensor(&sensor1);
  st::Everything::addSensor(&sensor2);
//  st::Everything::addSensor(&sensor3);
//  st::Everything::addSensor(&sensor4); 
//  st::Everything::addSensor(&sensor5); 
//  st::Everything::addSensor(&sensor6); 
//  st::Everything::addSensor(&sensor7);  
//  st::Everything::addSensor(&sensor8);  
//  st::Everything::addSensor(&sensor9);
//  st::Everything::addSensor(&sensor10);  
      
  //*****************************************************************************
  //Add each executor to the "Everything" Class
  //*****************************************************************************
//  st::Everything::addExecutor(&executor1);
  st::Everything::addExecutor(&executor2);
    
  //*****************************************************************************
  //Initialize each of the devices which were added to the Everything Class
  //*****************************************************************************
  st::Everything::initDevices();
  
}

//******************************************************************************************
//Arduino Loop() routine
//******************************************************************************************
void loop()
{
  //*****************************************************************************
  //Execute the Everything run method which takes care of "Everything"
  //*****************************************************************************
  st::Everything::run();
}

in your arduino code:

//Interrupt Sensors
static st::IS_Contact sensor1(F(“contact1”), PIN_CONTACT_1, LOW, true);
static st::IS_Contact sensor2(F(“contact1”), PIN_CONTACT_2, LOW, true);

should be

//Interrupt Sensors
static st::IS_Contact sensor1(F(“contact1”), PIN_CONTACT_1, LOW, true);
static st::IS_Contact sensor2(F(“contact2”), PIN_CONTACT_2, LOW, true);

looks like copy/paste error

1 Like

Oh god yeah :joy:
You know how many times I looked through that as well
Thanks

1 Like

I have done the same as well. Setup a buddies house with 22 window/door contact sensors. All to be remotely installed due to Covid so Arduino code had to be right.

1 Like