Hi guys from Italy. I live in one of the most interested areas by the Virus and I can say that the situation is very bad. I read some of you refer to older people as the main group touched by the virus. That's obviously true but our doctors start to say that the last days people around 50 years old are now increasing in the intensive care units. So, since you all have more time than us, please stay at home and avoid any possible contact with others because this virus is very aggressive. Take care!
![](/assets/uploads/profile/2555-profileavatar.jpeg)
giangired
@giangired
Best posts made by giangired
-
RE: Coronavirus (way, way, off topic)
-
RE: Arduino Pro Mini and Mini W5100 LAN Ethernet Shield
@mfalkvidd Solved, it was my mistake on wiring. Thanks.
Latest posts made by giangired
-
RE: How to get the bad status (red) for Temperature Node
Thanks everyone for the answers. However what I would like to do is create a routine with Dzvents that when I have the "red" indication (as shown in the image) causes a switch to operate which cuts the voltage to a device. The value of ".lastUpdate.minutesAgo" seems not to be the right solution because it continues to be increased in any case, regardless of the temperature value and the status of the "red" or normal indication.
-
How to get the bad status (red) for Temperature Node
Hi to all.
I need to act in case of my temperature node is not updating the value since time. Practically when the screen shows a "red line" on the upper left side (see below picture), I need to get the bad status and provide an action. I searched on forum with no success. I tried to use ".lastUpdate.minutesAgo" but it seems not to be the right way.
May someone help me to finde the right parameter to check? -
RE: Sometimes DomoticZ doesn't receive data from nodes
Found the solution. I used
asm volatile (" jmp 0 "); // reset
to reboot the node each hour (or any other timing) .
-
Sometimes DomoticZ doesn't receive data from nodes
Hi everybody. I created my MySensors home network based on DomoticZ loaded into Raspberry PI and several nodes based on Arduino Pro Mini (16, 5V), DHT22 and W5100 ethernet card. Basically the network is based on Ethernet (wired) and is used to collect temp and hum from every room in my house and through DomoticZ control the temperature room by room. Sometimes few nodes (not always the same, it happen randomly) are not receveid by DomoticZ. If I reboot the node then it starts to be gathered by DomoticZ again. Can you suggest me how to solve this issue? I read the forum to check if the node autoreboot is feasible but (if I well understood ) it seems to be not possible. May someone of you help me?
-
RE: Coronavirus (way, way, off topic)
Hi guys from Italy. I live in one of the most interested areas by the Virus and I can say that the situation is very bad. I read some of you refer to older people as the main group touched by the virus. That's obviously true but our doctors start to say that the last days people around 50 years old are now increasing in the intensive care units. So, since you all have more time than us, please stay at home and avoid any possible contact with others because this virus is very aggressive. Take care!
-
RE: ENC28J60 and EtherCard
Finally I've solved. I'm still using UIPEthernet sincee my problem was the use of DHT library (last rev) with UIPEhernet lib.
I was having a restart of teh ETH port each time I was reading Temp/hum. I've changed into SimpleDHT lib and now it's working fine. I'm using a mix of W5100 and ENC28J60. -
ENC28J60 and EtherCard
Hallo. I would like to use EtherCard lib with ENC28J60: is it possible? The only example I see on Build section is created by using UIPEthernet lib. Is there any code example to create a gateway with EtherCard library? Is anyone using ENC28J60 based gateway together with EtherCard?
I some haveing some problem with UIPEthernet since I receive ETH:FAIL and I cannot ping my gateway. The ENC28J60 module is working because if I compile an example with EtherCard I can ping it; similarly, I've created a web server and it's working. -
RE: DHT11, W5100, OLED display node
@mfalkvidd Thanks a lot as usual! Any I cannot download the libraries: can you give me some instructions to load on my Arduino tool?
-
DHT11, W5100, OLED display node
Hi.
I have a node composed by Arduino Nano, DHT11 sensor, mini W5100 ethernet shield and OLED 128x32 display.
I'm using Adafruit GFX library to control the OLED display.
The problem is the code size that seems to be more than 32K therefore I cannot compile it.
I tried to squeeze the code but with no success. Any help? Suggestion?Here my code
// ----------------------------------------------------------- Definitions #define MY_DEBUG #define MY_GATEWAY_W5100 #define MY_IP_ADDRESS 192,168,1,71 #define MY_PORT 5070 #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define MY_MAC_ADDRESS 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 // Set this to the pin you connected the DHT's data pin to #define DHT_DATA_PIN 3 // If any Permanent Small Offset to the real temperatures in °C #define SENSOR_TEMP_OFFSET 0 // OLED SSD1306 #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 32 // OLED display height, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) #define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) #define COLORBLACK 0x0000 // BLACK // ----------------------------------------------------------- Libraries #include <Ethernet.h> //#include <SPI.h> #include <MySensors.h> #include <DHT.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> // ----------------------------------------------------------- Variables // Sleep time between sensor updates (in milliseconds) // Must be >1000ms for DHT22 and >2000ms for DHT11 static const uint64_t UPDATE_INTERVAL = 5000; bool metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); DHT dht; unsigned long startMillis; //some global variables available anywhere in the program unsigned long currentMillis; const unsigned long period = 2000; //the value is a number of milliseconds Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); bool FirstTime; // to execute an action once only // ----------------------------------------------------------- Functions void presentation() { sendSketchInfo("Temp/Humidity Soggiorno", "1.0"); present(CHILD_ID_HUM, S_HUM); present(CHILD_ID_TEMP, S_TEMP); metric = getControllerConfig().isMetric; } void setup() { //---------------------------------------------------------- Serial Begin Serial.begin(9600); //---------------------------------------------------------- DHT11 dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) { #ifdef MY_DEBUG Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!"); #endif } // Sleep for the time of the minimum sampling period to give the sensor time to power up // (otherwise, timeout errors might occure for the first reading) sleep(dht.getMinimumSamplingPeriod()); //---------------------------------------------------------- OLED SSD1306 // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) // Address 0x3C for 128x32 { #ifdef MY_DEBUG Serial.println(F("SSD1306 allocation failed")); #endif for(;;); // Don't proceed, loop forever } // Show initial display buffer contents on the screen the library initializes this with an Adafruit splash screen. display.display(); delay(500); // Pause for 0,5 second // Clear the buffer display.clearDisplay(); display.setTextSize(2); // Draw 2X-scale text display.setTextColor(SSD1306_WHITE); display.setCursor(2, 16); display.println(F("Waiting....")); display.display(); // Show initial text delay(100); // Variable to make action just the first time FirstTime = true; //---------------------------------------------------------- Timing startMillis = millis(); //initial start time } void loop() { bool changed; // to note the change of value //---------------------------------------------------------- Verify Timing for Reading currentMillis = millis(); //get the current "time" (actually the number of milliseconds since the program started) if (currentMillis - startMillis >= period) //test whether the period has elapsed { startMillis = currentMillis; changed = false; //---------------------------------------------------------- WakeUp Sensor dht.readSensor(true); //---------------------------------------------------------- Temperature int temperature = dht.getTemperature(); if (isnan(temperature)) { #ifdef MY_DEBUG Serial.println("Failed reading temperature from DHT!"); #endif } else { // apply the offset before converting to something different than Celsius degrees temperature += SENSOR_TEMP_OFFSET; if (!metric) { temperature = dht.toFahrenheit(temperature); } send(msgTemp.set(temperature, 1)); #ifdef MY_DEBUG Serial.print("T: "); Serial.println(temperature); #endif changed = true; CancellaQuadro(); display.setCursor(64, 0); display.print(temperature); } //---------------------------------------------------------- Humidity int humidity = dht.getHumidity(); if (isnan(humidity)) { #ifdef MY_DEBUG Serial.println("Failed reading humidity from DHT"); #endif } else { send(msgHum.set(humidity, 1)); #ifdef MY_DEBUG Serial.print("H: "); Serial.println(humidity); #endif if (changed == false) { CancellaQuadro(); } display.setCursor(64, 18); display.print(humidity); } display.display(); delay(100); } } void CancellaQuadro(void) { if (FirstTime == true) { display.clearDisplay(); display.setCursor(2, 0); display.print(F("Temp:")); display.setCursor(90, 0); display.print((char)247); // degree symbol display.setCursor(105, 0); display.print(F("C")); display.setCursor(2, 18); display.print(F("Hum :")); display.setCursor(90, 18); display.print(F("%")); display.display(); delay(100); FirstTime = false; }else { display.fillRect(64,0, 25, 16, COLORBLACK); display.fillRect(64,16, 25, 32, COLORBLACK); display.display(); delay(1); } }