Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. boum
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by boum

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

      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?

      posted in Troubleshooting
      boum
      boum
    • RE: getting data from sensor to sensor

      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.

      posted in Domoticz
      boum
      boum
    • RE: gw.sendVariable - library question

      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);

      posted in Development
      boum
      boum
    • RE: AnalogRead problem

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

        float readingSau = (1023.f / adcTmm)  - 1.f;
      
      posted in Troubleshooting
      boum
      boum
    • RE: Trying to automate in Domoticz

      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.

      posted in Domoticz
      boum
      boum
    • RE: Node to Node communication

      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;
       }
      
      posted in Development
      boum
      boum