Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts

Saturday, November 26, 2016

Understanding how tftpd put works - Error code 2: Access violation

Trying to install a tftp server onto Debian? Yet, not succeeding in uploading files onto the tftp server? Getting the following error?  Error code 2: Access violation

You are likely running into the following "feature" (issue) that is being described in the tftpd documentation.

The use of tftp(1) does not require an account or password on the remote system.  Due to the lack of authentication information, tftpd will allow only publicly readable files to be accessed.  Files may be written  only if they already exist and are publicly writable.  Note that this extends the concept of “public” to include all users on all hosts that can be reached through the network;

To fix this, before putting any new file in your /tftpboot directory it has to:
  1. exist 
  2. be world writable and optionally be owned by nobody
Note: Certain tftp servers for Windows do allow the direct put of a file, even if it does not exist. I did not found any that do that under Linux.

Tip from: http://myhomelab.blogspot.be/2013/09/installing-tftp-server-in-linux.html

Monday, October 24, 2016

Changing the parameters or disabling the disinfection function of a Daikin Altherma heat pump

In order to save on my energy consumption, I decided to disable the disinfection function of my Daikin Altherma heat pump. By default this function is enabled to run once a week at Friday evening. The purpose is to heat up the hot tap water boiler to a preset temperature during a certain amount of time, so that bacteria that can start to live in your boiler will be cooked to death. When speaking to Daikin, they told me that this function could be disabled, as long as you use daily or very regular hot tap water by showering e.g.

To understand how much energy the disinfection consumed, click here.

Steps to disable the disinfection function

1. Change the user level to installer. Steps can be found here.
2. Press the Back button and Navigate to the Installer Settings (Installateurinstellingen) and press OK.

3. Navigate to Hot Tap Water (Warmtapwater) and press OK.

4. Navigate to Disinfection (Desinfectie) and press OK.

5. To disable the disinfection, select Disinfection (Desinfectie) again and press OK. When asked to disable the function, change Yes (Ja) to No (Nee) via the Navigate buttons. The confirm by pressing OK.


6. Press the Back button. You are being asked to restart the heat pump. Press OK to confirm. The display will reset itself and show a message Busy (Bezig) and restart itself. Note the wrench symbol that indicates that we still have installer as user level.


7. Now you have disabled the disinfection function. Alternatively, you could also change the parameters so that the function runs during the afternoon (instead of 11pm), when there's more heat in the air to exchange into water.

Sunday, October 23, 2016

Changing the user level of a Daikin Altherma heat pump

Our Altherma Daikin heat pump at home, comes with a handy control display, you can change and tweak a lot of settings, as long as you have the right user level. Below it is explained go to go from one level to another.


The heat pump comes with 3 user levels that all allow to set different settings of the system:
  1. End-user (Eindgebruiker)
  2. Advanced end-user (Geavanceerde eindgebruiker)
  3. Installer (Installateur)
Changing to a different level can be done through the control display which has 5 buttons and navigation arrows.

  1. Top left: Information
  2. Top right: Enable/Disable
  3. Bottom left: Home
  4. Bottom right: Back (to previous menu)
  5. Center: OK

How to check if you are on the end-user level?

Now, by default the user level will be just end-user. To detect if you are end-user, press on Back (Button 4) and check the shown menu. If you only see 4 main menu options (Set Date/Time, Holidays, Select Program and User Settings), you are end-user. In Dutch the naming will be Tijd/datum instellen, Vakantie, Programma selecteren and Gebruiker instellingen.

How to go to the advanced end-user level?

To go to the advanced end-user level, while you are now in the main menu (and you see the 4 main menu options), press the Information button until the menu options change from 4 to 6.
Two additional menu options (Low noise mode and Information) will appear. Or Geluidsarme stand and Informatie will appear in Dutch.

How to go to the installer level?

To go to the installer level, still while you are in the main menu (and you see the 6 main menu options), Navigate to Information and press OK. Then Navigate to User Settings (Gebruikerinstellingen) and press OK. You will now see the current user level which should be advanced end-user. Press the Back button for 5 seconds until the user level will change to Installer. If succesful, you'll see the user level as Installer now. Press OK.
Checking the current user level being advanced end-user.

Having pressed the Back button for 5 seconds, the level changes to installer.

An additional main menu option appears, which is Installer Settings (Installateurinstellingen).


Now being installer, you can for example:
  • Allow to set a schedule when to heat your hot tap water.
  • Enable, disable or reschedule the disinfection function

How to go back to end-user level?

Press in any menu the Information button for 5 seconds, and you'll go back to the end-user level and to the home display.

Tuesday, October 4, 2016

Syntax Highlighter not working correctly with blogger.com

Having this blog, I want my code snippets to be highlighted, so that visibility is much better. There is a great syntax highlighter from Alex Gorbatchev. Unfortunately, Alex offers the files only from a HTTP host, where blogger.com expect things from a HTTPS host, if you want things to work. Luckily, the scripts can also be found on CDNJS. https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/

Installation steps are very easy. Go to the Admin section of your blog > Template > Edit HTML
In the head section add the following:

<!-- Added on 20/09/16 -->
    <link href='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shCore.css' rel='stylesheet' type='text/css'/>
    <link href='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shCore.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushCpp.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushCSharp.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushCss.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushJava.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushJScript.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushPhp.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushPython.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushRuby.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushSql.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushVb.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushXml.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushPerl.js' type='text/javascript'/>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushBash.js' type='text/javascript'/>
<!-- End of Addition -->

In the body section add the following:

<!-- Added on 20/09/16 -->
    <script language='javascript'>
      SyntaxHighlighter.config.bloggerMode = true;
      SyntaxHighlighter.all();
    </script>
<!-- End of Addition -->

Thursday, March 5, 2015

Add leading zero to integer in bash

I was composing a script that would store a file per day in the month, but wanted to have a leading zero not to mix up when dir listing. In bash, you have a couple of options.

1. Using range
#!/bin/bash
for i in {01..31}
do
   echo "Day: $i"
done

Works, but has downside that you cannot feed it with a variable.

2. Three-expression example
#!/bin/bash
for (( i=1; i<=31; i++ ))
do
   i=$(("0"$i))
   echo "Day: $i"
done

Will throw an error being: value too great for base (error token is “08”) Reason being that Bash will treat the variable as an octal, even with leading zero. Prepending the string "10#" to the front of your variable will have it treated as decimal by Bash.

3. Using printf
#!/bin/bash
for (( i=1; i<=31; i++ ))
do
   i=$(printf "%02d" $i)
   echo "Day: $i"
done

Works & easy solution, my favorite.

4. Using seq
#!/bin/bash
for i in `seq -f ‘%02g’ 1 31`
do
   echo "Day: $i"
done

Works also