Having problems saving wifi config with nodemcu - lua

Have a development esp12 (Amica) that has been working Ok for months. On a recent boot it appeared to stop connecting to my Wifi. I have the enduser setup code in the module, that connected ok, but the config was not save thru reboot.
if I connect via a terminal and do the following
cfg = {}
cfg.ssid = "SSIDHERE"
cfg.pwd = "password"
cfg.save = true
cfg.auto = false
saved = wifi.sta.config(cfg)
print (saved)
false
Have tried erasing the flash and reloading with no change.
I am building the binaries locally
branch: master
commit: 310faf7fcc9130a296f7f17021d48c6d717f5fb6
release: 3.0-master_20190907
release DTS: 201909070945
SSL: false
build type: float
LFS: 0x20000
modules: bit,enduser_setup,file,gpio,gpio_pulse,i2c,mqtt,net,node,ow,pcm,rotary,rtctime,sjson,sntp,spi,struct,tmr,uart,u8g2,wifi,ws2812,ws2812_effects
build 2019-10-15 21:16 powered by Lua 5.1.4 on SDK 3.0.1-dev(fce080e)

Related

gerrit: cannot access the settings page

The problem is that the settings page cannot be accessed. I sign in successfully by using the default administrator account admin. It redirected me to the login page and clikcing on the account showed the login page again.
The version is 3.2.2. The auth.type is DEVELOPMENT_BECOME_ANY_ACCOUNT since it is configured for a test environment. The access to the gerrit-sshd is successful. Details about the gerrit-config file are given below.
[gerrit]
basePath = git
canonicalWebUrl = http://10.7.225.79:7000/
serverId = a741248c-d502-4a4d-aed8-188ca2b8be36
[container]
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
user = gerrit
javaHome = /usr/lib/jvm/java-8-openjdk-amd64/jre
[index]
type = lucene
[auth]
type = DEVELOPMENT_BECOME_ANY_ACCOUNT
[receive]
enableSignedPush = false
[sendemail]
smtpServer = localhost
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:7000/
[cache]
directory = cache
[plugins]
allowRemoteAdmin = true
the information about version is given below:
# java
# command: java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~16.04-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
# gerrit
# command: ssh -p 29418 admin#10.7.225.79 gerrit version
gerrit version 3.2.2
I'm not sure but maybe this is the way things work when "DEVELOPMENT_BECOME_ANY_ACCOUNT" is set.
Take a look at the Gerrit documentation about this:
DEVELOPMENT_BECOME_ANY_ACCOUNT
DO NOT USE. Only for use in a development environment.
When this is the configured authentication method a hyperlink titled
Become appears in the top right corner of the page, taking the user to
a form where they can enter the username of any existing user account,
and immediately login as that account, without any authentication
taking place.

NodeMCU lua: adc.readvdd33() always returns 65535 on ESP8266

I'm trying to read the system voltage, adc.readvdd33() always returns 65535.
This is the code I'm using, obviously just like in the docs:
if (adc.force_init_mode(adc.INIT_VDD33)) then
node.restart()
return
end
print("System voltage (mV):", adc.readvdd33(0))
Output:
NodeMCU 3.0.0.0 built on nodemcu-build.com provided by frightanic.com
branch: master
commit: 310faf7fcc9130a296f7f17021d48c6d717f5fb6
release: 3.0-master_20190907
release DTS: 201909070945
SSL: true
build type: float
LFS: 0x0
modules: adc,bme280,dht,enduser_setup,file,gpio,i2c,mqtt,net,node,rtcmem,rtctime,sjson,sntp,tmr,uart,wifi,tls
build 2020-01-03 12:07 powered by Lua 5.1.4 on SDK 3.0.1-dev(fce080e)
System voltage (mV): 65535
I've read about an issue with this in older SDK versions, is this something similar or what am I doing wrong? It's the same with an ESP01, an ESP01S and an ESP12F.
Is there a limitation using adc with other packages or having something wired to a specific pin?
Unfortunately this is a known bug. We're tracking it in issue 2925, see https://github.com/nodemcu/nodemcu-firmware/issues/2925 for details.

AppEngine Ruby on Rails app does not deploy

I am having issues deploying an app of mine to Google AppEngine. It is currently live on Heroku with no issues, so I dont think the issue is with the app. I emailed back and forth with Google support for a while, and one of the things they had me try was to deploy one of their starter apps. For simplicity sake, I am asking this question from the point of view that I am simply trying to deploy their test application, not my real app.
I have downloaded the hello world app from Github, per Google's instructions.
When I go to deploy, it sticks on a certain step and will not go any further.
I have done a fresh install of the google cloud tools and have made sure to run gcloud init.
I downloaded the app from that URL and am using the included app.yaml
Here is my entire CLI output. It will sit at the same status for HOURS.
Thanks for the help.
--Tim
Timothys-MBP:2-hello-world tgwright$ gcloud auth login
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?redirect_uri=xxxxxx
Saved Application Default Credentials.
You are now logged in as [timothy.xxxxx#gmail.com].
Your current project is [xxx-gae-02]. You can change this setting by running:
$ gcloud config set project PROJECT_ID
Timothys-MBP:2-hello-world tgwright$ gcloud init
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [default] are:
Your active configuration is: [default]
[app]
suppress_change_warning = true
[core]
account = timothy.xxxxx#gmail.com
disable_usage_reporting = False
project = xxx-gae-02
Pick configuration to use:
[1] Re-initialize this configuration [default] with new settings
[2] Create a new configuration
Please enter your numeric choice: 1
Your current configuration has been set to: [default]
Pick credentials to use:
[1] timothy.xxxxx#gmail.com
[2] Log in with new credentials
Please enter your numeric choice: 1
You are now logged in as: [timothy.g.wright#gmail.com]
Pick cloud project to use:
[1] [xxx-gae-01]
[2] [xxxx-cloud01]
Please enter your numeric choice: 1
Your current project has been set to: [xxx-gae-01].
Which compute zone would you like to use as project default?
[1] [asia-east1-b]
[2] [asia-east1-a]
[3] [asia-east1-c]
[4] [europe-west1-c]
[5] [europe-west1-d]
[6] [europe-west1-b]
[7] [us-central1-c]
[8] [us-central1-b]
[9] [us-central1-f]
[10] [us-central1-a]
[11] [us-east1-d]
[12] [us-east1-b]
[13] [us-east1-c]
[14] Do not set default zone
Please enter your numeric choice: 9
Your project default compute zone has been set to [us-central1-f].
You can change it by running [gcloud config set compute/zone NAME].
Your project default compute region has been set to [us-central1].
You can change it by running [gcloud config set compute/region NAME].
Do you want to use Google's source hosting (see
"https://cloud.google.com/source-repositories/docs/") (Y/n)? n
gcloud has now been configured!
You can use [gcloud config] to change more gcloud settings.
Your active configuration is: [default]
[app]
suppress_change_warning = true
[compute]
region = us-central1
zone = us-central1-f
[core]
account = timothy.xxxx#gmail.com
disable_usage_reporting = False
project = xxx-gae-01
Timothys-MBP:2-hello-world tgwright$ gcloud auth list
Credentialed accounts:
- timothy.xxx#gmail.com (active)
To set the active account, run:
$ gcloud config set account ``ACCOUNT''
Timothys-MBP:2-hello-world tgwright$ gcloud config list
Your active configuration is: [default]
[app]
suppress_change_warning = true
[compute]
region = us-central1
zone = us-central1-f
[core]
account = timothy.xxxx#gmail.com
disable_usage_reporting = False
project = xxx-gae-01
Timothys-MBP:2-hello-world tgwright$ gcloud preview app deploy --verbosity debug
DEBUG: Running gcloud.preview.app.deploy with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.preview.app.deploy', usage=None, description="*(BETA)* This command is used to deploy both code and configuration to the App Engine\nserver. As an input it takes one or more ``DEPLOYABLES'' that should be\nuploaded. A ``DEPLOYABLE'' can be a module's .yaml file or a configuration's\n.yaml file.", version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), account=None, authority_selector=None, authorization_token_file=None, bucket=None, cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x10e936590>>, command_path=['gcloud', 'preview', 'app', 'deploy'], configuration=None, credential_file_override=None, deployables=[], docker_build=None, document=None, force=False, format=None, h=None, help=None, http_timeout=None, ignore_bad_certs=False, image_url=None, log_http=None, project=None, promote=None, quiet=None, repo_info_file=None, server=None, stop_previous_version=None, trace_email=None, trace_log=False, trace_token=None, user_output_enabled=None, verbosity='debug', version=None).
DEBUG: API endpoint: [https://appengine.googleapis.com/], API version: [v1beta4]
You are about to deploy the following modules:
- xxx-gae-01/default (from [/Users/tgwright/Google Drive/Sites/2-hello-world/app.yaml])
Deployed URL: [https://xxx-gae-01.appspot.com]
Do you want to continue (Y/n)? y
Beginning deployment...
DEBUG: Host: appengine.google.com
DEBUG: _Authenticate configuring auth; needs_auth=False
DEBUG: Sending request to https://appengine.google.com/api/vms/prepare?app_id=ebt-gae-01 headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type': 'application/octet-stream'} body=
INFO: Attempting refresh to obtain initial access_token
INFO: Refreshing access_token
If this is your first deployment, this may take a while...\DEBUG: Got response: {bucket: vm-containers.xxx-gae-01.appspot.com, path: /containers}
If this is your first deployment, this may take a while...done.
INFO: Not checking for [go] because runtime is [ruby]

How to rebuild uwsgi with xml = True

I have installed uwsgi in my server. But when I can't use command uwsgi -x django_socket.xml.
It said
uwsgi: invalid option -- 'x'
getopt_long() error
Someone told me that i should rebuild it cause i build uwsgi without xml support. Then i check the uwsgi docs.
Then i downloads the Django-2.0.4.tar.gz again, cause i remove it after i installed it last time.
And i rebuild it with command:
python uwsgiconfig.py --build
And i saw a report
pcre = True
kernel = Linux
malloc = libc
execinfo = False
ifaddrs = True
ssl = True
zlib = True
locking = pthread_mutex
plugin_dir = .
timer = none
yaml = embedded
json = False
filemonitor = inotify
routing = True
debug = False
capabilities = False
xml = False
event = epoll
but it seems does't work, the xml still false. What should i do?
install libxml2 or expat development headers and re-run make. The build system will automatically detect their availability

grails + selenium-rc plugin - cannot run sample test

I have no idea what I do wrong. I would like to use selenium-RC plugin for Grails to do some functional testing. I have created sample test using build-in script (i guess add-selenium-test), which generated (i modified it slighty):
import grails.plugins.selenium.*
import org.junit.*
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*
#Mixin(SeleniumAware)
class FirstTestTests {
#Before void setUp() {
}
#After void tearDown() {
super.tearDown()
}
#Test void something() {
selenium.open "/activate"
assertTrue selenium.isTextPresent("activate")
}
}
I configured SeleniumConfig
selenium {
slow = false // true to run tests in slow resources mode
singleWindow = true // true for single window mode, false for multi-window mode
browser = "*firefox" // can include full path to executable, default value is *firefox or *iexplore on Windows
url = "http://localhost:8080" // the base URL for tests, defaults to Grails server url
defaultTimeout = 3000 // the timeout after which selenium commands will fail
windowMaximize = true // true to maximize browser on startup
screenshot {
dir = "./target/test-reports/screenshots" // directory where screenshots are placed relative to project root
onFail = true // true to capture screenshots on test failures
}
server {
host = "localhost" // the host the selenium server will run on
port = 4444 // the port the selenium server will run on
}
userExtensions = "" // path to user extensions javascript file
}
and I then I typed
grails test-app :selenium
and it seems that everything is done correctly:
INFO 19:30:08,304 RemoteWebDriver instances should connect to: http://127.0.0.1:
4444/wd/hub org.openqa.selenium.server.SeleniumServer
Starting Selenium server on port 4444 ...
INFO 19:30:08,312 Version Jetty/5.1.x org.openqa.jetty.http.HttpServer
INFO 19:30:08,315 Started HttpContext[/selenium-server/driver,/selenium-server/d
river] org.openqa.jetty.util.Container
INFO 19:30:08,318 Started HttpContext[/selenium-server,/selenium-server] org.ope
nqa.jetty.util.Container
INFO 19:30:08,321 Started HttpContext[/,/] org.openqa.jetty.util.Container
INFO 19:30:08,326 Started org.openqa.jetty.jetty.servlet.ServletHandler#55881a8f
org.openqa.jetty.util.Container
INFO 19:30:08,328 Started HttpContext[/wd,/wd] org.openqa.jetty.util.Container
INFO 19:30:08,338 Started SocketListener on 0.0.0.0:4444 org.openqa.jetty.http.S
ocketListener
INFO 19:30:08,340 Started org.openqa.jetty.jetty.Server#42aefb01 org.openqa.jett
y.util.Container
Starting Selenium session for http://localhost:8080 ...
INFO 19:30:08,502 Checking Resource aliases org.openqa.jetty.util.Credential
INFO 19:30:08,510 Command request: getNewBrowserSession[*firefox, http://localho
st:8080, ] on session null org.openqa.selenium.server.SeleniumDriverResourceHand
ler
INFO 19:30:08,512 creating new remote session org.openqa.selenium.server.Browser
SessionFactory
INFO 19:30:08,586 Allocated session 9250557308cc4886a25100eb6c5f3d7e for http://
localhost:8080, launching... org.openqa.selenium.server.BrowserSessionFactory
INFO 19:30:08,717 Preparing Firefox profile... org.openqa.selenium.server.browse
rlaunchers.FirefoxChromeLauncher
INFO 19:30:11,726 Launching Firefox... org.openqa.selenium.server.browserlaunche
rs.FirefoxChromeLauncher
The firefox window is opened, but nothing loads and nothing seems to proceed. Do I miss something?
Sounds to me like an incompatibility between the Selenium RC plugin and the current version of your web browser. You might want to dig into the plugin's dependencies and update everything to the latest versions if you're using a newer version of the browser.
We see this with Geb ( http://www.gebish.org ) when trying to run a webdriver version that is not compatible with the driver version.
Just to add, if you use Chrome and your OS is Ubuntu, then make sure you put the full path to Chrome and make sure that the executable path references chromium-browser and NOT google-chrome.
So your SeleniumConfig should look like this with the relevant line in double asterisks:
selenium {
slow = false
singleWindow = true
**browser = "*googlechrome /usr/bin/chromium-browser"**
url = null
defaultTimeout = 60000
windowMaximize = false
screenshot {
dir = "./target/test-reports/screenshots"
onFail = false
}
server {
host = "localhost"
port = 4444
}
userExtensions = ""
}

Resources