Current News

Moderator: Mmiscool

User avatar
By Mmiscool
#48238 You must download from the link at the beginning of this thread. It is not linked on the esp basic web site yet.
User avatar
By Mmiscool
#48239 The docs are still under modification. I just updated them. Ignore my last post. I misunderstood.
User avatar
By grzesiu
#48248 Hi!
In function temp() (eval.ino) there is no
Code: Select allsensors.requestTemperatures();
so readed temperature is still 85*C

I propose that this function should be like this:
Code: Select all else if ( fname == F("temp") && num_args > 0 ) {
    // function temp(sensor #)
    // set return value
    if(sensors.getAddress(tempDeviceAddress, args[0])) {
        if( args[1] >= 9 && args[1] <= 12 ) {                    // optional argument to set resolution of DS18B20
          sensors.setResolution(tempDeviceAddress, args[1]);
        }
        sensors.requestTemperatures();
        *value = sensors.getTempC(tempDeviceAddress);
                      //sensors.getTempCByIndex(args[0]);
    return PARSER_TRUE;
        }
        else
        {
          *value_str  = "NO SENSOR";
    return PARSER_STRING;
        }
  }


in commands.ino I propose to keep temp command but with small change.
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)), PARSER_STRING);
    return;
  }

or with resolution settings and sensor detection:
Code: Select all  if ( Param0 == "temp" | Param0 == "ti")
  {
    valParam1 = GetMeThatVar(Param1).toInt();
    valParam3 = GetMeThatVar(Param3).toInt();
    if(sensors.getAddress(tempDeviceAddress, valParam1)) {
      if( valParam3 >= 9 && valParam3 <= 12 ) {                //option resolution setting for DS18B20
        sensors.setResolution(tempDeviceAddress, valParam3);
      }
        sensors.requestTemperatures();
      SetMeThatVar(Param2, String(sensors.getTempC(tempDeviceAddress)), PARSER_STRING);
    }
    else
    {
      SetMeThatVar(Param2, String(F("NO SENSOR")), PARSER_STRING);
    }
    return;
  }


keeping this readings in string is usable when You show temperature on LCD screen (still 2 digit afret comma)

Greetings: Grzesiu
User avatar
By cicciocb
#48252 [quote="Electroguard"]I did, I think it added the http:// when I did a save. I have since removed it to leave just the address and saved that, but no AP is available at that specified IP address, I can still only connect via 192.168.4.1

The module must be restarted in order to take into account the new IP.