I finally found an Ant task for WebDAV that works (I used cadaver instead because in the past none had worked for me). Thanks a lot to Ole Christian Langfjæran on Github for putting this together. But I needed an additional parameter so that the password can be retrieved from a file instead of being in the Ant script in plain text. So I forked the project and did my additions.
This post is mostly meant as a reminder for myself. When adding an email account that had long been in use to Thunderbird, I wanted to have a complete local copy of all mails from all folders. But I did not want to subscribe to hundreds of folders manually and then click each of them to trigger the download.
Luckily, there is an “extended setting” that achieves exactly what I need. You need to go the “normal” settings (not the account ones) and there to the “Advanced” tab. At the bottom there is the “Config Editor” button, which you need to click and confirm the warning.
Then set the property
mail.server.default.check_all_folders_for_new = true and close the windows.
After a few seconds Thunderbird will start downloading the entire tree of folders from your account.
For someone like me who comes from a non-embedded background (I specialize in things like EAI, SOA, etc.) the ideas of the NodeMCU firmware are really appealing. A nice scripting language, a slick GUI for rapid prototyping (ESPlorer) together with a highly active community seemed a perfect fit.
Unfortunately it did not work for me. The whole setup was unstable and I spent many hours to get a prototype (WiFi and MQTT connection) working reliably. I failed miserably with erratic behavior of the system. Sometimes a code change was “detected”, sometimes the old code was still executed. Compiling helped often but not always.
There are others who made the same experience and obviously spent more time on trying as well as the write-up (e.g. this link). I will now experiment with the Arduino IDE extension.
I feel happy for all those people who use NodeMCU without issues and hope to rejoin them as soon as possible!
After many, many years I rediscovered electronics as a hobby in 2015 and started playing around with sensors connected to an Arduino Uno R3 and Raspberry Pi. It was fun to link them with motion detection sensors and switch lamps on and off. One drawback, however, was the pricing of those components, if you want to have quite a few of them connected by WiFi.
This was when I stumbled over the ESP8266 microcontroller. It is very small, really cheap (around 2 Euros if you order in China) and has WiFi built in already. The downside, compared to an Arduino, is that you need to take care of a lot of things on your own:
- Everything runs on 3.3 volts and 5 volts will kill the thing
- You need to get a USB-to-serial converter with 3.3 volt signal level
- Flashing is less convenient, since you need to change jumpers between normal and upload mode
But there is a really vibrant community out there and many problems have already been solved. So I will start writing about various aspects of this and look forward to feedback.
There are many posts on how to set the required environment variables, namely ORACLE_HOME, after the installation of Oracle 11g Express Edition (XE). They usually tell you to change some init scripts for bash (e.g. ~/.bashrc or ~/.bash_profile). While this is a possible approach, it is more complicated than necessary and certainly not elegant.
CentOS/RHEL has a nice mechanism to add environment variables on a global basis and separately for different programs. Just check out this directory:
/etc/profile.dEach file in there sets the environment variables for just a single program, so things are kept nicely separated. The files are just normal shell scripts with regard to syntax and do not need to be executable.
And since Oracle 11g XE has already created a file with exactly the right content as part of the installation, it is just enough to create a symlink from /etc/profile.d to this file.
ln -s /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh /etc/profile.d/Just login to another shell session and check the environment variables with set. You should see, among other variables, the following values
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1Hope that helps!
When you need to start OpenHAB in debug mode, the standard approach is to run the script start_debug.sh. But on the Raspberry Pi (i.e. on Debian) this script does not exist. Instead you need to edit the file /etc/default/openhab that contains an entry DEBUG=no, which needs to be changed to
Most people I come across use
tail -f fileName to watch files. The drawback, however, is that for a closer inspection of something I had just seen, I have to abort this and change to some file viewer (where I first need to find again what I want to check). So why not use a single program that can do both things?
less fileName does this for you. What many seem to be unaware of, is that less has a built-in tail mode that can be activated with Shift-F and left with Control-C. Once back in normal view mode again, it is very easy to scroll up a few lines and inspect the interesting part of the file. And once finished, you can just press Shift-F again and are back to tail mode.
While exploring MQTT I had installed the Mosquitto message broker on my Raspberry Pi. However, the version that is in the Debian Wheezy repository is, as of this writing, really old (v0.15). So an upgrade was in order and fortunately the guys from Mosquitto have set up a Debian repo of their own and a description how to use it.
But on my system I then got the following message:
xxx@yyy:/etc/apt/sources.list.d# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
The general recommendation to solve this is run
sudo apt-get dist-upgradeI did not want to do this for various reasons. So the approach I took instead, was to simply remove the old version with
sudo apt-get remove mosquitto mosquitto-clients and re-install it, then taking the new version from the Mosquitto repo
sudo apt-get install mosquitto mosquitto-clientswhich worked nicely for me.
I have an old machine running Xubuntu 12 and quite like it. But the shutdown from the UI sometimes does not work. One possible consequence is that after the next start the window title bars are gone, as was in my case the widget to switch virtual desktops. To get this fixed a simple
rm -r ~/.cache/sessions/is enough.