Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
chippey5C

chippey5

@chippey5
About
Posts
12
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • NRF24L01 + PA + LNA issue
    chippey5C chippey5

    BUMP! Same issue, and I also used a 5v output just like it was stated in the instructions. Hence to this problem, I ordered 10 RFM69 instead as I read these were more stable compared to the NRF24L01.

    Troubleshooting

  • Relay Actuator not working
    chippey5C chippey5

    @TheoL Sorry for not being clear, the serialgateway (Arduino uno) is powered and connected to A raspberry Pi 3 (Which is powered by a 2.5A wall adapter). I used this arduinos 5V pin to test the RelayActuator but it still seems like the Mini Pro 3.3v is not changing the state of the D3 (for relay channel). I will check and see current and voltage from arduinos 5V and report back

    Troubleshooting

  • Relay Actuator not working
    chippey5C chippey5

    Okay so now I tried to power the relay with an external power source (Arduino Uno 5V port) but still nothing(?). I will check and try tomorrow again, because a basic HIGH/LOW loop for D3 didn't make the relay respond - which it did yesterday

    Troubleshooting

  • Relay Actuator not working
    chippey5C chippey5

    @TheoL

    So basically all the wiring is correct, the only thing that could cause problems is the actual VCC - I have split this one to power both 5V step-up regulator->Relay and the radio. I just tried the sketch today and now it is registered, but relay not responding on commands. I think I will go with a Nano instead on this one :stuck_out_tongue_winking_eye:

    Troubleshooting

  • Relay Actuator not working
    chippey5C chippey5

    Alright so I tried the solutions suggested but no luck, now the gateway seems to be rejecting it instead with the RelayActuator sketch:

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:CHKUPL:FAIL (hops=255)
    !TSM:UPL:FAIL
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:CHKUPL:FAIL (hops=255)
    !TSM:UPL:FAIL
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:CHKUPL:FAIL (hops=255)
    !TSM:UPL:FAIL
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:CHKUPL:FAIL (hops=255)
    !TSM:UPL:FAIL
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:CHKUPL:FAIL (hops=255)
    !TSM:UPL:FAIL
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=fail:0100
    !TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=1,st=fail:2.0.0
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=2,st=fail:0
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=5,sg=0,ft=3,st=fail:Relay
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=4,st=fail:1.0
    !TSP:MSG:SEND 1-1-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,ft=5,st=fail:
    Request registration...
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=6,st=fail:2
    !TSM:UPL FAIL, SNP
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSP:SEND:TNR
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSP:SEND:TNR
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSP:SEND:TNR
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    Init complete, id=1, parent=255, distance=255, registration=1
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    

    The wiring is ok, I tried to flash the DS18B20 sketch which worked:

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
    TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
    TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    TSP:MSG:READ 0-0-1 s=255,c=3,t=6,pt=0,l=1,sg=0:M
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=ok:Temperature Sensor
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.1
    Request registration...
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
    TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1
    Node registration=1
    Init complete, id=1, parent=0, distance=1, registration=1
    

    I am out of ideas now

    Troubleshooting

  • Relay Actuator not working
    chippey5C chippey5

    @Boots33 Thanks for your reply!

    I did, nothing happened. I also took out a new relay to see if there was a hardware error but no difference. It just seems that the pin doesn't go to LOW or HIGH when it is told to do. I am using an Aruino mini pro 3v3v 8Mhz Atmega328 (with a dc-dc booster to 5v for the relay to work).

    Troubleshooting

  • Relay Actuator not working
    chippey5C chippey5

    Hello guys!

    After successfully using a DS18B20 with MySensors I wanted to try controlling a relay using the "RelayActuator" example provided in the latest version. After the Relay node successfully connects to the Gateway I use domoticz to control ON/OFF to the Relay node. The relay controls a power switch which controls a light. The relay I use is a 5V 1 Channel OMRON SSR G3MB-202P Solid State Relay. There is a light showing if the relay is OPEN or CLOSED, and of course is noticable when and if the light goes on or off. The relay is powered by 5V+GND and controlled through the Channel port on the Relay which is connected to Digital Pin 3 on my Arduino.

    When I press "Off" in domoticz on the relay node, I see a message in the serial monitor for the node: "Changed to 1" or "Changed to 0". But nothing is happening. It is like if D3 is constantly set to HIGH and does not change?!

    The code I am using:

    /**
     * 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 and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    // Enable repeater functionality for this node
    //#define MY_REPEATER_FEATURE
    
    #include <SPI.h>
    #include <MySensors.h>
    
    #define RELAY_1  3  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
    #define NUMBER_OF_RELAYS 1 // 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_1; 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() {
      
    }
    
    void presentation()  
    {   
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Relay", "1.0");
    
      for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
        // Register all sensors to gw (they will be created as child devices)
        present(sensor, S_LIGHT);
      }
    }
    
    
    void loop() 
    {
      
    }
    
    void receive(const MyMessage &message) {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.type==S_LIGHT) {
         // Change relay state
         digitalWrite(message.sensor-1+RELAY_1, 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());
       } 
    }
    

    As stated in the code, the relay channel controller is set to digital pin 3. I can't see what's wrong with the code. When testing the relay directly with a simple loop, the light flashes - relay works:

    #define RELAY1 3
    
    void setup()
    
    {    
      pinMode(RELAY1, OUTPUT);       
    }
    
     void loop()
    {
       digitalWrite(RELAY1,LOW);           // Turns ON Relays 1
    
       delay(2000);                                      // Wait 2 seconds
    
       digitalWrite(RELAY1,HIGH);          // Turns Relay Off
    
       delay(2000); 
    
     }
    

    Help would be greatly appreciated!

    Troubleshooting

  • MySensors.h error when compiling: "No forward link or gateway feature activated"
    chippey5C chippey5

    @TheoL Bump. That's exactly where I'm stuck at the moment. A link here to the future thread would be awesome for other users encountering the same issue

    Troubleshooting

  • MySensors.h error when compiling: "No forward link or gateway feature activated"
    chippey5C chippey5

    Splendid, that did the trick! I received the good ol' millisWaitForConversion error, but using the "DallasTemperature" library included in the Github link fixed the problem.

    Thanks a bunch!

    Troubleshooting

  • MySensors.h error when compiling: "No forward link or gateway feature activated"
    chippey5C chippey5

    @mfalkvidd Thanks for your reply!

    I can't find the example including "Temp" nor DS18B20 in the example folder. Is it called something else? Thanks in advance

    Troubleshooting

  • MySensors.h error when compiling: "No forward link or gateway feature activated"
    chippey5C chippey5

    Hi!

    I am trying to make my first DS18B20 sensor with MySensors and trying the example found here. When compiling I get the error message:

    No forward link or gateway feature activated
    

    Even after trying to configuring MySensors.h by defining the hardware I use (with my logic thinking) in the file. The hardware I'm using at the moment is:

    • Arduino Mini Pro
    • NRF24 tranceiver
    • DS18B20

    Below is the code I am using in MySensors.h. Search for #error to find the failsafe code part.

    /**
     * @file MySensors.h
     *
     * MySensors main interface (includes all necessary code for the library)
     */
    #ifndef MySensors_h
    #define MySensors_h
    
    #include "core/MySensorsCore.h"
    
    // Detect node type
    /**
     * @def MY_GATEWAY_SERIAL
     * @brief Is set for gateway sketches.
     */
    /**
     * @def MY_IS_GATEWAY
     * @brief Is true when @ref MY_GATEWAY_SERIAL is set.
     */
    
       @def MY_NODE_TYPE
       @brief Contain a string describing the class of sketch/node (gateway/repeater/sensor).
       
    #if defined(MY_GATEWAY_SERIAL) || defined(MY_GATEWAY_W5100) || defined(MY_GATEWAY_ENC28J60) || defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_MQTT_CLIENT)
    	#define MY_GATEWAY_SERIAL
    	#define MY_IS_GATEWAY (false)
    	#define MY_NODE_TYPE "gateway"
    #elif defined(MY_REPEATER_FEATURE)
    	#define MY_IS_GATEWAY (false)
    	#define MY_NODE_TYPE "repeater"
    #else
    	#define MY_IS_GATEWAY (true)
    	#define MY_NODE_TYPE "sensor"
    #endif
    
    // Enable radio "feature" if one of the radio types was enabled
    #if defined(MY_RADIO_NRF24) || defined(MY_RADIO_RFM69) || defined(MY_RS485)
    	#define MY_RADIO_NRF24
    #endif
    
    // HARDWARE
    #if defined(ARDUINO_ARCH_ESP8266)
    	// Remove PSTR macros from debug prints
    	#undef PSTR
    	#define PSTR(x) (x)
    	//#undef F
    	//#define F(x) (x)
    	#include "core/MyHwESP8266.cpp"
    #elif defined(ARDUINO_ARCH_AVR)
    	#include "core/MyHwATMega328.cpp"
    #elif defined(ARDUINO_ARCH_SAMD)
            #include "core/MyHwSAMD.cpp"
    #endif
    
    // INCLUSION MODE
    #if defined(MY_INCLUSION_MODE_FEATURE)
    	#include "core/MyInclusionMode.cpp"
    #endif
    
    
    // SIGNING
    #if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
    	#define MY_SIGNING_SOFT
    #endif
    #include "core/MySigning.cpp"
    #include "drivers/ATSHA204/sha256.cpp"
    #if defined(MY_SIGNING_FEATURE)
    	// SIGNING COMMON FUNCTIONS
    	#if defined(MY_SIGNING_ATSHA204) && defined(MY_SIGNING_SOFT)
    		#error Only one signing engine can be activated
    	#endif
    
    	#if defined(MY_SIGNING_ATSHA204)
    		#include "core/MySigningAtsha204.cpp"
    		#include "drivers/ATSHA204/ATSHA204.cpp"
    	#elif defined(MY_SIGNING_SOFT)
    		#include "core/MySigningAtsha204Soft.cpp"
    	#endif
    #endif
    
    
    // FLASH
    #if defined(MY_OTA_FIRMWARE_FEATURE)
    	#include "drivers/SPIFlash/SPIFlash.cpp"
    	#include "core/MyOTAFirmwareUpdate.cpp"
    #endif
    
    // GATEWAY - TRANSPORT
    #if defined(MY_GATEWAY_MQTT_CLIENT)
    	#if defined(MY_RADIO_NRF24)
    		// We assume that a gateway having a radio also should act as repeater
    		#define MY_REPEATER_FEATURE
    	#endif
    	// GATEWAY - COMMON FUNCTIONS
    	// We only support MQTT Client using W5100 and ESP8266 at the moment
    	#if !(defined(MY_CONTROLLER_URL_ADDRESS) || defined(MY_CONTROLLER_IP_ADDRESS))
    		#error You must specify MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS
    	#endif
    
    	#if !defined(MY_MQTT_PUBLISH_TOPIC_PREFIX)
    		#error You must specify a topic publish prefix MY_MQTT_PUBLISH_TOPIC_PREFIX for this MQTT client
    	#endif
    	#if !defined(MY_MQTT_SUBSCRIBE_TOPIC_PREFIX)
    		#error You must specify a topic subscribe prefix MY_MQTT_SUBSCRIBE_TOPIC_PREFIX for this MQTT client
    	#endif
    	#if !defined(MY_MQTT_CLIENT_ID)
    		#error You must define a unique MY_MQTT_CLIENT_ID for this MQTT client
    	#endif
    
    	#include "drivers/PubSubClient/PubSubClient.cpp"
    	#include "core/MyGatewayTransport.cpp"
    	#include "core/MyGatewayTransportMQTTClient.cpp"
    #elif defined(MY_GATEWAY_SERIAL)
    	// GATEWAY - COMMON FUNCTIONS
    	#include "core/MyGatewayTransport.cpp"
    
    	// We currently only support one protocol at the moment, enable it.
    	#include "core/MyProtocolMySensors.cpp"
    
    	// GATEWAY - CONFIGURATION
    	#if defined(MY_RADIO_NRF24)
    		// We assume that a gateway having a radio also should act as repeater
    		#define MY_REPEATER_FEATURE
    	#endif
    	#if defined(MY_CONTROLLER_IP_ADDRESS)
    		#define MY_GATEWAY_CLIENT_MODE
    	#endif
    	#if !defined(MY_PORT)
    		#error You must define MY_PORT (controller or gatway port to open)
    	#endif
    	#if defined(MY_GATEWAY_ESP8266)
    		// GATEWAY - ESP8266
    		#include "core/MyGatewayTransportEthernet.cpp"
    	#elif defined(MY_GATEWAY_W5100)
    		// GATEWAY - W5100
    		#include "core/MyGatewayTransportEthernet.cpp"
    	#elif defined(MY_GATEWAY_ENC28J60)
    		// GATEWAY - ENC28J60
    		#if defined(MY_USE_UDP)
    			#error UDP mode is not available for ENC28J60
    		#endif
    		#include "core/MyGatewayTransportEthernet.cpp"
    	#elif defined(MY_GATEWAY_SERIAL)
    		// GATEWAY - SERIAL
    		#include "core/MyGatewayTransportSerial.cpp"
    	#endif
    #endif
    
    
    // RADIO
    #if defined(MY_RADIO_NRF24) || defined(MY_RADIO_RFM69) || defined(MY_RS485)
    	// SOFTSPI
    	#ifdef MY_SOFTSPI
    		#if defined(ARDUINO_ARCH_ESP8266)
    			#error Soft SPI is not available on ESP8266
    		#endif
    		#include "drivers/AVR/DigitalIO/DigitalIO.h"
    	#endif
    
    	#include "core/MyTransport.cpp"
    	#if (defined(MY_RADIO_NRF24) && defined(MY_RADIO_RFM69)) || (defined(MY_RADIO_NRF24) && defined(MY_RS485)) || (defined(MY_RADIO_RFM69) && defined(MY_RS485))
    		#error Only one forward link driver can be activated
    	#endif
    	#if defined(MY_RADIO_NRF24)
    		#if defined(MY_RF24_ENABLE_ENCRYPTION)
    			#include "drivers/AES/AES.cpp"
    		#endif
    		#include "drivers/RF24/RF24.cpp"
    		#include "core/MyTransportNRF24.cpp"
    	#elif defined(MY_RS485)
    		#include "drivers/AltSoftSerial/AltSoftSerial.cpp"
    		#include "core/MyTransportRS485.cpp"
    	#elif defined(MY_RADIO_RFM69)
    		#include "drivers/RFM69/RFM69.cpp"
    		#include "core/MyTransportRFM69.cpp"
    	#endif
    #endif
    
    // Make sure to disable child features when parent feature is disabled
    #if !defined(MY_RADIO_NRF24)
    	#undef MY_OTA_FIRMWARE_FEATURE
    	#undef MY_REPEATER_FEATURE
    	#undef MY_SIGNING_NODE_WHITELISTING
    	#undef MY_SIGNING_FEATURE
    #endif
    
    #if !defined(MY_GATEWAY_SERIAL)
    	#undef MY_INCLUSION_MODE_FEATURE
    	#undef MY_INCLUSION_BUTTON_FEATURE
    #endif
    
    #if !defined(MY_CORE_ONLY)
    	#if !defined(MY_GATEWAY_FEATURE) && !defined(MY_RADIO_FEATURE)
    		#error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
    	#endif
    #endif
    
    #include "core/MyCapabilities.h"
    #include "core/MyMessage.cpp"
    #include "core/MySensorsCore.cpp"
    
    #include <Arduino.h>
    
    #if !defined(MY_CORE_ONLY)
    	#if defined(ARDUINO_ARCH_ESP8266)
    		#include "core/MyMainESP8266.cpp"
    	#else
    		#include "core/MyMainDefault.cpp"
    	#endif
    #endif
    
    #endif
    // Doxygen specific constructs, not included when built normally
    // This is used to enable disabled macros/definitions to be included in the documentation as well.
    #if DOXYGEN
    #define MY_GATEWAY_SERIAL
    #endif
    

    I am greatful for any help

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular