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
boumB

boum

@boum
About
Posts
8
Topics
0
Shares
0
Groups
0
Followers
0
Following
1

Posts

Recent Best Controversial

  • Help coding: adding functionality relying on MySensors-func/library (saveState/loadState) (c++)
    boumB boum

    If you cannot include the whole mysensors header, you maybe can just forward declare the function. (basically, just copy the line from the mysensors.h in your mysEeprom.cpp file.

    /*extern*/ void saveState(uint8_t pos, uint8_t value);
    // extern probably not needed, that's real old C, but you I have had 
    // surprises with the arduino compiler… You might need to add it.
    

    What's the issue with namespaces or classes?

    Troubleshooting

  • getting data from sensor to sensor
    boumB boum

    Just an opinion about this issue. If you don't want to modify your sensor code and keep it "generic", you should move the logic and communication to the controller. Domoticz (or any other controller) already receives the data. It can conditionally send it to the LCD node.
    Having the code on the gateway or on nodes makes sense if you want it to work when the controller/gateway are out of reach.

    Domoticz domoticz gettingdata

  • gw.sendVariable - library question
    boumB boum

    You should post the code you're trying to compile. But it looks like it is using an older version of MySensors. The object model with Sensor gw is deprecated now.
    To send values to the gateway, you should use MyMessage messageName(CHILD_ID, V_type_of_message);

    Development

  • AnalogRead problem
    boumB boum

    @MasMat
    The integer division might be the cause. Please try to force conversion to floating point:

      float readingSau = (1023.f / adcTmm)  - 1.f;
    
    Troubleshooting

  • Trying to automate in Domoticz
    boumB boum

    First, make sure your switch is really named 'switch', the scripts are case sensitive, so neither 'Switch' nor 'SWITCH' will work. Also, verify you don't have a trailing space in the name ('switch ').
    To check your script is run when the device is changed, add a domoticz.log first line in the execute function.
    Hope this helps.

    Domoticz

  • Node to Node communication
    boumB boum

    The destination is a state inside the MyMessage object. You need to reset it every time you change destination, from controller to the other node and back:

     send(msg_LEAK_1.setDestination(0).setSensor(LEAK_1_CHILD_ID).set(LEAK_1));
     send(msg_LEAK_1.setDestination(15).setSensor(10).set(LEAK_1));
    
    

    Or you could create a second message object for the node to node communication:

    MyMessage msg_LEAK_1(LEAK_1_CHILD_ID,V_TRIPPED);
    MyMessage msg_LEAK_to_15(10,V_TRIPPED);
    
    void setup()  
    {  
      pinMode(LEAK_1_PIN,INPUT_PULLUP);
    
      // Set destination only once, sensor is set on constructor above
      msg_LEAK_to_15.setDestination(15);
    }
    //[...]
     if (LEAK_1 != last_LEAK_1) 
     {
       send(msg_LEAK_1.set(LEAK_1));
       send(msg_LEAK_to_15.set(LEAK_1));
       last_LEAK_1 = LEAK_1;
     }
    
    Development
  • Login

  • Don't have an account? Register

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