Tag: Configuration

  • Enabling USB Keyboard and Mouse to Wake-up Ubuntu from Suspension

    Enabling USB Keyboard and Mouse to Wake-up Ubuntu from Suspension

    After having a new all-in-one type of computer with Bluetooth keyboard and mouse set, I faced the problem that Ubuntu could not be waken up from suspension by using the keyboard nor the mouse. After searching for a solution for some ten minutes, I decided to make some notes after finding the best solution to fix this. My article is based on this thread.

    Let’s first check the status of USB devices:

    I my case it is the 1-1.3 device which is the keyboard and mouse set, more precisely named as HP Wireless Keyboard Mouse Kit. This can be found out by looking at the following file:

    /sys/bus/usb/devices/1-1.3/product

    Now we would like to enable all the ports.

    echo enabled > /sys/bus/usb/devices/1-1.3/power/wakeup
    echo enabled > /sys/bus/usb/devices/1-1.4/power/wakeup
    echo enabled > /sys/bus/usb/devices/1-1/power/wakeup
    echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
    echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
    echo enabled > /sys/bus/usb/devices/usb3/power/wakeup

    Make sure that works well for you. After that we want to make the script executed after every reboot.

    sudo su
    sudo nano /etc/rc.local

    Copy paste all the code rows which begin echo enabled.. to the file before exit 0.

    Exit with “ctrl+X” and save with “yes”.

    Now you should be able to wake up your computer by using a keyboard or a mouse. And the status of usb ports should be set as enabled after every reboot. In my case, looks like this:

     

     

     

  • Customizing Home Assistant

    Customizing Home Assistant

    After successfully installing and steadily running Home Assistant you may wonder where to start setting things up, not only in sense of the user interface preferences but also the actual data inside the system. In this post I will try to give a some sort of feeling of how to tweak things under the hood without touching any home automation device or automation code yet.

    This is how your Home Assistant home screen may look like in your browser window:

    Make sure you have Samba installed. You should, in case you followed my previous blog post. However, if everything is all set, you should be able to find your Home Assistant folder via the Network/Windows share -directory in your local system. On Ubuntu it may look something like this:

    Open up the config -folder. There you can find configuration.yaml -file. Open it in your favorite text editor. I suggest you to do the following:

    1. Add correct latitude and longitude. It is not neccessary yet, but you can easily find them using Google Map. Also elevation may be revised.
    2. Add correct time zone.
    3. Comment out the line 15 introduction:, this will remove the welcome banner on the home screen. Before doing so, it may be good idea to look at the links provided, you may find them useful later.
    4. On line 25 or so, uncomment api_password and create a password. This ensures your UI is not accessible for outsiders.

    Ok, now. Let’s try changing some sensor data. You should have as default the following lines:

    # Weather prediction
    sensor:
    - platform: yr

    Replace them by adding:
    # Weather Prediction
    sensor:
    - platform: time_date
    display_options:
    - 'time'
    - platform: yr
    monitored_conditions:
    - symbol
    - temperature
    - precipitation
    - windSpeed
    - pressure
    - windDirection
    - humidity
    - fog
    - cloudiness
    - dewpointTemperature

    Make sure you use right amount of white spaces, it is very important in yaml syntax. Direct copy pasting the code may not work. If you need a hint, look at the featured picture of this post.

    After saving the changes, you must restart your Home Assistant. You can do it by selecting Restart in Home Assistant domain at Services page under Developer Tools tab in the UI. After rebooting you should see some more small icons on top of the view:

    That is just an example how to configure sensors in your home screen without actually touching any real home automation devices.

    You can continue exploring the possibilities by checking out the official documentation.

    How to set up some real automation will be introduced in my next Home Assistant post, which will be out very soon.