Hi, thank you for the update
EDIT::
Yes, I downgraded AVR boards to lower version and its working. Thanks ! you saved me tons of hours
Hi, thank you for the update
EDIT::
Yes, I downgraded AVR boards to lower version and its working. Thanks ! you saved me tons of hours
Hello guys,
I had the same problem with st=fail, also with this output: "Error sending command, check your hardware/device (blablabla :D)". I can give you here my hints, maybe they will help you. First of all I am using the latest beta domoticz and beta mysensors library v1.6.
I am using two types of nrf24L01+ (with built-in antenna and external). For built-in antenna I am using #define RF24_PA_LEVEL_GW RF24_PA_HIGH in my sketches, BUT for external I need to lower the power because Arduino cannot provide enought current for it (even with attached capacitor): define RF24_PA_LEVEL_GW RF24_PA_LOW. I had this st=fail when I was using HIGH settings for nrf with external antenna, but now it is fixed. Also make sure that you have enough coverage.
I have Arduino Mega2560 installed 1 week ago with 16 channel 12v relay board together. I had the the same problem like you "Error sending command, check your hardware/device". Two days ago I realized that maybe there is a problem with my powering my gateway. I have RFXtrx433, APCups and Ethernet Arduino Uno gateway connected to Raspberry Pi USB. I connected my MySensors gateway separately via 5V charge to the wall socket and this error problem is gone. Conclusion was this that my Raspberry couldnt supply enough current for all attached devices. Now I am planning to install PiHut USB hub with external power supply and move all connected USB interfaces to it and then just with one connection cable to my raspberry (maybe RFX will work better we will see).
Update us if these two hints helped you ;D.
Cheers
Maciek
Thank you guys for your input.
Yes, I will start step by step as I do with mixing Mysensors sketches. The thing was about theses multiple I2C how they will be discovered. I will try to start with example RFID sketch, make it 100% work and then I will start with example lux sensor We will see what will happend. For sure I will provide my output here hehe
Regards,
Maciek
@tboha
Yes I got it, Thank you very much for help!
Hello everyone,
I really appreciate hard work for everyone who is involved in MySensors project.
I am having the following issue:
After upgrading Arduino IDE (1.8.8 MAC) and MySensors library (2.3.0) I am having difficulties with my Arduino UNO + W5100 shield gateway.
Generally it works randomly, sometimes it is working without any issues, sometimes crashing after 5-10 minutes.
To makes things simple I disconnected all other nodes and this time it is running only on gateway with 1 node (in close range).
I tried to catch some logs, as you can see below, my node 98 is sending temperature update every 10 seconds.
From what I have observed. When I power off node 98 and power on again, in Domoticz logs I see the node is not reporting data anymore. To add more, when I was troubleshooting it previously I observed that even data from other nodes was not updated in Domoticz after powercycle of one node).
However, checking further in Arduino IDE serial monitor logs I indeed see that after node reboot, gateway IS reading data from rebooted node - it is really confusing, sounds like issue between gateway and controller. But, sometimes, when I power cycle node, I see that even gateway itself is rebooting - this reset is visible in domoticz logs as "gateway reset".
I really appreciate any hints & advise !
Thank you,
Maciek
FYI: Timestamps are almost synchronised (Arduino IDE <-> Domoticz).
Domoticz logs:
2019-01-23 13:28:12.705 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:28:24.683 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:28:36.662 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:28:48.639 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:00.618 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:12.597 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:24.575 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:36.552 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:48.531 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:00.505 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:12.486 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:24.463 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:36.441 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:41.866 (Xiaomi GW) Temp (Biuro)
2019-01-23 13:30:41.868 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 13:30:41.875 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
2019-01-23 13:30:41.896 (Xiaomi GW) Temp (Biuro)
2019-01-23 13:30:41.898 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 13:30:41.899 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
## LAST UPDATE FROM NODE 98 - 2019-01-23 13:30:48.434
2019-01-23 13:30:48.434 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:31:37.959 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 13:31:37.977 (Z-Wave GW) Temp (Hol)
2019-01-23 13:33:05.179 (Xiaomi GW) Temp (Salon)
2019-01-23 13:33:05.181 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 13:33:05.240 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
Arduino Serial Monitor logs:
13:28:02.708 -> 291276 GWT:TSA:ETH OK
13:28:02.708 -> 291281 GWT:RFC:MSG=0;0;3;0;2;
13:28:02.708 -> 291287 GWT:RFC:MSG=0;0;3;0;2;Get Version
13:28:11.683 -> 300228 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:12.720 -> 301272 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:22.698 -> 311266 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:23.635 -> 312200 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:32.710 -> 321261 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:35.640 -> 324170 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:42.718 -> 331255 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:47.596 -> 336141 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:52.709 -> 341250 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:59.563 -> 348111 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:02.719 -> 351245 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:11.546 -> 360082 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:12.734 -> 361239 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:22.726 -> 371233 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:23.538 -> 372052 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:32.704 -> 381229 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:35.532 -> 384022 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:29:42.738 -> 391223 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:47.504 -> 395994 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:52.732 -> 401217 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:59.469 -> 407964 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:02.738 -> 411211 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:11.441 -> 419934 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:12.729 -> 421207 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:22.715 -> 431201 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:23.428 -> 431903 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:32.717 -> 441195 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:35.416 -> 443874 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:42.723 -> 451190 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:47.408 -> 455860 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:30:52.721 -> 461185 GWT:RFC:MSG=0;0;3;0;18;PING
##(Around this time I plug off / plug in temperature sensor node 98, and Gateway W5100 hangs)
13:30:58.753 -> 467210 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:30:58.753 -> 467215 TSF:MSG:BC
13:30:58.753 -> 467217 TSF:MSG:FPAR REQ,ID=98
13:30:58.753 -> 467219 TSF:PNG:SEND,TO=0
13:30:58.753 -> 467222 TSF:CKU:OK
13:30:58.753 -> 467223 TSF:MSG:GWL OK
13:31:00.880 -> 469321 !TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
13:31:00.880 -> 469327 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.880 -> 469334 !TSF:MSG:LEN,0!=7
13:31:00.880 -> 469336 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.880 -> 469341 !TSF:MSG:LEN,0!=7
13:31:00.880 -> 469344 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.880 -> 469349 !TSF:MSG:LEN,0!=7
13:31:00.880 -> 469351 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.915 -> 469357 !TSF:MSG:LEN,0!=7
13:31:02.730 -> 471179 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:02.839 -> 471306 TSF:MSG:READ,98-98-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
13:31:02.877 -> 471311 TSF:MSG:PINGED,ID=98,HP=1
13:31:02.877 -> 471318 TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
13:31:02.877 -> 471331 TSF:MSG:READ,98-98-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
13:31:02.877 -> 471339 TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
13:31:02.877 -> 471348 TSF:MSG:READ,98-98-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.3.0
13:31:02.913 -> 471358 TSF:MSG:READ,98-98-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
13:31:04.908 -> 473368 TSF:MSG:READ,98-98-0,s=255,c=3,t=11,pt=0,l=11,sg=0:Szafa Media
13:31:04.942 -> 473380 TSF:MSG:READ,98-98-0,s=255,c=3,t=12,pt=0,l=5,sg=0:2.3.0
13:31:04.942 -> 473391 TSF:MSG:READ,98-98-0,s=0,c=0,t=6,pt=0,l=0,sg=0:
13:31:04.942 -> 473401 TSF:MSG:READ,98-98-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
13:31:04.978 -> 473417 TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
13:31:05.849 -> 474311 TSF:MSG:READ,98-98-0,s=255,c=3,t=0,pt=1,l=1,sg=0:83
13:31:05.884 -> 474320 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:12.721 -> 481174 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:17.854 -> 486290 TSF:MSG:READ,98-98-0,s=255,c=3,t=0,pt=1,l=1,sg=0:79
13:31:17.854 -> 486299 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:22.743 -> 491168 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:29.822 -> 498269 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:32.727 -> 501163 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:41.814 -> 510238 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:42.717 -> 511157 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:52.739 -> 521152 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:53.803 -> 522208 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:32:02.714 -> 531146 GWT:RFC:MSG=0;0;3;0;18;PING
13:32:05.779 -> 534176 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
Gateway sketch (almost the same as default)
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*******************************
*
* REVISION HISTORY
* Version 1.0 - Henrik EKblad
* Contribution by a-lurker and Anticimex,
* Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
* Contribution by Tomas Hozza <thozza@gmail.com>
*
*
* DESCRIPTION
* The EthernetGateway sends data received from sensors to the ethernet link.
* The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
*
* The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program.
*
* LED purposes:
* - To use the feature, uncomment MY_DEFAULT_xxx_LED_PIN in the sketch below
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
* See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
*
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
#define MY_RF24_PA_LEVEL RF24_PA_MAX
// Enable gateway ethernet module type
#define MY_GATEWAY_W5100
// W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
#define MY_W5100_SPI_EN 4
// Enable Soft SPI for NRF radio (note different radio wiring is required)
// The W5100 ethernet module seems to have a hard time co-operate with
// radio on the same spi bus.
#if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
#define MY_SOFTSPI
#define MY_SOFT_SPI_SCK_PIN 14
#define MY_SOFT_SPI_MISO_PIN 16
#define MY_SOFT_SPI_MOSI_PIN 15
#endif
// When W5100 is connected we have to move CE/CSN pins for NRF radio
#ifndef MY_RF24_CE_PIN
#define MY_RF24_CE_PIN 5
#endif
#ifndef MY_RF24_CS_PIN
#define MY_RF24_CS_PIN 6
#endif
#define MY_IP_ADDRESS 192,168,0,6
#define MY_IP_GATEWAY_ADDRESS 192,168,0,1
#define MY_IP_SUBNET_ADDRESS 255,255,255,0
#define MY_PORT 5006
#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
#define MY_DEFAULT_ERR_LED_PIN 8 // Error led pin
#define MY_DEFAULT_RX_LED_PIN 9 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN 10 // Transmit led pin
#if defined(MY_USE_UDP)
#include <EthernetUdp.h>
#endif
#include <Ethernet.h>
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
}
void presentation()
{
// Present locally attached sensors here
}
void loop()
{
// Send locally attached sensors data here
}
Node 98 sketch (It is Arduino Pro Mini 3.3v on sundberg84 PCB (big appreciate for author work on this project )
// Enable debug prints to serial monitor
#define MY_DEBUG
#define MY_NODE_ID 98
#define MY_RF24_PA_LEVEL RF24_PA_LOW
// Enable and select radio type attached
#define MY_RADIO_NRF24
#include <SPI.h>
#include <MySensors.h>
#include <DallasTemperature.h>
#include <OneWire.h>
#define COMPARE_TEMP 0 // Send temperature only if changed? 1 = Yes 0 = No
#define ONE_WIRE_BUS 4 // Pin where dallase sensor is connected
#define MAX_ATTACHED_DS18B20 1
unsigned long SLEEP_TIME = 10000; // Sleep time between reads (in milliseconds)
OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature.
float lastTemperature[MAX_ATTACHED_DS18B20];
float currentTemperature[MAX_ATTACHED_DS18B20];
int numSensors=0;
bool receivedConfig = false;
bool metric = true;
// Initialize temperature message
MyMessage msg(0,V_TEMP);
int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point
int oldBatteryPcnt = 0;
void before()
{
// Startup up the OneWire library
sensors.begin();
}
void setup()
{
// use the 1.1 V internal reference
#if defined(__AVR_ATmega2560__)
analogReference(INTERNAL1V1);
#else
analogReference(INTERNAL);
#endif
// requestTemperatures() will not block current thread
sensors.setWaitForConversion(false);
}
void presentation() {
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Szafa Media", "2.3.0");
// Fetch the number of attached temperature sensors
numSensors = sensors.getDeviceCount();
// Present all sensors to controller
for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
present(i, S_TEMP);
}
}
void loop()
{
// get the battery Voltage
int sensorValue = analogRead(BATTERY_SENSE_PIN);
#ifdef MY_DEBUG
Serial.println(sensorValue);
#endif
// 1M, 470K divider across battery and using internal ADC ref of 1.1V
// Sense point is bypassed with 0.1 uF cap to reduce noise at that point
// ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts
// 3.44/1023 = Volts per bit = 0.003363075
int batteryPcnt = sensorValue / 10;
#ifdef MY_DEBUG
float batteryV = sensorValue * 0.003363075;
Serial.print("Battery Voltage: ");
Serial.print(batteryV);
Serial.println(" V");
Serial.print("Battery percent: ");
Serial.print(batteryPcnt);
Serial.println(" %");
#endif
// Fetch temperatures from Dallas sensors
sensors.requestTemperatures();
// query conversion time and sleep until conversion completed
int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
// sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
sleep(conversionTime);
// Read temperatures and send them to controller
for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
// Fetch and round temperature to one decimal sensors.getTempCByIndex(i)
//currentTemperature[i] = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
currentTemperature[i] = sensors.getTempCByIndex(i);
lastTemperature[i]=currentTemperature[i];
}
if (oldBatteryPcnt != batteryPcnt) {
// Power up radio after sleep
sendBatteryLevel(batteryPcnt);
oldBatteryPcnt = batteryPcnt;
}
for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
// Only send data if temperature has changed and no error
#if COMPARE_TEMP == 1
if (lastTemperature[i] != currentTemperature[i] && currentTemperature[i] != -127.00 && currentTemperature[i] != 85.00) {
#else
if (currentTemperature[i] != -127.00 && currentTemperature[i] != 85.00) {
#endif
// Send in the new temperature
send(msg.setSensor(i).set(currentTemperature[i],1));
// Save new temperatures for next compare
}
}
sleep(SLEEP_TIME);
}
I think it is not a case. It has normal temperature. It was running fine before
I have AMS1117-3.3V pcb adapter soldered directly to UNO (under USB TypeB) connection. It is feeding 5V directly from 2A usb charger and converting to 3.3V. I am installing always 4,7uF capacitor near NRF antenna pins across all my nodes / gateway.
I tried before adjusting to "LOW" settings. Powering from built-in Uno's 3.3V socket - unfortunately it is the same.
I think this is somehow related with other thing, because I am receiving "reads" from the node 98.
But I do not give up This is excellent project
Checking further, please see attached Domoticz log.
After 14:58:00 I have powercycled node 98. As you can see it did not came up after, but in Serial Monitor (on Gateway) I could see reads from it. I have 5 min timeout configured in Domoticz hardware tab. After 5 minutes, Domoticz restarted MySensors service. After that it came up and updates were visible in the domoticz system.
2019-01-23 14:57:36.335 (MySensors GW) Temp (Dallas TEST)
2019-01-23 14:57:48.316 (MySensors GW) Temp (Dallas TEST)
2019-01-23 14:58:00.297 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:01:11.563 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 15:01:11.581 (Z-Wave GW) Temp (Hol)
2019-01-23 15:04:17.440 (Xiaomi GW) Temp (Zewnętrzny)
2019-01-23 15:04:17.457 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 15:04:17.481 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
2019-01-23 15:04:19.500 Error: MySensors GW hardware (7) nothing received for more than 5 Minutes!....
2019-01-23 15:04:20.501 Status: MySensors: TCP/IP Worker stopped...
2019-01-23 15:04:20.504 Status: MySensors: trying to connect to: 192.168.0.6:5006
2019-01-23 15:04:20.505 Status: MySensors: connected to: 192.168.0.6:5006
2019-01-23 15:04:20.501 Error: Restarting: MySensors GW
2019-01-23 15:06:10.013 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 15:06:10.031 (Z-Wave GW) Temp (Hol)
2019-01-23 15:09:27.956 Error: MySensors GW hardware (7) nothing received for more than 5 Minutes!....
2019-01-23 15:09:28.966 MySensors: Gateway Ready...
2019-01-23 15:09:28.972 MySensors: Gateway Version: 2.3.0
2019-01-23 15:09:28.978 MySensors: Gateway Version: 2.3.0
2019-01-23 15:09:28.958 Status: MySensors: TCP/IP Worker stopped...
2019-01-23 15:09:28.961 Status: MySensors: trying to connect to: 192.168.0.6:5006
2019-01-23 15:09:28.962 Status: MySensors: connected to: 192.168.0.6:5006
2019-01-23 15:09:28.957 Error: Restarting: MySensors GW
2019-01-23 15:09:37.743 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:09:49.721 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:01.698 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:13.678 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:25.656 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:37.634 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:49.612 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:01.589 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:08.538 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 15:11:08.556 (Z-Wave GW) Temp (Hol)
2019-01-23 15:11:13.570 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:25.548 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:37.526 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:49.505 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:01.481 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:13.461 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:25.439 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:37.418 (MySensors GW) Temp (Dallas TEST)```
[UPDATE]
I have tried in several way with no luck - even formatting Raspberry Pi card with fresh Domoticz. I did workaround and changed gateway to Raspberry Pi + NRF24 option. It is working perfectly and I have got ability to check and investigate MySensors debug logs remotely thanks to logging to pipe
Regards,
Maciek
Hi,
I have setup HA with MySensors RPI as a gateway. From debugs I see that my GW is sending all the time, each 10 seconds internal message I_VERSION "MSG=0;255;3;0;2;" with current software release. FYI, I have tested stable/development and results are the same.
2020-02-19 08:18:19 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:18:19 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
2020-02-19 08:18:29 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:18:29 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
Is it a bug or feature ?
Logs for reference.
MySensors GW side:
GWT:RFC:C=0,MSG=0;255;3;0;2;
GWT:RFC:C=0,MSG=0;255;3;0;2;
TSF:MSG:READ,1-1-0,s=10,c=1,t=17,pt=5,l=4,sg=0:109
TSF:MSG:READ,1-1-0,s=12,c=1,t=24,pt=5,l=4,sg=0:4602
TSF:MSG:READ,1-1-0,s=11,c=1,t=18,pt=7,l=5,sg=0:4.602
TSF:MSG:READ,1-1-0,s=13,c=1,t=17,pt=5,l=4,sg=0:34
TSF:MSG:READ,1-1-0,s=15,c=1,t=25,pt=5,l=4,sg=0:243
TSF:MSG:READ,1-1-0,s=14,c=1,t=18,pt=7,l=5,sg=0:0.243
TSF:MSG:READ,1-1-0,s=0,c=1,t=0,pt=7,l=5,sg=0:29.7
GWT:RFC:C=0,MSG=0;255;3;0;2;
GWT:RFC:C=0,MSG=0;255;3;0;2;
TSF:MSG:READ,1-1-0,s=10,c=1,t=17,pt=5,l=4,sg=0:109
TSF:MSG:READ,1-1-0,s=12,c=1,t=24,pt=5,l=4,sg=0:4602
TSF:MSG:READ,1-1-0,s=11,c=1,t=18,pt=7,l=5,sg=0:4.602
TSF:MSG:READ,1-1-0,s=13,c=1,t=17,pt=5,l=4,sg=0:34
TSF:MSG:READ,1-1-0,s=15,c=1,t=25,pt=5,l=4,sg=0:243
TSF:MSG:READ,1-1-0,s=14,c=1,t=18,pt=7,l=5,sg=0:0.243
TSF:MSG:READ,1-1-0,s=0,c=1,t=0,pt=7,l=5,sg=0:29.6
GWT:RFC:C=0,MSG=0;255;3;0;2;
GWT:RFC:C=0,MSG=0;255;3;0;2;
TSF:MSG:READ,1-1-0,s=10,c=1,t=17,pt=5,l=4,sg=0:110
TSF:MSG:READ,1-1-0,s=12,c=1,t=24,pt=5,l=4,sg=0:4603
TSF:MSG:READ,1-1-0,s=11,c=1,t=18,pt=7,l=5,sg=0:4.603
TSF:MSG:READ,1-1-0,s=13,c=1,t=17,pt=5,l=4,sg=0:34
TSF:MSG:READ,1-1-0,s=15,c=1,t=25,pt=5,l=4,sg=0:243
TSF:MSG:READ,1-1-0,s=14,c=1,t=18,pt=7,l=5,sg=0:0.243
TSF:MSG:READ,1-1-0,s=0,c=1,t=0,pt=7,l=5,sg=0:29.6
Homeassistant side:
2020-02-19 08:17:59 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:17:59 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
2020-02-19 08:18:09 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:18:09 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
2020-02-19 08:18:12 DEBUG (MainThread) [mysensors] Receiving 1;10;1;0;17;109
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 10
2020-02-19 08:18:12 DEBUG (MainThread) [mysensors] Receiving 1;12;1;0;24;4602
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 12
2020-02-19 08:18:12 DEBUG (MainThread) [mysensors] Receiving 1;11;1;0;18;4.602
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 11
2020-02-19 08:18:12 DEBUG (MainThread) [mysensors] Receiving 1;13;1;0;17;34
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 13
2020-02-19 08:18:12 DEBUG (MainThread) [mysensors] Receiving 1;15;1;0;25;243
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 15
2020-02-19 08:18:12 DEBUG (MainThread) [mysensors] Receiving 1;14;1;0;18;0.243
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 14
2020-02-19 08:18:12 DEBUG (MainThread) [mysensors] Receiving 1;0;1;0;0;29.7
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 0
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 10: value_type 17, value = 109
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 12: value_type 24, value = 4602
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 11: value_type 18, value = 4.602
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 13: value_type 17, value = 34
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 15: value_type 25, value = 243
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 14: value_type 18, value = 0.243
2020-02-19 08:18:12 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 0: value_type 0, value = 29.7
2020-02-19 08:18:16 DEBUG (SyncWorker_11) [mysensors.persistence] Saving sensors to persistence file /config/mysensors-eth.json
2020-02-19 08:18:19 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:18:19 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
2020-02-19 08:18:29 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:18:29 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
2020-02-19 08:18:32 DEBUG (MainThread) [mysensors] Receiving 1;10;1;0;17;109
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 10
2020-02-19 08:18:32 DEBUG (MainThread) [mysensors] Receiving 1;12;1;0;24;4602
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 12
2020-02-19 08:18:32 DEBUG (MainThread) [mysensors] Receiving 1;11;1;0;18;4.602
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 11
2020-02-19 08:18:32 DEBUG (MainThread) [mysensors] Receiving 1;13;1;0;17;34
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 13
2020-02-19 08:18:32 DEBUG (MainThread) [mysensors] Receiving 1;15;1;0;25;243
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 15
2020-02-19 08:18:32 DEBUG (MainThread) [mysensors] Receiving 1;14;1;0;18;0.243
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 14
2020-02-19 08:18:32 DEBUG (MainThread) [mysensors] Receiving 1;0;1;0;0;29.6
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 0
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 10: value_type 17, value = 109
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 12: value_type 24, value = 4602
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 11: value_type 18, value = 4.602
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 13: value_type 17, value = 34
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 15: value_type 25, value = 243
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 14: value_type 18, value = 0.243
2020-02-19 08:18:32 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 0: value_type 0, value = 29.6
2020-02-19 08:18:36 DEBUG (SyncWorker_10) [mysensors.persistence] Saving sensors to persistence file /config/mysensors-eth.json
2020-02-19 08:18:39 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:18:39 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
2020-02-19 08:18:49 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
2020-02-19 08:18:49 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
2020-02-19 08:18:52 DEBUG (MainThread) [mysensors] Receiving 1;10;1;0;17;110
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 10
2020-02-19 08:18:52 DEBUG (MainThread) [mysensors] Receiving 1;12;1;0;24;4603
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 12
2020-02-19 08:18:52 DEBUG (MainThread) [mysensors] Receiving 1;11;1;0;18;4.603
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 11
2020-02-19 08:18:52 DEBUG (MainThread) [mysensors] Receiving 1;13;1;0;17;34
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 13
2020-02-19 08:18:52 DEBUG (MainThread) [mysensors] Receiving 1;15;1;0;25;243
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 15
2020-02-19 08:18:52 DEBUG (MainThread) [mysensors] Receiving 1;14;1;0;18;0.243
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 14
2020-02-19 08:18:52 DEBUG (MainThread) [mysensors] Receiving 1;0;1;0;0;29.6
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.gateway] Node update: node 1 child 0
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 10: value_type 17, value = 110
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 12: value_type 24, value = 4603
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 11: value_type 18, value = 4.603
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 13: value_type 17, value = 34
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 15: value_type 25, value = 243
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 14: value_type 18, value = 0.243
2020-02-19 08:18:52 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: Liczniki Energii 1 0: value_type 0, value = 29.6
2020-02-19 08:18:56 DEBUG (SyncWorker_13) [mysensors.persistence] Saving sensors to persistence file /config/mysensors-eth.json
Thanks,
Maciek
[UPDATE]
I have tried in several way with no luck - even formatting Raspberry Pi card with fresh Domoticz. I did workaround and changed gateway to Raspberry Pi + NRF24 option. It is working perfectly and I have got ability to check and investigate MySensors debug logs remotely thanks to logging to pipe
Regards,
Maciek
I think it is not a case. It has normal temperature. It was running fine before
I have AMS1117-3.3V pcb adapter soldered directly to UNO (under USB TypeB) connection. It is feeding 5V directly from 2A usb charger and converting to 3.3V. I am installing always 4,7uF capacitor near NRF antenna pins across all my nodes / gateway.
I tried before adjusting to "LOW" settings. Powering from built-in Uno's 3.3V socket - unfortunately it is the same.
I think this is somehow related with other thing, because I am receiving "reads" from the node 98.
But I do not give up This is excellent project
Checking further, please see attached Domoticz log.
After 14:58:00 I have powercycled node 98. As you can see it did not came up after, but in Serial Monitor (on Gateway) I could see reads from it. I have 5 min timeout configured in Domoticz hardware tab. After 5 minutes, Domoticz restarted MySensors service. After that it came up and updates were visible in the domoticz system.
2019-01-23 14:57:36.335 (MySensors GW) Temp (Dallas TEST)
2019-01-23 14:57:48.316 (MySensors GW) Temp (Dallas TEST)
2019-01-23 14:58:00.297 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:01:11.563 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 15:01:11.581 (Z-Wave GW) Temp (Hol)
2019-01-23 15:04:17.440 (Xiaomi GW) Temp (Zewnętrzny)
2019-01-23 15:04:17.457 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 15:04:17.481 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
2019-01-23 15:04:19.500 Error: MySensors GW hardware (7) nothing received for more than 5 Minutes!....
2019-01-23 15:04:20.501 Status: MySensors: TCP/IP Worker stopped...
2019-01-23 15:04:20.504 Status: MySensors: trying to connect to: 192.168.0.6:5006
2019-01-23 15:04:20.505 Status: MySensors: connected to: 192.168.0.6:5006
2019-01-23 15:04:20.501 Error: Restarting: MySensors GW
2019-01-23 15:06:10.013 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 15:06:10.031 (Z-Wave GW) Temp (Hol)
2019-01-23 15:09:27.956 Error: MySensors GW hardware (7) nothing received for more than 5 Minutes!....
2019-01-23 15:09:28.966 MySensors: Gateway Ready...
2019-01-23 15:09:28.972 MySensors: Gateway Version: 2.3.0
2019-01-23 15:09:28.978 MySensors: Gateway Version: 2.3.0
2019-01-23 15:09:28.958 Status: MySensors: TCP/IP Worker stopped...
2019-01-23 15:09:28.961 Status: MySensors: trying to connect to: 192.168.0.6:5006
2019-01-23 15:09:28.962 Status: MySensors: connected to: 192.168.0.6:5006
2019-01-23 15:09:28.957 Error: Restarting: MySensors GW
2019-01-23 15:09:37.743 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:09:49.721 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:01.698 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:13.678 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:25.656 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:37.634 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:10:49.612 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:01.589 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:08.538 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 15:11:08.556 (Z-Wave GW) Temp (Hol)
2019-01-23 15:11:13.570 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:25.548 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:37.526 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:11:49.505 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:01.481 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:13.461 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:25.439 (MySensors GW) Temp (Dallas TEST)
2019-01-23 15:12:37.418 (MySensors GW) Temp (Dallas TEST)```
Hello everyone,
I really appreciate hard work for everyone who is involved in MySensors project.
I am having the following issue:
After upgrading Arduino IDE (1.8.8 MAC) and MySensors library (2.3.0) I am having difficulties with my Arduino UNO + W5100 shield gateway.
Generally it works randomly, sometimes it is working without any issues, sometimes crashing after 5-10 minutes.
To makes things simple I disconnected all other nodes and this time it is running only on gateway with 1 node (in close range).
I tried to catch some logs, as you can see below, my node 98 is sending temperature update every 10 seconds.
From what I have observed. When I power off node 98 and power on again, in Domoticz logs I see the node is not reporting data anymore. To add more, when I was troubleshooting it previously I observed that even data from other nodes was not updated in Domoticz after powercycle of one node).
However, checking further in Arduino IDE serial monitor logs I indeed see that after node reboot, gateway IS reading data from rebooted node - it is really confusing, sounds like issue between gateway and controller. But, sometimes, when I power cycle node, I see that even gateway itself is rebooting - this reset is visible in domoticz logs as "gateway reset".
I really appreciate any hints & advise !
Thank you,
Maciek
FYI: Timestamps are almost synchronised (Arduino IDE <-> Domoticz).
Domoticz logs:
2019-01-23 13:28:12.705 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:28:24.683 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:28:36.662 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:28:48.639 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:00.618 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:12.597 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:24.575 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:36.552 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:29:48.531 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:00.505 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:12.486 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:24.463 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:36.441 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:30:41.866 (Xiaomi GW) Temp (Biuro)
2019-01-23 13:30:41.868 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 13:30:41.875 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
2019-01-23 13:30:41.896 (Xiaomi GW) Temp (Biuro)
2019-01-23 13:30:41.898 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 13:30:41.899 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
## LAST UPDATE FROM NODE 98 - 2019-01-23 13:30:48.434
2019-01-23 13:30:48.434 (MySensors GW) Temp (Dallas TEST)
2019-01-23 13:31:37.959 (Z-Wave GW) Lux (Hol Jasność)
2019-01-23 13:31:37.977 (Z-Wave GW) Temp (Hol)
2019-01-23 13:33:05.179 (Xiaomi GW) Temp (Salon)
2019-01-23 13:33:05.181 (Xiaomi GW) Humidity (Xiaomi Humidity)
2019-01-23 13:33:05.240 (Xiaomi GW) General/Pressure (Xiaomi Pressure)
Arduino Serial Monitor logs:
13:28:02.708 -> 291276 GWT:TSA:ETH OK
13:28:02.708 -> 291281 GWT:RFC:MSG=0;0;3;0;2;
13:28:02.708 -> 291287 GWT:RFC:MSG=0;0;3;0;2;Get Version
13:28:11.683 -> 300228 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:12.720 -> 301272 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:22.698 -> 311266 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:23.635 -> 312200 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:32.710 -> 321261 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:35.640 -> 324170 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:42.718 -> 331255 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:47.596 -> 336141 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:28:52.709 -> 341250 GWT:RFC:MSG=0;0;3;0;18;PING
13:28:59.563 -> 348111 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:02.719 -> 351245 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:11.546 -> 360082 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:12.734 -> 361239 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:22.726 -> 371233 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:23.538 -> 372052 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:32.704 -> 381229 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:35.532 -> 384022 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:29:42.738 -> 391223 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:47.504 -> 395994 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:29:52.732 -> 401217 GWT:RFC:MSG=0;0;3;0;18;PING
13:29:59.469 -> 407964 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:02.738 -> 411211 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:11.441 -> 419934 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:12.729 -> 421207 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:22.715 -> 431201 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:23.428 -> 431903 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:32.717 -> 441195 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:35.416 -> 443874 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:30:42.723 -> 451190 GWT:RFC:MSG=0;0;3;0;18;PING
13:30:47.408 -> 455860 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:30:52.721 -> 461185 GWT:RFC:MSG=0;0;3;0;18;PING
##(Around this time I plug off / plug in temperature sensor node 98, and Gateway W5100 hangs)
13:30:58.753 -> 467210 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:30:58.753 -> 467215 TSF:MSG:BC
13:30:58.753 -> 467217 TSF:MSG:FPAR REQ,ID=98
13:30:58.753 -> 467219 TSF:PNG:SEND,TO=0
13:30:58.753 -> 467222 TSF:CKU:OK
13:30:58.753 -> 467223 TSF:MSG:GWL OK
13:31:00.880 -> 469321 !TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
13:31:00.880 -> 469327 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.880 -> 469334 !TSF:MSG:LEN,0!=7
13:31:00.880 -> 469336 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.880 -> 469341 !TSF:MSG:LEN,0!=7
13:31:00.880 -> 469344 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.880 -> 469349 !TSF:MSG:LEN,0!=7
13:31:00.880 -> 469351 TSF:MSG:READ,98-98-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
13:31:00.915 -> 469357 !TSF:MSG:LEN,0!=7
13:31:02.730 -> 471179 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:02.839 -> 471306 TSF:MSG:READ,98-98-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
13:31:02.877 -> 471311 TSF:MSG:PINGED,ID=98,HP=1
13:31:02.877 -> 471318 TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
13:31:02.877 -> 471331 TSF:MSG:READ,98-98-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
13:31:02.877 -> 471339 TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
13:31:02.877 -> 471348 TSF:MSG:READ,98-98-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.3.0
13:31:02.913 -> 471358 TSF:MSG:READ,98-98-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
13:31:04.908 -> 473368 TSF:MSG:READ,98-98-0,s=255,c=3,t=11,pt=0,l=11,sg=0:Szafa Media
13:31:04.942 -> 473380 TSF:MSG:READ,98-98-0,s=255,c=3,t=12,pt=0,l=5,sg=0:2.3.0
13:31:04.942 -> 473391 TSF:MSG:READ,98-98-0,s=0,c=0,t=6,pt=0,l=0,sg=0:
13:31:04.942 -> 473401 TSF:MSG:READ,98-98-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
13:31:04.978 -> 473417 TSF:MSG:SEND,0-0-98-98,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
13:31:05.849 -> 474311 TSF:MSG:READ,98-98-0,s=255,c=3,t=0,pt=1,l=1,sg=0:83
13:31:05.884 -> 474320 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:12.721 -> 481174 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:17.854 -> 486290 TSF:MSG:READ,98-98-0,s=255,c=3,t=0,pt=1,l=1,sg=0:79
13:31:17.854 -> 486299 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:22.743 -> 491168 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:29.822 -> 498269 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:32.727 -> 501163 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:41.814 -> 510238 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
13:31:42.717 -> 511157 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:52.739 -> 521152 GWT:RFC:MSG=0;0;3;0;18;PING
13:31:53.803 -> 522208 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.3
13:32:02.714 -> 531146 GWT:RFC:MSG=0;0;3;0;18;PING
13:32:05.779 -> 534176 TSF:MSG:READ,98-98-0,s=0,c=1,t=0,pt=7,l=5,sg=0:21.4
Gateway sketch (almost the same as default)
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*******************************
*
* REVISION HISTORY
* Version 1.0 - Henrik EKblad
* Contribution by a-lurker and Anticimex,
* Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
* Contribution by Tomas Hozza <thozza@gmail.com>
*
*
* DESCRIPTION
* The EthernetGateway sends data received from sensors to the ethernet link.
* The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
*
* The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program.
*
* LED purposes:
* - To use the feature, uncomment MY_DEFAULT_xxx_LED_PIN in the sketch below
* - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or receive crc error
*
* See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
*
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
#define MY_RF24_PA_LEVEL RF24_PA_MAX
// Enable gateway ethernet module type
#define MY_GATEWAY_W5100
// W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
#define MY_W5100_SPI_EN 4
// Enable Soft SPI for NRF radio (note different radio wiring is required)
// The W5100 ethernet module seems to have a hard time co-operate with
// radio on the same spi bus.
#if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
#define MY_SOFTSPI
#define MY_SOFT_SPI_SCK_PIN 14
#define MY_SOFT_SPI_MISO_PIN 16
#define MY_SOFT_SPI_MOSI_PIN 15
#endif
// When W5100 is connected we have to move CE/CSN pins for NRF radio
#ifndef MY_RF24_CE_PIN
#define MY_RF24_CE_PIN 5
#endif
#ifndef MY_RF24_CS_PIN
#define MY_RF24_CS_PIN 6
#endif
#define MY_IP_ADDRESS 192,168,0,6
#define MY_IP_GATEWAY_ADDRESS 192,168,0,1
#define MY_IP_SUBNET_ADDRESS 255,255,255,0
#define MY_PORT 5006
#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
#define MY_DEFAULT_ERR_LED_PIN 8 // Error led pin
#define MY_DEFAULT_RX_LED_PIN 9 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN 10 // Transmit led pin
#if defined(MY_USE_UDP)
#include <EthernetUdp.h>
#endif
#include <Ethernet.h>
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
}
void presentation()
{
// Present locally attached sensors here
}
void loop()
{
// Send locally attached sensors data here
}
Node 98 sketch (It is Arduino Pro Mini 3.3v on sundberg84 PCB (big appreciate for author work on this project )
// Enable debug prints to serial monitor
#define MY_DEBUG
#define MY_NODE_ID 98
#define MY_RF24_PA_LEVEL RF24_PA_LOW
// Enable and select radio type attached
#define MY_RADIO_NRF24
#include <SPI.h>
#include <MySensors.h>
#include <DallasTemperature.h>
#include <OneWire.h>
#define COMPARE_TEMP 0 // Send temperature only if changed? 1 = Yes 0 = No
#define ONE_WIRE_BUS 4 // Pin where dallase sensor is connected
#define MAX_ATTACHED_DS18B20 1
unsigned long SLEEP_TIME = 10000; // Sleep time between reads (in milliseconds)
OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature.
float lastTemperature[MAX_ATTACHED_DS18B20];
float currentTemperature[MAX_ATTACHED_DS18B20];
int numSensors=0;
bool receivedConfig = false;
bool metric = true;
// Initialize temperature message
MyMessage msg(0,V_TEMP);
int BATTERY_SENSE_PIN = A0; // select the input pin for the battery sense point
int oldBatteryPcnt = 0;
void before()
{
// Startup up the OneWire library
sensors.begin();
}
void setup()
{
// use the 1.1 V internal reference
#if defined(__AVR_ATmega2560__)
analogReference(INTERNAL1V1);
#else
analogReference(INTERNAL);
#endif
// requestTemperatures() will not block current thread
sensors.setWaitForConversion(false);
}
void presentation() {
// Send the sketch version information to the gateway and Controller
sendSketchInfo("Szafa Media", "2.3.0");
// Fetch the number of attached temperature sensors
numSensors = sensors.getDeviceCount();
// Present all sensors to controller
for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
present(i, S_TEMP);
}
}
void loop()
{
// get the battery Voltage
int sensorValue = analogRead(BATTERY_SENSE_PIN);
#ifdef MY_DEBUG
Serial.println(sensorValue);
#endif
// 1M, 470K divider across battery and using internal ADC ref of 1.1V
// Sense point is bypassed with 0.1 uF cap to reduce noise at that point
// ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts
// 3.44/1023 = Volts per bit = 0.003363075
int batteryPcnt = sensorValue / 10;
#ifdef MY_DEBUG
float batteryV = sensorValue * 0.003363075;
Serial.print("Battery Voltage: ");
Serial.print(batteryV);
Serial.println(" V");
Serial.print("Battery percent: ");
Serial.print(batteryPcnt);
Serial.println(" %");
#endif
// Fetch temperatures from Dallas sensors
sensors.requestTemperatures();
// query conversion time and sleep until conversion completed
int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
// sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
sleep(conversionTime);
// Read temperatures and send them to controller
for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
// Fetch and round temperature to one decimal sensors.getTempCByIndex(i)
//currentTemperature[i] = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
currentTemperature[i] = sensors.getTempCByIndex(i);
lastTemperature[i]=currentTemperature[i];
}
if (oldBatteryPcnt != batteryPcnt) {
// Power up radio after sleep
sendBatteryLevel(batteryPcnt);
oldBatteryPcnt = batteryPcnt;
}
for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
// Only send data if temperature has changed and no error
#if COMPARE_TEMP == 1
if (lastTemperature[i] != currentTemperature[i] && currentTemperature[i] != -127.00 && currentTemperature[i] != 85.00) {
#else
if (currentTemperature[i] != -127.00 && currentTemperature[i] != 85.00) {
#endif
// Send in the new temperature
send(msg.setSensor(i).set(currentTemperature[i],1));
// Save new temperatures for next compare
}
}
sleep(SLEEP_TIME);
}
Hello,
I am using MySensors since 2 years. To this day I was using UNO with W5100 shield as Ethernet gateway for my nodes (beta branch). Today I migrated to Raspberry Pi gateway solution with nrf24l01+ PA option. Everything went smooth, I have installed development branch etc, radio has been initialised and all the sensors/nodes were replaced with the new ones. I have tested this for few hours and I can see that after some time (approx 1-2h) MySensors data reporting is hung/stuck. The only way to fix it is reboot of the system.
Could you please take a look on below and advise what can be wrong? As you can see MySensors logs are being sent/received till Dec 29 22:01:37. After this timestamp only "ping" is working, no new data in the channel. I was using similar solution on 2nd Pi (same config) and this runs for a weeks without any problems. I would like to avoid migrating back to W5100 solution because I need to have ability to check MySensors logs remotely.
Thank you for the help.
Maciek
For the reference:
## CONFIGURATION
pi@raspberrypi ~/MySensors $ ./configure --my-debug=enable --my-transport=nrf24 --my-gateway=ethernet --my-port=5003 --my-rf24-pa-level=RF24_PA_LOW --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18
[SECTION] Detecting target machine.
[OK] machine detected: SoC=BCM2836, Type=rpi2, CPU=armv7l.
[SECTION] Detecting SPI driver.
[OK] SPI driver detected:BCM.
[SECTION] Detecting init system.
[OK] init system detected: systemd.
[SECTION] Saving configuration.
[SECTION] Cleaning previous builds.
[OK] Finished.
## DEBUG ENABLED in /etc/systemd/system/mysgw.service
[Service]
ExecStart=/usr/local/bin/mysgw -d
## VERIFICATION
pi@raspberrypi ~/MySensors $ sudo ./bin/mysgw -d
mysgw: Starting gateway...
mysgw: Protocol version - 2.2.0-rc.2
mysgw: MCO:BGN:INIT GW,CP=RNNGL-Q-,VER=2.2.0-rc.2
mysgw: TSF:LRT:OK
mysgw: TSM:INIT
mysgw: TSF:WUR:MS=0
mysgw: TSM:INIT:TSP OK
mysgw: TSM:INIT:GW MODE
mysgw: TSM:READY:ID=0,PAR=0,DIS=0
mysgw: MCO:REG:NOT NEEDED
mysgw: Listening for connections on 0.0.0.0:5003
mysgw: MCO:BGN:STP
mysgw: MCO:BGN:INIT OK,TSP=1
mysgw: TSF:MSG:READ,49-49-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
mysgw: TSF:MSG:BC
mysgw: TSF:MSG:FPAR REQ,ID=49
mysgw: TSF:CKU:OK,FCTRL
mysgw: TSF:MSG:GWL OK
mysgw: TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
mysgw: TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
mysgw: TSF:MSG:PINGED,ID=49,HP=1
mysgw: TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
mysgw: TSF:MSG:READ,4-4-0,s=0,c=1,t=37,pt=2,l=2,sg=0:209
mysgw: TSF:MSG:READ,4-4-0,s=2,c=1,t=0,pt=7,l=5,sg=0:-0.4
mysgw: TSF:MSG:READ,4-4-0,s=1,c=1,t=1,pt=7,l=5,sg=0:99.9
## DAILY,NORMAL OPERATION AFTER 1ST REBOOT
Dec 29 22:00:57 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:00:57 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=4,c=1,t=0,pt=7,l=5,sg=0:-0.5
Dec 29 22:00:58 raspberrypi mysgw: TSF:MSG:READ,8-3-0,s=1,c=1,t=34,pt=7,l=5,sg=0:0.00
Dec 29 22:00:58 raspberrypi mysgw: TSF:MSG:READ,8-3-0,s=1,c=1,t=24,pt=5,l=4,sg=0:498046
Dec 29 22:00:58 raspberrypi mysgw: TSF:MSG:READ,8-3-0,s=1,c=1,t=35,pt=7,l=5,sg=0:498.046
Dec 29 22:00:58 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=5,c=1,t=0,pt=7,l=5,sg=0:25.0
Dec 29 22:00:59 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=6,c=1,t=0,pt=7,l=5,sg=0:30.1
Dec 29 22:00:59 raspberrypi mysgw: TSF:MSG:READ,4-4-0,s=0,c=1,t=37,pt=2,l=2,sg=0:208
Dec 29 22:00:59 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=7,c=1,t=0,pt=7,l=5,sg=0:20.6
Dec 29 22:01:01 raspberrypi mysgw: TSF:MSG:READ,4-4-0,s=2,c=1,t=0,pt=7,l=5,sg=0:-0.4
Dec 29 22:01:01 raspberrypi mysgw: TSF:MSG:READ,4-4-0,s=1,c=1,t=1,pt=7,l=5,sg=0:99.9
Dec 29 22:01:01 raspberrypi CRON[3866]: (pi) CMD (sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:01:01 raspberrypi CRON[3867]: (pi) CMD (sleep 20; sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:01:01 raspberrypi CRON[3871]: (pi) CMD (sleep 40; sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:01:02 raspberrypi mysgw: TSF:MSG:READ,49-49-0,s=1,c=1,t=0,pt=7,l=5,sg=0:20.0
Dec 29 22:01:02 raspberrypi mysgw: TSF:MSG:READ,49-49-0,s=0,c=1,t=4,pt=7,l=5,sg=0:1012
Dec 29 22:01:07 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:01:09 raspberrypi mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=17,pt=5,l=4,sg=0:633
Dec 29 22:01:09 raspberrypi mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=24,pt=5,l=4,sg=0:12879042
Dec 29 22:01:09 raspberrypi mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=18,pt=7,l=5,sg=0:8586.0283
Dec 29 22:01:12 raspberrypi mysgw: TSF:MSG:READ,7-3-0,s=1,c=1,t=24,pt=5,l=4,sg=0:34590149
Dec 29 22:01:13 raspberrypi mysgw: TSF:MSG:READ,7-3-0,s=1,c=1,t=35,pt=7,l=5,sg=0:345901.469
Dec 29 22:01:13 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=199,c=1,t=17,pt=5,l=4,sg=0:136
Dec 29 22:01:14 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=199,c=1,t=24,pt=5,l=4,sg=0:1468990
Dec 29 22:01:14 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=199,c=1,t=18,pt=7,l=5,sg=0:1468.9900
Dec 29 22:01:15 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=0,c=1,t=0,pt=7,l=5,sg=0:26.9
Dec 29 22:01:15 raspberrypi mysgw: TSF:MSG:READ,7-3-0,s=3,c=1,t=0,pt=7,l=5,sg=0:21.5
Dec 29 22:01:16 raspberrypi mysgw: TSF:MSG:READ,7-3-0,s=2,c=1,t=1,pt=7,l=5,sg=0:44.1
Dec 29 22:01:16 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=1,c=1,t=0,pt=7,l=5,sg=0:12.0
Dec 29 22:01:16 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=2,c=1,t=0,pt=7,l=5,sg=0:50.6
Dec 29 22:01:16 raspberrypi mysgw: TSF:MSG:READ,2-49-0,s=1,c=1,t=0,pt=7,l=5,sg=0:9.1
Dec 29 22:01:16 raspberrypi mysgw: TSF:MSG:READ,2-49-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.3
Dec 29 22:01:16 raspberrypi mysgw: TSF:MSG:READ,2-49-0,s=0,c=1,t=1,pt=7,l=5,sg=0:52.3
Dec 29 22:01:17 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:01:17 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=3,c=1,t=0,pt=7,l=5,sg=0:21.5
Dec 29 22:01:17 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=4,c=1,t=0,pt=7,l=5,sg=0:-0.5
Dec 29 22:01:18 raspberrypi mysgw: TSF:MSG:READ,8-3-0,s=1,c=1,t=24,pt=5,l=4,sg=0:498046
Dec 29 22:01:18 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=5,c=1,t=0,pt=7,l=5,sg=0:25.0
Dec 29 22:01:19 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=6,c=1,t=0,pt=7,l=5,sg=0:30.1
Dec 29 22:01:19 raspberrypi mysgw: TSF:MSG:READ,4-4-0,s=0,c=1,t=37,pt=2,l=2,sg=0:213
Dec 29 22:01:19 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=7,c=1,t=0,pt=7,l=5,sg=0:20.6
Dec 29 22:01:21 raspberrypi mysgw: TSF:MSG:READ,4-4-0,s=2,c=1,t=0,pt=7,l=5,sg=0:-0.4
Dec 29 22:01:21 raspberrypi mysgw: TSF:MSG:READ,4-4-0,s=1,c=1,t=1,pt=7,l=5,sg=0:99.9
Dec 29 22:01:27 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:01:29 raspberrypi mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=17,pt=5,l=4,sg=0:635
Dec 29 22:01:29 raspberrypi mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=24,pt=5,l=4,sg=0:12879047
Dec 29 22:01:29 raspberrypi mysgw: TSF:MSG:READ,1-1-0,s=1,c=1,t=18,pt=7,l=5,sg=0:8586.0312
Dec 29 22:01:31 raspberrypi mysgw: TSF:MSG:READ,49-49-0,s=1,c=1,t=0,pt=7,l=5,sg=0:20.0
Dec 29 22:01:32 raspberrypi mysgw: TSF:MSG:READ,49-49-0,s=0,c=1,t=4,pt=7,l=5,sg=0:1012
Dec 29 22:01:32 raspberrypi mysgw: TSF:MSG:READ,7-3-0,s=1,c=1,t=34,pt=7,l=5,sg=0:15.98
Dec 29 22:01:33 raspberrypi mysgw: TSM:READY:NWD REQ
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:READ,7-3-0,s=1,c=1,t=24,pt=5,l=4,sg=0:34590150
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:READ,1-1-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:READ,49-49-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:READ,0-49-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:BC
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:READ,7-3-0,s=1,c=1,t=35,pt=7,l=5,sg=0:345901.531
Dec 29 22:01:33 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=199,c=1,t=17,pt=5,l=4,sg=0:136
Dec 29 22:01:34 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=199,c=1,t=24,pt=5,l=4,sg=0:1468990
Dec 29 22:01:34 raspberrypi mysgw: TSF:MSG:READ,3-3-0,s=199,c=1,t=18,pt=7,l=5,sg=0:1468.9900
Dec 29 22:01:37 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:01:47 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:01:57 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:02:01 raspberrypi CRON[4013]: (pi) CMD (sleep 40; sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:02:01 raspberrypi CRON[4019]: (pi) CMD (sleep 20; sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:02:01 raspberrypi CRON[4021]: (pi) CMD (sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:02:07 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:02:17 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:02:27 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:02:37 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:02:47 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:02:57 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:03:01 raspberrypi CRON[4164]: (pi) CMD (sleep 20; sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:03:01 raspberrypi CRON[4163]: (pi) CMD (sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:03:01 raspberrypi CRON[4165]: (pi) CMD (sleep 40; sudo ~/domoticz/scripts/readapc.sh >/dev/null 2>&1)
Dec 29 22:03:07 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:03:17 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:03:27 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Dec 29 22:03:37 raspberrypi mysgw: Client 0: 0;0;3;0;18;PING
Hello,
My plan is to install 3x Ethernet MySensors gateways (2x for NRF24L01 transmission and 1x for RS485). Reason for need of two wireless gateway is my house and thick reinforced walls, I have 3x floors (including basement). First NRF24L01 gateway will be installed in basement and connected by W5100 shield to the LAN network, second NRF24L01 gateway will be also connected by W5100 but I plan to install it on +1 floor.
My first question here is how can I change GW default NODE_ID 0 to different value, let's say second GW could have NODE_ID 1? Few nodes could be connected to 1st gw, and others to 2nd gw just by adjusting "MY_PARENT_NODE_ID" in their sketches
I would like to also deploy RS485 gateway, but here I have doubt if I can mix together Arduino UNO + W5100 shield + RS485 module together ? There is only example for Serial solution, so I just want to confirm if it's only about adjusting sketch code for ethernet solution?
I really appreciate for help.
Thank you,
Cheers,
Maciek
@tboha
Yes I got it, Thank you very much for help!
Hi, thank you for the update
EDIT::
Yes, I downgraded AVR boards to lower version and its working. Thanks ! you saved me tons of hours
Hi Guys,
Today I decided to upgrade my MySenors Arduino UNO with W5100 shield + NRF PA version on it to the newer stable version 2.1.0. Unfortunately I am having problem with establishing connection to Domoticz stable release 3.5877.
I have run it for quite long time using MySensors beta 2.0.0 (I did it around half year ago) and beta's Domoticz without any issues.
Problem now is updated ethernet gateway keeps all the time reseting and cannot be seen properly in Domoticz hardware page. When I am checking debug logs I do not see anything suspicious:
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSF:WUR:MS=0
0;255;3;0;9;TSM:INIT:TSP OK
0;255;3;0;9;TSM:INIT:GW MODE
0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
0;255;3;0;9;MCO:REG:NOT NEEDED
IP: 192.168.0.5
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
Logs from Domoticz:
2017-01-05 21:01:18.665 Domoticz V3.5877 (c)2012-2016 GizMoCuz
2017-01-05 21:01:18.666 Build Hash: 15b013c, Date: 2016-11-10 16:44:33
2017-01-05 21:01:18.666 System: Raspberry Pi
2017-01-05 21:01:18.667 Startup Path: /home/pi/domoticz/
2017-01-05 21:01:18.744 WebServer(HTTP) started on address: :: with port XXXX (hide)
2017-01-05 21:01:18.754 WebServer(SSL) started on address: :: with port XXXX (hide)
2017-01-05 21:01:18.757 Proxymanager started.
2017-01-05 21:01:18.760 TCPServer: shared server started...
2017-01-05 21:01:18.761 RxQueue: queue worker started...
2017-01-05 21:01:20.140 Incoming connection from: 192.168.0.1
2017-01-05 21:01:20.763 EventSystem: reset all events...
2017-01-05 21:01:20.764 EventSystem: reset all device statuses...
2017-01-05 21:01:20.765 EventSystem: Started
2017-01-05 21:01:21.762 MySensors: trying to connect to: 192.168.0.5:5005
2017-01-05 21:01:22.763 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:01:31.765 MySensors: Connection reset!
2017-01-05 21:01:31.765 TCP: Reconnecting in 30 seconds...
2017-01-05 21:02:01.769 TCP: Reconnecting...
2017-01-05 21:02:02.769 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:02:11.771 MySensors: Connection reset!
2017-01-05 21:02:11.771 TCP: Reconnecting in 30 seconds...
2017-01-05 21:02:41.775 TCP: Reconnecting...
2017-01-05 21:02:42.776 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:02:51.777 MySensors: Connection reset!
2017-01-05 21:02:51.777 TCP: Reconnecting in 30 seconds...
2017-01-05 21:03:21.781 TCP: Reconnecting...
2017-01-05 21:03:22.782 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:03:31.783 MySensors: Connection reset!
2017-01-05 21:03:31.784 TCP: Reconnecting in 30 seconds...
2017-01-05 21:03:53.281 Incoming connection from: 139.162.34.160
2017-01-05 21:04:01.788 TCP: Reconnecting...
2017-01-05 21:04:02.789 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:04:11.790 MySensors: Connection reset!
2017-01-05 21:04:11.790 TCP: Reconnecting in 30 seconds...
2017-01-05 21:04:41.795 TCP: Reconnecting...
2017-01-05 21:04:42.796 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:04:51.797 MySensors: Connection reset!
2017-01-05 21:04:51.797 TCP: Reconnecting in 30 seconds...
2017-01-05 21:05:21.801 TCP: Reconnecting...
2017-01-05 21:05:22.802 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:05:31.803 MySensors: Connection reset!
2017-01-05 21:05:31.804 TCP: Reconnecting in 30 seconds...
2017-01-05 21:06:01.808 TCP: Reconnecting...
2017-01-05 21:06:02.808 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:06:11.810 MySensors: Connection reset!
2017-01-05 21:06:11.810 TCP: Reconnecting in 30 seconds...
2017-01-05 21:06:41.814 TCP: Reconnecting...
2017-01-05 21:06:41.815 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:06:51.816 MySensors: Connection reset!
2017-01-05 21:06:51.817 TCP: Reconnecting in 30 seconds...
2017-01-05 21:07:21.820 TCP: Reconnecting...
2017-01-05 21:07:22.821 MySensors: connected to: 192.168.0.5:5005
2017-01-05 21:07:31.823 MySensors: Connection reset!
2017-01-05 21:07:31.823 TCP: Reconnecting in 30 seconds...
As you can see it keeps all the time reseting. When I see output in Domoticz "MySensors: Connection reset!" I can see Arduino Uno is being reseted at this time (from Serial Monitor output)
I really tried to install beta 2.2.0 and also 2.0.0 from mysensors page on both stable and beta domoticz and still it is getting same error. Did anyone face any issue like this before?
To add, W5100 is normally pingable from Raspberry:
pi@raspberrypi ~/domoticz $ ping 192.168.0.5
PING 192.168.0.5 (192.168.0.5) 56(84) bytes of data.
64 bytes from 192.168.0.5: icmp_seq=1 ttl=128 time=0.351 ms
64 bytes from 192.168.0.5: icmp_seq=2 ttl=128 time=0.236 ms
64 bytes from 192.168.0.5: icmp_seq=3 ttl=128 time=0.274 ms
^C
--- 192.168.0.5 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.236/0.287/0.351/0.047 ms
Code for W5100 is default (just IP and port changed):
/**
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
*
* Documentation: http://www.mysensors.org
* Support Forum: http://forum.mysensors.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
*******************************
*
* REVISION HISTORY
* Version 1.0 - Henrik EKblad
* Contribution by a-lurker and Anticimex,
* Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
* Contribution by Tomas Hozza <thozza@gmail.com>
*
*
* DESCRIPTION
* The EthernetGateway sends data received from sensors to the ethernet link.
* The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
*
* The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program.
*
* LED purposes:
* - To use the feature, uncomment MY_DEFAULT_xxx_LED_PIN in the sketch below
* - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
* - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
* - ERR (red) - fast blink on error during transmission error or recieve crc error
*
* See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
*
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
//#define MY_RADIO_RFM69
// Enable gateway ethernet module type
#define MY_GATEWAY_W5100
// W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
//#define MY_W5100_SPI_EN 4
// Enable Soft SPI for NRF radio (note different radio wiring is required)
// The W5100 ethernet module seems to have a hard time co-operate with
// radio on the same spi bus.
#if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
#define MY_SOFTSPI
#define MY_SOFT_SPI_SCK_PIN 14
#define MY_SOFT_SPI_MISO_PIN 16
#define MY_SOFT_SPI_MOSI_PIN 15
#endif
// When W5100 is connected we have to move CE/CSN pins for NRF radio
#ifndef MY_RF24_CE_PIN
#define MY_RF24_CE_PIN 5
#endif
#ifndef MY_RF24_CS_PIN
#define MY_RF24_CS_PIN 6
#endif
// Enable to UDP
//#define MY_USE_UDP
#define MY_IP_ADDRESS 192, 168, 0, 5 // If this is disabled, DHCP is used to retrieve address
// Renewal period if using DHCP
//#define MY_IP_RENEWAL_INTERVAL 60000
// The port to keep open on node server mode / or port to contact in client mode
#define MY_PORT 5005
// Controller ip address. Enables client mode (default is "server" mode).
// Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
//#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254
// The MAC address can be anything you want but should be unique on your network.
// Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
// Note that most of the Ardunio examples use "DEAD BEEF FEED" for the MAC address.
#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
//#define MY_DEFAULT_ERR_LED_PIN 7 // Error led pin
//#define MY_DEFAULT_RX_LED_PIN 8 // Receive led pin
//#define MY_DEFAULT_TX_LED_PIN 9 // Transmit led pin
#if defined(MY_USE_UDP)
#include <EthernetUdp.h>
#endif
#include <Ethernet.h>
#include <MySensors.h>
void setup()
{
}
void loop()
{
}
Thank you in advance for help