Ethernet Gateway
-
Hi.
I have question about Gateway .
I want automatic resend incomming packet from predefined node to other predefined node .
How is it possible ?
I want resend packet from binary input node to relay .. I don't want use any controller ..
only gateway - serial or ethernet.how to do it ?
Or how to send data from one node to other directly ?? don't need gateway .. is it possible .. any small example ..
send data from bininput node to relay ..regards.
-
yes. I know .. I try understand this .. but .. more help me .. if have Tx node and Rx node..
I manualy set node ID .. I want make 16 Tx node with 4 button , and Rx node with 32 relays ..Rx node ID 1 and Tx node will be 2,3,4,.. 17 ..
is possible help with it ..???regards..
-
Hi .
Here is my example .. working with my code for Relay board 32 relay by I2C IO expander.#include <MySensor.h> #include <SPI.h> // Define version #define VSN "v1.0" // Define Name #define NAME "Test" // Define Sensor - button #define BLU 1 // Button Left Up #define BLD 2 // Button Left Down #define BRU 3 // Button Right Up #define BRD 4 // Button Right Down // Sensor objects MySensor gw; void setup() { // eeprom_write_byte((uint8_t*)EEPROM_NODE_ID_ADDRESS, (byte)255); gw.begin(incomingMessage,AUTO); // Node ID auto .. if not used gateway , Node ID must define manualy gw.sendSketchInfo( NAME, VSN ); // Name and version gw.present(BLU, S_LIGHT); gw.present(BLD, S_LIGHT); gw.present(BRU, S_LIGHT); gw.present(BRD, S_LIGHT); } void loop() { gw.process(); } void incomingMessage(const MyMessage &message) { if (message.type == V_LIGHT) { MyMessage response (message.getByte(),V_LIGHT) ; // message.getByte() = payload define what relay want change state response.setDestination(1); // My Relay Board gw.send(response); } }```
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login