Update HA docker container

So I installed Home Assistant on a Synology NAS, using the official instructions. Now, one of my HACS Integrations started complaining about an update, but it required a newer version of Home Assistant, which I was not receiving. After a long search I figured out that using the ‘stable’ tag would not give me any updates for Home Assistant. I would have to use ‘latest’…
Unfortunately, you cannot change this in the downloaded docker Image.

So, what to do? My system was running for a month and I did not want to lose my config and history/data. Simple solution; I downloaded a new Image with the correct settings and pointed a new Container to the same /config folder on my NAS.

Since the instructions on the Home Assistant website are not quite correct for my version of Synology DSM 7.2.2-72806 Update 3, below the updated steps:

Install Home Assistant Container

Continue reading Update HA docker container

Home Assistant Formuler Z11 Remote

As mentioned before, I started using Home Assistant to create my own smart home and as it goes, you start playing with other smart devices in the home. You connect lights, heating, tv, sound system, router, and, in my case, the Formuler Z11 box. You start with little scripts to turn everything on (or off) with a single button press, instead of having to grab three separate remotes. And then you find the Universal Remote Card… a remote control card, within Home Assistant!

Standard buttons for zapping and volume were added quickly, but the ‘Groups’ and ‘Guide’ buttons turned out to be a little bit more of a challenge. But… I got it working, and below is the how-to, if you want to add custom buttons for your android tv box in Home Assistant as well.

Continue reading Home Assistant Formuler Z11 Remote

HomeWizard silly graphs

Since HomeWizard still does not show the graphs I would like to see, I started setting up Home Assistant to create my own smart home, with logging of all the stats displayed correctly. A combination of P1 import/export, Solar panels production PLUS the effect of the plug-in Batteries charging and discharging!

Look at what I see in the HomeWizard App, in three graphs(!): my ‘Home Usage’, ‘Solar Consumption’ and ‘Plug-In Battery’ profiles:

Please note these graphs are showing me using incredible amounts all during the day, PLUS the consumption at night is shown as zero watts, while of course the batteries are keeping everything running in the home, at around 250w ‘standby usage’…


So, now look at how much better it is, when all the data is combined in one simple graph:

Anything in the plus is actual usage by the home; split over battery, solar and grid as power source. And the minus shows batteries charging and power returned to the grid. This tells me exactly what I would like to know, my actual home usage!
Thank you Home Assistant!

I have tried to explain to Homewizard what is wrong with their graphs… Unfortunately it has not improved yet and I am not expecting anything anymore. Anyway, by now I cancelled my HomeWizard+ subscription.

That’s all folks!
Have a nice day…

WP_MEMORY_LIMIT or WP_MAX_MEMORY_LIMIT ?

the more you know

By default, WordPress enforces a memory limit of 40 MB. This means a single PHP script is allowed to use up to 40 MB of RAM. In certain cases, you may need to increase WordPress’ memory limit to run heavier plugins like WooCommerce or bbPress. To increase WordPress’ memory limit, you can define WP_MEMORY_LIMIT in your wp-config.php file using the line below.

define( 'WP_MEMORY_LIMIT', '256M' );

The setting above will allow WordPress to use up to 256 MB of RAM for each script, as long as the memory_limit setting in your php.ini file is 256 MB or greater. As is often the case with computing resources, setting a higher memory limit doesn’t necessarily increase the performance of your WordPress site. Since WP_MEMORY_LIMIT controls memory allocation PER SCRIPT, it’s actually in your best interest to set it as low as possible to reduce the chance of a rogue script saturating the RAM in your server.

Sometimes, it’s a good idea to tailor WordPress’ memory allocation separately for the frontend and backend. That’s where WP_MAX_MEMORY_LIMIT comes in. WP_MAX_MEMORY_LIMIT allows you to set a different memory limit for WordPress’ administration dashboard. This is useful because certain administration tasks require more RAM. Below is an example of how you can use WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT together.

define( 'WP_MEMORY_LIMIT', '64M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M');

The setting above will allocate up to 64 MB of RAM per PHP script for processes spawned from WordPress’ frontend, while administration-related scripts from the backend dashboard will be able to use up to 256 MB of RAM.

Height of CSS block containing floats

How to give that block the correct height? Read here.
How can I make a div grow its height when it has floats inside of it? I know that defining a value for the width and setting overflow to hidden works. The problem is that I need a div with the overflow visible.

The answer is this: In order for a parent to wrap around children elements which are floated, a new block formatting context needs to be set on the parent. This can be done with:

.wrap {
    display: flow-root;
}

or

.wrap {
    contain: layout;
}

The latter is a bit newer. Either of these have an advantage over overflow: auto; because they have the explicit purpose of creating a new block formatting context, while overflow: auto works as a side effect. Interestingly, flow-root can be also used alongside block or inline for better layout control. For example:

.wrap {
    display: inline flow-root;
}

Read more:

That’s all folks!
Have a nice day…