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
zsakulZ

zsakul

@zsakul
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Send msg in background
    zsakulZ zsakul

    It's not working.

    Can I change also something in Config.h ?

    General Discussion

  • Send msg in background
    zsakulZ zsakul

    Hello

    I'm writing program for work with my waterpump.

    If the waterlevel is rich I would to turn on relay and (maybe in background_ I would like to send information to domoticz.
    Normally it works fine but if it a problem with connection to the gateway the program don't start...

    I cut code about Pump to make it easy to understand . I should see in console: "PUMP WORK" and "START"

    I get in console:
    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

    My code:

    // Enable debug prints to serial monitor
    #define MY_DEBUG

    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69

    // Enabled repeater feature for this node
    //#define MY_REPEATER_FEATURE

    #include <SPI.h>
    #include <MySensors.h>

    //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
    #define MY_TRANSPORT_DONT_CARE_MODE

    #define CHILD_ID 1 // turn on pump

    MyMessage msg(CHILD_ID,V_LIGHT);

    void setup()
    {
    //Serial.begin(115200);
    Serial.println(" START ");
    }

    void presentation() {

    // Send the sketch version information to the gateway and Controller
    sendSketchInfo("Pump", "1.0");

    // Register all sensors to gw (they will be created as child devices)
    present(CHILD_ID, S_LIGHT);

    }

    void loop() {

    ////......SOME CODE
    Serial.println("PUMP WORK");
    send(msg.set(true), true);
    }

    General Discussion
  • Login

  • Don't have an account? Register

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