Eventor not working for me

Hi. I set up an Arduino Uno with some sensors and relays for control lights and check temp of a fishtank. I control two types of light with buttons in the app, wich are assigned to digital pins. The buttons work well, I set up Eventor with time rules, for turn on and off the relays but nothing happend (the notification of the event not working too) Here are a screenshot of the app and the Eventor rules:

https://drive.google.com/open?id=1FtNs8XtjXf05L2BR1rNwU7SufCecmESH
https://drive.google.com/open?id=1SMbiJS2PUZI-vD9KCPPD_3m8mW42njXF

and here is the code:


#define BLYNK_PRINT Serial  // Comment this out to disable prints and save space
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <SimpleTimer.h>
#include <SPI.h>
#include <DHT.h>        
#define ONE_WIRE_BUS 6    //Data wire plugged to pin GPIO2 (DS18B20 sensor)
#define DHTPIN 7       //Data wire plugged to pin GPIO12(DHT22 sensor)
#define DHTTYPE DHT22     //DHT 22 Change this if you have a DHT11
DHT dht(DHTPIN, DHTTYPE);

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
char auth[] = "Authtoken"; //Put your Auth Token in the Blynk App here

SimpleTimer timer;

void setup()
{
 Serial.begin(9600);
 Blynk.begin(auth);
 sensors.begin();
 sensors.setResolution(10);   //More on resolution: http://www.homautomation.org/2015/11/17/ds18b20-how-to-change-resolution-9101112-bits/
 timer.setInterval(3000, readTemp);   //Data reading interval
}

void readTemp()
{
 sensors.requestTemperatures();
 float floatTempC = sensors.getTempCByIndex(0); //Stores temperature. Change to getTempFByIndex(0) for F.
 char t_buffer[15];
 dtostrf(floatTempC, 8, 9, t_buffer);
 float h = dht.readHumidity();
 float t = dht.readTemperature();
 Blynk.virtualWrite(0, t_buffer); //DS18B20 temperature virtual pin
 Blynk.virtualWrite(2, t);     //DHT22 temperature virtual pin
 Blynk.virtualWrite(1, h);     //DHT22 humidity virtual pin
}
void loop()
{
 Blynk.run();
 timer.run();
}

Any suggestion? Thank you!

There is no code that turns on/off D8 or D9?!

Hello. Do you have notifications widget in your app? Is there any chance your hardware was offline at the moment of events? If so you need to SYNC - http://docs.blynk.cc/#blynk-main-operations-state-syncing-for-hardware

No, but pressing the buttons in the phone app works great, the relays turn on or off immediatly. Must say im very newbie in Arduino and programming

Yes, as you can see in this screenshot, i have the notifications widget. The internet conection was working ok, and Arduino was online.
Thank you for your time

I dont know if i have to put some code in the sketch in order to eventor works

Hello, i found the “problem”. When i set the buttons, i invert the 0 and the 1 (on and off) in the settings of the widget. So in the Eventor, i must put “turn ON D8” rule to turn OFF D8, is inverted!
Thank you guys for your time!

1 Like