Announcement

Collapse
No announcement yet.

How to read Correct Value that HS is sending to board

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to read Correct Value that HS is sending to board

    int HSvalue; //24 This is to check if HS sends a value which tells me the pump is running

    long previousMillis = 0; //22 Testing delay
    long interval = 30000; //22 testing delay 30,000 = 30 seconds
    float Hardness; //23 to convert EC to Harndess
    //************************************************************ ****

    void HSSetup() {

    //************************
    //Add YOUR SETUP HERE;
    //************************
    //CPLT INSERTS START HERE
    Serial.begin(115200); //commenting out based on latest input from Donmur & removing based on example from homeseer
    OpenAquarium.init();
    OpenAquarium.calibrateEC(point_1_cond, point_1_cal, point_2_cond, point_2_cal);
    OpenAquarium.calibratepH(calibration_point_4, calibration_point_7, calibration_point_10);
    // CPLT INSERTS END HERE

    }

    void HSloop() {

    //************************
    //Add YOUR CODE HERE;
    //************************
    /* To Send Data to Homeseer use SendToHS(Device,Value)
    Eg.. SendToHS(1,200); where 1 is the API device in homeseer and 200 is the value to send
    To Recieve data from Homeseer look up the FromHS array that is updated when the device value changes.
    Eg.. FromHS[5] would be the data from API Output device 5
    All code that is located just below this block will execute regardless of connection status!
    You can include SendToHS() calls, however when there isn't an active connection, it will just return and continue.
    If you only want code to execute when HomeSeer is connected, put it inside the if statement below.
    */

    /*Execute regardless of connection status*/


    if (IsConnected == true) {
    /*Execute ONLY when HomeSeer is connected*/

    //CPLT INSERTS STARTS HERE
    digitalWrite(HSvalue, FromHS[0]); //24 to read value from Homeseer into HSvalueSendToHS(3, HSvalue); //just for reading and checking the value that was read from homeseer
    // SendToHS(4, 999); //just for testing to be removed

    }
    } //22 this closes the bracket used for current millis
    }


    //************Do not change anything after Here*****************

  • #2
    You are not saving the value to the variable HSvalue. You are using digitalwrite which is what you want if you need to set the pin but your code is using HSvalue as the pin number and it is set to null. You need HSvalue =FromHS[0]; to set the variable and digitalWrite(20, FromHS[0]); to set the pin where 20 is the pin number.

    Greig.

    Sent from my SM-G925F using Tapatalk
    Zwave = Z-Stick, 3xHSM100 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment

    Working...
    X