-->
Page 3 of 27

Re: 3.0 branch available for testing. Report bugs here.

PostPosted: Mon May 30, 2016 9:33 am
by ardhuru
The IP defination in 'Settings' works (at least for SoftAP). BUT, I cant seem to make the ESP work as a station. The AP ssid keeps showing, one can also login into it, but there's no station visible (I can look for all devices connected to my router using an Android app called 'Fing'.

Re: 3.0 branch available for testing. Report bugs here.

PostPosted: Mon May 30, 2016 10:45 am
by russm
ardhuru wrote:The IP defination in 'Settings' works (at least for SoftAP). BUT, I cant seem to make the ESP work as a station. The AP ssid keeps showing, one can also login into it, but there's no station visible (I can look for all devices connected to my router using an Android app called 'Fing'.


I am ABLE to connect to my local network and take either the DHCP address or set one in the settings for version 3.0. I haven't tried changing the IP address for the local AP yet.

Re: 3.0 branch available for testing. Report bugs here.

PostPosted: Mon May 30, 2016 11:30 am
by Mmiscool
I just updated the git hub. The temp function now does what it should.

This will not be added back as a command as it returns a value.

Any command that return returns a values is now gone and no more with this format will be created.

grzesiu wrote: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

Re: 3.0 branch available for testing. Report bugs here.

PostPosted: Mon May 30, 2016 12:26 pm
by russm
No biggie but I noticed that in the documentation, DHT.HEATINDEX for at leats the DHT11 reports in Celsius, not Fahrenheit. Original basic language reference has the same thing.