Only a hard reset works.



  • I have a gateway rs-485. After connecting to domoticz, he reports without a problem. The relay module is connected to it. He does not start automatically. You have to do the restet with the button. I have a watchdog, but it does not help.

    /**
     * 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
     *
     * DESCRIPTION
     * Example sketch showing how to control physical relays.
     * This example will remember relay state after power failure.
     * http://www.mysensors.org/build/relay
     */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    // Enable RS485 transport layer
    #define MY_RS485
    
    // Define this to enables DE-pin management on defined pin
    #define MY_RS485_DE_PIN 12
    
    // Set RS485 baud rate to use
    #define MY_RS485_BAUD_RATE 9600
    
    #include <avr/wdt.h>
    
    // Enable repeater functionality for this node
    #define MY_REPEATER_FEATURE
    #define MY_NODE_ID 10
    #include <MySensors.h>
    
    #define RELAY_PIN 2  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
    #define NUMBER_OF_RELAYS 6 // Total number of attached relays
    #define RELAY_ON 1  // GPIO value to write to turn on attached relay
    #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
    
    
    void before()
    {
    	for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
    		// Then set relay pins in output mode
    		pinMode(pin, OUTPUT);
    		// Set relay to last known state (using eeprom storage)
    		digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
    	}
    }
    
    void setup()
    {
     wdt_enable(WDTO_4S);
    }
    
    void presentation()
    {
    	// Send the sketch version information to the gateway and Controller
    	sendSketchInfo("Relay", "1.0");
    
    	for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
    		// Register all sensors to gw (they will be created as child devices)
    		present(sensor, S_BINARY);
    	}
    }
    
    
    void loop()
    {
    //do stuff here
    wdt_reset();
    }
    
    void receive(const MyMessage &message)
    {
    	// We only expect one type of message from controller. But we better check anyway.
    	if (message.type==V_STATUS) {
    		// Change relay state
    		digitalWrite(message.sensor-1+RELAY_PIN, message.getBool()?RELAY_ON:RELAY_OFF);
    		// Store state in eeprom
    		saveState(message.sensor, message.getBool());
    		// Write some debug info
    		Serial.print("Incoming change for sensor:");
    		Serial.print(message.sensor);
    		Serial.print(", New status: ");
    		Serial.println(message.getBool());
    	}
    }
    

    And gateway:

    /**
    * 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.
    *
    *******************************
    *
    * DESCRIPTION
    * The RS485 Gateway prints data received from sensors on the serial link.
    * The gateway accepts input on seral which will be sent out on
    * the RS485 link.
    *
    * Wire connections (OPTIONAL):
    * - Inclusion button should be connected between digital pin 3 and GND
    * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
    *
    * LEDs (OPTIONAL):
    * - 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
    *
    * If your Arduino board has additional serial ports
    * you can use to connect the RS485 module.
    * Otherwise, the gateway uses AltSoftSerial to handle two serial
    * links on one Arduino. Use the following pins for RS485 link
    *
    *  Board          Transmit  Receive   PWM Unusable
    * -----          --------  -------   ------------
    * Teensy 3.0 & 3.1  21        20         22
    * Teensy 2.0         9        10       (none)
    * Teensy++ 2.0      25         4       26, 27
    * Arduino Uno        9         8         10
    * Arduino Leonardo   5        13       (none)
    * Arduino Mega      46        48       44, 45
    * Wiring-S           5         6          4
    * Sanguino          13        14         12
    *
    */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enable RS485 transport layer
    #define MY_RS485
    
    // Define this to enables DE-pin management on defined pin
    #define MY_RS485_DE_PIN 2
    
    // Set RS485 baud rate to use
    #define MY_RS485_BAUD_RATE 9600
    
    // Enable this if RS485 is connected to a hardware serial port
    //#define MY_RS485_HWSERIAL Serial1
    
    // Enable serial gateway
    #define MY_GATEWAY_SERIAL
    
    
    // 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
    #define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
    #define MY_DEFAULT_RX_LED_PIN  5  // Receive led pin
    #define MY_DEFAULT_TX_LED_PIN  6  // the PCB, on board LED
    
    #include <MySensors.h>
    
    void setup()
    {
    	// Setup locally attached sensors
    }
    
    void presentation()
    {
    	// Present locally attached sensors
    }
    
    void loop()
    {
    	// Send locally attached sensor data here
    }```
    
    

    Thx for help


  • Mod

    @robert the debug log from the node will probably give useful information on what happens.



  • It's my debug code:

    0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RSNGA---,VER=2.3.0
    0;255;3;0;9;4 TSM:INIT
    0;255;3;0;9;6 TSF:WUR:MS=0
    0;255;3;0;9;9 TSM:INIT:TSP OK
    0;255;3;0;9;11 TSM:INIT:GW MODE
    0;255;3;0;9;14 TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;18 MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.3.0
    0;255;3;0;9;22 MCO:BGN:STP
    0;255;3;0;9;28 MCO:BGN:INIT OK,TSP=1
    

    And when push button on node:

    0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RSNGA---,VER=2.3.0
    0;255;3;0;9;4 TSM:INIT
    0;255;3;0;9;6 TSF:WUR:MS=0
    0;255;3;0;9;9 TSM:INIT:TSP OK
    0;255;3;0;9;11 TSM:INIT:GW MODE
    0;255;3;0;9;14 TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;18 MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.3.0
    0;255;3;0;9;22 MCO:BGN:STP
    0;255;3;0;9;28 MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;135435 TSF:MSG:READ,10-10-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;135441 TSF:MSG:BC
    0;255;3;0;9;135444 TSF:MSG:FPAR REQ,ID=10
    0;255;3;0;9;135447 TSF:PNG:SEND,TO=0
    0;255;3;0;9;135451 TSF:CKU:OK
    0;255;3;0;9;135453 TSF:MSG:GWL OK
    0;255;3;0;9;135762 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;137466 TSF:MSG:READ,10-10-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;137473 TSF:MSG:PINGED,ID=10,HP=1
    0;255;3;0;9;137494 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;137525 TSF:MSG:READ,10-10-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    0;255;3;0;9;137550 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    0;255;3;0;9;137578 TSF:MSG:READ,10-10-0,s=255,c=0,t=18,pt=0,l=5,sg=0:2.3.0
    10;255;0;0;18;2.3.0
    0;255;3;0;9;137603 TSF:MSG:READ,10-10-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    10;255;3;0;6;0
    0;255;3;0;9;139631 TSF:MSG:READ,10-10-0,s=255,c=3,t=11,pt=0,l=5,sg=0:Relay
    10;255;3;0;11;Relay
    0;255;3;0;9;139657 TSF:MSG:READ,10-10-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    10;255;3;0;12;1.0
    0;255;3;0;9;139680 TSF:MSG:READ,10-10-0,s=1,c=0,t=3,pt=0,l=0,sg=0:
    10;1;0;0;3;
    0;255;3;0;9;139703 TSF:MSG:READ,10-10-0,s=2,c=0,t=3,pt=0,l=0,sg=0:
    10;2;0;0;3;
    0;255;3;0;9;139725 TSF:MSG:READ,10-10-0,s=3,c=0,t=3,pt=0,l=0,sg=0:
    10;3;0;0;3;
    0;255;3;0;9;139749 TSF:MSG:READ,10-10-0,s=4,c=0,t=3,pt=0,l=0,sg=0:
    10;4;0;0;3;
    0;255;3;0;9;139771 TSF:MSG:READ,10-10-0,s=5,c=0,t=3,pt=0,l=0,sg=0:
    10;5;0;0;3;
    0;255;3;0;9;139794 TSF:MSG:READ,10-10-0,s=6,c=0,t=3,pt=0,l=0,sg=0:
    10;6;0;0;3;
    0;255;3;0;9;139820 TSF:MSG:READ,10-10-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    0;255;3;0;9;139843 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    


  • Can anyone help? Please.



  • @robert I have tried your Node sketch and it works fine with my gateway, I am using development branch 2.3.1-alpha.

    Your listing is the same as my unit, gateway stats and the node presents data to the gateway.

    If you are expecting anything else then the controller will have to send some command. Your log file shows no commands from the controller.
    I am using openHAB and it works as expected switching the relay outputs.

    Are you sure your domoticz is sending switching information?

    my Gateway Log, of Gateway startup and Node Presentation

    0 MCO:BGN:INIT GW,CP=RSNGA---,VER=2.3.1-alpha
    4 TSM:INIT
    5 TSF:WUR:MS=0
    6 TSM:INIT:TSP OK
    7 TSM:INIT:GW MODE
    9 TSM:READY:ID=0,PAR=0,DIS=0
    12 MCO:REG:NOT NEEDED
    314 GWT:TIN:IP=192.168.1.152
    1316 MCO:BGN:STP
    1318 MCO:BGN:INIT OK,TSP=1
    1320 TSM:READY:NWD REQ
    1340 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    1723 TSF:MSG:READ,10-10-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0
    1748 TSF:MSG:READ,0-10-255,s=255,c=3,t=20,pt=0,l=0,sg=0:
    1754 TSF:MSG:BC
    12392 TSF:MSG:READ,10-10-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    12397 TSF:MSG:BC
    12399 TSF:MSG:FPAR REQ,ID=10
    12401 TSF:PNG:SEND,TO=0
    12404 TSF:CKU:OK
    12405 TSF:MSG:GWL OK
    12552 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    14423 TSF:MSG:READ,10-10-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    14428 TSF:MSG:PINGED,ID=10,HP=1
    14457 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    14488 TSF:MSG:READ,10-10-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    14514 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    14547 TSF:MSG:READ,10-10-0,s=255,c=0,t=18,pt=0,l=11,sg=0:2.3.1-alpha
    14572 TSF:MSG:READ,10-10-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    16600 TSF:MSG:READ,10-10-0,s=255,c=3,t=11,pt=0,l=5,sg=0:Relay
    16626 TSF:MSG:READ,10-10-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    16650 TSF:MSG:READ,10-10-0,s=1,c=0,t=3,pt=0,l=0,sg=0:
    16672 TSF:MSG:READ,10-10-0,s=2,c=0,t=3,pt=0,l=0,sg=0:
    16695 TSF:MSG:READ,10-10-0,s=3,c=0,t=3,pt=0,l=0,sg=0:
    16717 TSF:MSG:READ,10-10-0,s=4,c=0,t=3,pt=0,l=0,sg=0:
    16740 TSF:MSG:READ,10-10-0,s=5,c=0,t=3,pt=0,l=0,sg=0:
    16762 TSF:MSG:READ,10-10-0,s=6,c=0,t=3,pt=0,l=0,sg=0:
    16788 TSF:MSG:READ,10-10-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    16825 TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    

    Gateway and node then wait for data from controller then the gateway forwards the information to the node for the relays to operate

    21545 GWT:TSA:ETH OK
    21553 GWT:RFC:MSG=0;0;3;0;2;
    21558 GWT:RFC:MSG=
    38531 GWT:RFC:MSG=10;1;1;0;2;1
    38551 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    38558 GWT:RFC:MSG=
    40156 GWT:RFC:MSG=10;1;1;0;2;0
    40177 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    40183 GWT:RFC:MSG=
    41359 GWT:RFC:MSG=10;1;1;0;2;1
    41379 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    41385 GWT:RFC:MSG=
    42444 GWT:RFC:MSG=10;1;1;0;2;0
    42465 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    42472 GWT:RFC:MSG=
    43549 GWT:RFC:MSG=10;1;1;0;2;1
    43570 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    43576 GWT:RFC:MSG=
    44527 GWT:RFC:MSG=10;1;1;0;2;0
    44548 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    44555 GWT:RFC:MSG=
    45376 GWT:RFC:MSG=10;1;1;0;2;1
    45396 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    45404 GWT:RFC:MSG=
    46257 GWT:RFC:MSG=10;1;1;0;2;0
    46278 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    46284 GWT:RFC:MSG=
    47184 GWT:RFC:MSG=10;1;1;0;2;1
    47205 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    47211 GWT:RFC:MSG=
    48029 GWT:RFC:MSG=10;1;1;0;2;0
    48050 TSF:MSG:SEND,0-0-10-10,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    48057 GWT:RFC:MSG=
    50527 GWT:RFC:MSG=10;2;1;0;2;1
    50547 TSF:MSG:SEND,0-0-10-10,s=2,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
    50554 GWT:RFC:MSG=
    51294 GWT:RFC:MSG=10;2;1;0;2;0
    51314 TSF:MSG:SEND,0-0-10-10,s=2,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
    51320 GWT:RFC:MSG=
    

    Node Debug Log

    7 MCO:BGN:INIT REPEATER,CP=RSNRA---,VER=2.3.1-alpha
    27 MCO:BGN:BFR
    28 TSM:INIT
    29 TSF:WUR:MS=0
    30 TSM:INIT:TSP OK
    32 TSM:INIT:STATID=10
    34 TSF:SID:OK,ID=10
    36 TSM:FPAR
    54 TSF:MSG:SEND,10-10-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    214 TSF:MSG:READ,0-0-10,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    219 TSF:MSG:FPAR OK,ID=0,D=1
    2062 TSM:FPAR:OK
    2063 TSM:ID
    2064 TSM:ID:OK
    2066 TSM:UPL
    2084 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2119 TSF:MSG:READ,0-0-10,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2124 TSF:MSG:PONG RECV,HP=1
    2127 TSM:UPL:OK
    2128 TSM:READY:ID=10,PAR=0,DIS=1
    2151 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    2176 TSF:MSG:READ,0-0-10,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    2209 TSF:MSG:SEND,10-10-0-0,s=255,c=0,t=18,pt=0,l=11,sg=0,ft=0,st=OK:2.3.1-alpha
    2235 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    4262 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=11,pt=0,l=5,sg=0,ft=0,st=OK:Relay
    4289 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
    4312 TSF:MSG:SEND,10-10-0-0,s=1,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4335 TSF:MSG:SEND,10-10-0-0,s=2,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4358 TSF:MSG:SEND,10-10-0-0,s=3,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4380 TSF:MSG:SEND,10-10-0-0,s=4,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4403 TSF:MSG:SEND,10-10-0-0,s=5,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4425 TSF:MSG:SEND,10-10-0-0,s=6,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4431 MCO:REG:REQ
    4451 TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    4488 TSF:MSG:READ,0-0-10,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    4493 MCO:PIM:NODE REG=1
    4495 MCO:BGN:STP
    4497 MCO:BGN:INIT OK,TSP=1
    26218 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:1
    Incoming change for sensor:1, New status: 1
    27844 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:0
    Incoming change for sensor:1, New status: 0
    29046 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:1
    Incoming change for sensor:1, New status: 1
    30133 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:0
    Incoming change for sensor:1, New status: 0
    31237 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:1
    Incoming change for sensor:1, New status: 1
    32216 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:0
    Incoming change for sensor:1, New status: 0
    33064 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:1
    Incoming change for sensor:1, New status: 1
    33946 TSF:MSG:READ,0-0-10,s=1,c=1,t=2,pt=0,l=1,sg=0:0
    

    you could try to change the setup to request the status of the relays from the controller.

    void setup()
    {
     wdt_enable(WDTO_4S);
       for (int sensor=1; sensor<=NUMBER_OF_RELAYS; sensor++) {
      request(sensor,V_STATUS);
       }
    }
    


  • It did not help. I still have to press the reset. I have domoticz for windows for testing. Could this be a problem?

    sensor<=NUMBER_OF_RELAYS; 
    

    Did I type here the number of relays?



  • @robert the NUMBER_OF_RELAYS is already defined in your sketch, just use as pasted.

    I use OpenHAB so i just tried to install Dormotiz and was supreised that it took less than a an hour to install and get working with the relays. (Most of that time was trying to get them to shown up on the dashboard)

    Dormotiz is communication fine with my node and i can switch on and off the relays from the Dashboard

    0_1539548686702_Domoricz RS485 3.png

    In the sort time i have checked i do see that the Last Seen time only changes when i change the state of the relay.

    So your program that you posted works for me with both my normal OpenHAB and the new test Domoticz.

    I think that i may be miss understanding your actual problem.


 

409
Online

8.0k
Users

8.8k
Topics

94.4k
Posts