Hi I've just started with NodeManager but not with MySensors. I've been writing my own sketches up to now but am impressed with NM's v1.7 as it makes so much sense and avoids so much of the repetition and debug time with manual coding.
I've got a DHT22 node up with 1.7 - nice and easy. I noticed the FEATURE_CONDITIONAL_REPORT feature and would like to know how to use it as it isn't covered in the documentation yet.
Since the sensor can often fluctuate by 0.1c (and humidity even more so) I'd like to only report for 'genuine' changes. Something like:
If the value changes by more than 0.1c since the last value was reported, then report immediately. Otherwise don't report yet.
Report anyway after 5 minutes if no report was made. This 5 minutes would get reset if a report was made by the first >0.1c condition.
I think that makes sense although open to ideas on the best way to keep regular but not too regular sensor reports.
Looking forward to rolling out NM across my sensor network and expanding!
Hello, can you, on the basis of the principle of this scanner, realize the work of the loader with any radio channel? I think it might work. https://forum.mysensors.org/topic/8748/mys-network-scanner-4-sec
To use the FTDI connection:
You need a ceramic cap (not polarised).
RTS - CAP - RESET pin of ATMEGA
RESET pin needs a pull up resistor of 10K, connect as follows: VCC - 10K resistor - RESET pin of ATMEGA
@Yveaux said in ESP8266 WiFi gateway port for MySensors:
@Mark-Swift that issue apparently addressed an issue in the vs1053 library, which surfaced because the esp8266 doesn't support interrupts on spi transfers.
The issue was closed because the vs1053 library was modified to support esp8266, unfortunately not because esp interrupt support for spi was implemented...
@Yveaux You're right, should have read more before jumping to conclusions
Damn, I thought I could finally dump my serial gateway!
But as you can see I have the radio working by just choosing different lines of code to use, but I can not get W5100 to send and transmit and provide Ethernet connection so I can ping address.
It seems no matter what combination of lines of code I choose it will not activate the W5100 board, but it was working and now does not. I even swapped W5100 board but same thing. I know I can not load the enable pin 4 because then the TSP fails.
* 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 <email@example.com>
* 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 - Rait Lotamõis
// Enable debug prints to serial monitor
// Enable and select radio type attached
//Running on Mega
#define MY_RF24_CE_PIN 49
#define MY_RF24_CS_PIN 53
// Enable gateway ethernet module type
// Define the GSM modem
#define MY_GSM_APN "internet"
//#define MY_GSM_USR ""
//#define MY_GSM_PSW ""
//#define MY_GSM_PIN "0000"
// Use Hardware Serial on Mega, Leonardo, Micro
#define SerialAT Serial3
// or Software Serial on Uno, Nano
//#define MY_GSM_RX 4
//#define MY_GSM_TX 5
// Set your modem baud rate or comment it out for auto detection
//#define MY_GSM_BAUDRATE 115200
// The port to keep open on node server mode / or port to contact in client mode
#define MY_PORT 5003
// 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
#define MY_CONTROLLER_URL_ADDRESS "xxx.yyyyyyy.com"
// 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
// Enable Inclusion mode button on gateway
// 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
// Setup locally attached sensors
// Present locally attached sensors here
// Send locally attached sensors data here
Yes, you are getting there!
The topic prefix is just as you say defined by the #define statement.
The rest of the topic is defined as described in the API definition (Serial protocol) so:
The content of the message is the payload.
Example: this is copied from my GW:
ib9sensors-out/21/2/1/0/4 1014 => So the sensor id is 21/ the child is 2/ this is a "set" message/ no-ack/ payload type is V_PRESSURE. The content of the message is 1014 which is just the atmospheric pressure here today.
I recommend using an MQTT client test tool like MQTT.fx It helps a lot when debugging.
I am not the right guy to answer how to re-define the topic structure. I guess you will have to do some serious work on the MQTT GW software.
@Greymarvel for me that 47uF cap is essential whenever I'm not using the full adapter I suggested for your gateway.
I'm getting over 30 meters through two 35cm concrete walls and some trees with the following setup: Gateway with a shielded nRF24L01-PA-LNA (not DIY foil shielded, but proper shielded one) and the forementioned adapter.
Solar + battery powered sensor with the basic nRF24L01 (PCB antenna) the only booster is that 47uF cap on the radio power pins.
@xydix The lower power you can use the better, particularly where battery powered.
You can see the size differences between the W and the CW on the lowpowerlab link below, but note that W and HW are pin compatible, CW and HCW are not...