Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By Mmiscool
#33303 Added this to the current source.
Thank you so much. Need all the help possible.

I did how ever change the "ti"command a bit.

To keep with the convention for the other commands the identifier for the device is first. Then the variable to place the status in to.

Code: Select alltemp deviceNo variableName


Code: Select allif ( Param0 == "temp" | Param0 == "ti")
  {
    valParam1 = GetMeThatVar(Param1).toInt();
    // call sensors.requestTemperatures() to issue a global temperature
    // request to all devices on the bus
    sensors.requestTemperatures(); // Send the command to get temperatures
   
    SetMeThatVar(Param2, String(sensors.getTempCByIndex(valParam1)));
    return;
  }
User avatar
By Rotohammer
#33322
Mmiscool wrote:I did how ever change the "ti"command a bit.

To keep with the convention for the other commands the identifier for the device is first. Then the variable to place the status in to.

Code: Select alltemp deviceNo variableName



That makes sense. Thanks for adding it in!