Do not think Binary but Ternary

Introduction

When I started my first home automation project, everything was still new and it was great when a light sensor immediately switched on the lighting when the lumen level was too low.

After creating several automations, it was not always clear whether a malfunction was caused by the (light) sensor or the actuator (broken lamp?). Time to build in an extra step: the light sensor indicates that it is getting dark and now switches a Boolean (Light On) from False to True. Followed by a second automation; When boolean (Light On) becomes True, lighting turns on. In the event of a malfunction, the value of the boolean provides the answer: sensor or lighting broken. I now frequently use booleans for situations where a status needs to be (temporarily) preserved.

It soon became time to see if another annoyance could also be solved with home automation. Perhaps you can relate? It’s laundry day, the washing machine has started, you do some other things or go out for a while, and hours later you realise that the laundry could have been taken out of the machine long ago. The wish was to send a notification to the phone after the end of the wash programme and also to play music in the house every 10 minutes until the laundry was taken out of the machine.

I won’t repeat my first solution, which I built when I was still using Homey. Just like with Homey, the washing machine is connected to a smart plug that can measure power consumption. But what now?

My solution is not to think in binary terms (the washing machine is off OR the washing machine is on and working), but in ternary terms and to add a phase: the laundry is ready (that is the phase when the laundry can be taken out of the machine).

The following graph shows a typical wash cycle; at the bottom, the power consumption in watts is plotted against time, and at the top, the status of the washing machine.

Fig. 1

Continue reading →

Diabetes en Smart Homes

For the English-language version of this article, click here.

Introductie

Een artikel over Diabetes (in de media nog al te vaak en foutief ‘Suikerziekte’ genoemd) en Smart Homes? De inzet van Home Automation kan een leven met Diabetes in positieve zin verbeteren.
Hoe? Na een korte uitleg over diabetes worden een aantal problemen en oplossingen behandeld.
Wat is Diabetes voor een ziekte? Het is goed om te weten dat er twee types Diabetes bestaan, aangeduid met ‘Type 1’ en ‘Type 2’. Het belangrijkste verschil tussen Diabetes type 1 en type 2 is de oorzaak:

Diabetes type 1:

  • Is een auto-immuunziekte.
  • Het lichaam valt de insulineproducerende cellen in de alvleesklier aan.
  • Hierdoor produceert de alvleesklier weinig tot geen insuline.
  • Komt vaak voor op jonge leeftijd.
  • Behandeling bestaat altijd uit het toedienen van insuline.

Diabetes type 2:

  • Wordt veroorzaakt door insulineresistentie, waarbij het lichaam minder gevoelig is voor insuline, en later vaak ook door een verminderde insulineproductie.
  • De alvleesklier produceert in eerste instantie nog wel insuline, maar niet voldoende of het lichaam reageert er niet goed op.
  • Komt vaker voor op latere leeftijd (‘ouderdomssuiker’), maar komt ook steeds vaker voor bij jongeren.
  • Behandeling bestaat uit een gezonde leefstijl, eventueel aangevuld met medicijnen en soms insuline.

Insuline is een hormoon dat nodig is om glucose (suiker) uit het bloed naar de lichaamscellen te transporteren, waar het als energie wordt gebruikt. Bij mensen met Diabetes type 1 produceert de alvleesklier weinig tot geen insuline. Hierdoor blijft de glucose in de bloedbaan circuleren, wat kan leiden tot een hoge bloedsuikerspiegel, op lange termijn kan dit leiden tot ernstige gezondheidsproblemen. De behandeling van Diabetes type 1 bestaat uit het toedienen van insuline, vroeger met periodieke injecties, tegenwoordig steeds vaker met een insulinepomp waardoor een beter te regelen, continue toediening van insuline mogelijk is.

De hoogte van de bloedsuikerspiegel is belangrijk, te hoog geeft gezondheidsproblemen, een te lage waarde kan leiden tot verlies van bewustzijn. De bloedsuikerspiegel kan men meten, met een vingerprik en een testapparaat. Sinds een aantal jaren zijn er continue glucosemeters (CGM’s) op de markt, die iedere 5 minuten de actuele bloedsuikerwaarde meten en middels een audiosignaal kunnen waarschuwen bij te hoge of te lage waardes. De laatste ontwikkeling is dat CGM en insulinepomp met elkaar kunnen communiceren, zodat de afgifte van insuline kan worden gestuurd (zogenaamde ‘Closed loop’ systemen).

Hoe kan een Smart Home helpen?

Ondanks hulpmiddelen als continue glucosemeters (CGM’s) en communicerende systemen lijkt Diabetes Type 1 aardig onder controle, of toch niet?

Een CGM geeft bij een te lage of een te hoge bloedsuikerspiegel een audiosignaal in de vorm van een luide pieptoon. Overdag wordt dit meestal goed opgemerkt en kan gepaste actie worden genomen om erger te voorkomen. Al vrij snel werd duidelijk dat deze pieptoon tijdens de nachtrust vaak niet, of veel te laat wordt opgemerkt.

Met Diabetes Type 1 is het ook noodzakelijk om voorafgaand aan een maaltijd waarin koolhydraten worden genuttigd insuline toe te dienen. Koolhydraten zijn aanwezig in veel voedingsmiddelen, zoals brood, aardappelen, rijst, fruit ed. Deze insulinetoediening wordt een ‘bolus’ genoemd en wordt bij voorkeur een minuut of vijftien vóór de start van de maaltijd gegeven. Vooral tijdens het bereiden van het avondeten komt het regelmatig voor dat de maaltijd al op tafel staat, maar dat de noodzakelijke bolus nog niet is toegediend.

De voornoemde situaties zijn met hulp van Home Automation te verbeteren.

Disclaimer: De hieronder beschreven oplossingen zijn behalve van een Smart Home systeem (in ons huishouden, voorheen een Homey Pro van Athom en sinds kort Home Assistant, zie: https://www.home-assistant.io/ ), afhankelijk van de beschikbaarheid van een CGM en overige apparatuur in huis.
De oplossing wordt eerst globaal beschreven en vervolgens in detail uitgewerkt op basis van Home Assistant. De beschreven oplossingen kunnen ook met andere Home Automation systemen worden gerealiseerd.

Continue reading →

Diabetes and Smart Homes

Voor de Nederlandstalige versie van dit artikel, klik hier.

Introduction

An article on Diabetes and Smart Homes? Using Home Automation can positively improve a life with Diabetes.
How? After a brief explanation of Diabetes, a number of problems and solutions are covered.
What is Diabetes? It is good to know that there are two types of Diabetes, referred to as ‘Type 1’ and ‘Type 2’. The main difference between Type 1 and Type 2 Diabetes is the cause:

Type 1 Diabetes:

  • Is an autoimmune disease.
  • The body attacks the insulin-producing cells in the pancreas.
  • As a result, the pancreas produces little or no insulin.
  • Often occurs at a young age.
  • Treatment always involves administering insulin.

Type 2 Diabetes:

  • Is caused by insulin resistance, in which the body is less sensitive to insulin, and later often by reduced insulin production.
  • The pancreas initially still produces insulin, but not enough or the body does not respond to it properly.
  • Occurs more often in later life (‘old-age diabetes’), but is also increasingly common in young people.
  • Treatment consists of a healthy lifestyle, possibly supplemented by medication and sometimes insulin.

Insulin is a hormone needed to transport glucose (sugar) from the blood to the body’s cells, where it is used as energy. The pancreas of people with Type 1 Diabetes produces little or no insulin. This keeps glucose circulating in the bloodstream, which can lead to high blood sugar levels; in the long term, this can lead to serious health problems. The treatment of Type 1 Diabetes involves the application of insulin, formerly with periodic injections, nowadays increasingly with an insulin pump, which allows a more controllable, continuous delivery of insulin.

The level of blood sugar is important, constant high values leads to health problems, low values will lead to loss of consciousness. Blood sugar levels can be measured, with a finger prick and a testing device. For several years now, continuous glucose meters (CGMs) have been on the market, which measure the current blood sugar value every 5 minutes and can warn of too high or too low values by producing an audible signal. The latest development is that CGM and insulin pump can communicate with each other to control insulin delivery (so-called ‘Closed loop’ systems).

How can a Smart Home help?

Despite devices like continuous glucose meters (CGMs) and closed loop systems, Type 1 diabetes seems to be pretty much under control, or is it?

A CGM gives an audible signal in the form of a loud beep when blood sugar levels are too low or too high. During the day, this is usually well noticed and appropriate action can be taken to prevent worse. It soon became clear that during sleep, the beeping is often not noticed, or is noticed far too late.

With Diabetes Type 1, it is also necessary to give insulin prior to a meal in which carbohydrates are consumed. Carbohydrates are present in many foods, such as bread, potatoes, rice, fruit ed. This is called a ‘bolus’ and is preferably given about 15 minutes before the start of the meal. Especially during the preparation of dinner, it frequently happens that the meal is already on the table, but the necessary bolus has not yet been given.

The aforementioned situations can be improved with the help of Home Automation.

Disclaimer: Apart from a Smart Home system (in our household, previously a Homey Pro by Athom and recently Home Assistant, see: https://www.home-assistant.io/ ), the solutions described below depend on the availability of a CGM and other equipment at home.

The solution is first described globally and then worked out in detail based on Home Assistant. The solutions described can also be realised with other Home Automation systems.

Continue reading →

Goodbye VMware, hello

I was first introduced to VMware products in 2004; ESX Server 2.5 and VirtualCenter 1.3. At that time, the product portfolio was limited. For the next 20 years, VMware products were central to my daily work. During those years, version after version of VirtualCenter appeared, ESX became ESXi, and instead of installing VirtualCenter on a Windows Server with a SQL database, appliances (thankfully) appeared. Beyond the virtualisation foundation, a complete cloud ecosystem emerged with nice products to meet market needs.

A few years later, as blogging started to become popular, a friend asked me how he could start a blog without too much effort. As an exercise, I started my own blog on WordPress.com. After helping the friend get started, there was still my practice blog.

At the time, I was doing consultancy work for clients, including many physical-to-virtual migrations and day-to-day management. Sometimes you come across issues that might be of interest to other people in the field, so why not share them on my blog?

Since 2010, I have written over 200 posts for this blog, with the main source of inspiration being my daily work for clients. The purpose of my writing has been to add something that wasn’t there before, in the hope that others might benefit from it.

As of 1 September 2024, this has come to an end for the time being, as I have retired. With the disappearance of my daily VMware inspiration, the writing of articles about Aria Operations for Logs and other products will also come to an end. I realise that the relevance of the posts is very limited due to the many updates and changes to the products, but for now the blog will remain available.

Does this mean that I will stop writing altogether? Apart from VMware products, I have many other IT related interests; Linux, Python and home automation. So I am not ruling anything out.

I would like to thank everyone who has read and commented on my posts over the past few years. All the best to you!

Export / Import Alerts in Operations for Logs

Recently, a question arose to create a large number of Aria Operations for Logs Alerts from an existing cluster in a new cluster. To date, Aria Operations for Logs lacks the option to export and then import Alerts, at least via the GUI.
Fortunately, the API offers a solution to get this done. I have written two draft PowerShell scripts for this purpose.
The first script exports all Alerts from an existing Aria Operations for Logs cluster. A selection has been added in line 113 to export only the enabled alerts (the selection can be removed from the script if necessary).
The following is relevant when using webhooks in Alerts. The export script also exports all webhooks. The reason? While importing an alerts with webhook(s), not the name, but the id of a webhook is listed. However, webhook Ids are unique to a cluster. In the new environment, though, webhooks should have the same name. The import script takes care of converting the webhook Ids during import.
The result of the export script is a .json file called export_alerts.json. An editor can be used to view the result.

The second script imports the alerts from the aforementioned export file into the new cluster. To perform the conversion of the webhook Ids, the script exports the webhooks created in the new cluster. After this, the alerts are imported.

Some notes:
First of all, the script is very basic, is written and tested with Windows PowerShell version 5. It is expected that with minimal modifications, the scripts will also work in PowerShell 7.x.
To get the whole thing working, code has been added for authentication. I often add some code to get the version of the Aria Operations for Logs cluster, as ‘proof’ that the API is working correctly.
The import script can indeed be extended with code to also create the webhooks.
BTW, the Aria Operations for Logs API is now quite extensive, almost all functionality can be configured and controlled via script these days.
As always, I thank you for reading.

Aria Suite Lifecycle – Error LCMVRLICONF40004

Recently, I wanted to start a belated upgrade of an Aria Operations for Log cluster with the help of tool VMware Aria Suite Lifecycle. The first step is running an inventory. Within seconds, error LCMVRLICONF40004 was presented.
Fig. 1
The “invalid hostname” message was not very helpful, the “show more” section provided the following information:

com.vmware.vrealize.lcm.vrli.
Exception: Cannot execute ssh commands.
Exception encountered : Session.connect: java.security.spec.
at com.vmware.vrealize.lcm.
at com.vmware.vrealize.lcm.
at java.base/java.util.
at java.base/java.util.
at java.base/java.lang.Thread.

The first step, based on the “Cannot execute ssh commands”, was checking if the nodes of the Aria Operations for Log cluster were reachable and the correctness of the root password used by Lifecycle. Result everything OK.

Next step, after some ‘googling´, I have found VMware KB “InvalidKeySpecException Error Code : ‘LCMVRNICONFIG90115’ when performing inventory sync in Aria Suite Lifecycle Manager Inventory Sync for Aria Operations for Networks (96553)” which contains a reference to error LCMVRLICONF40004.

The KB reveals the cause of the issue “Recent Aria Suite Lifecycle PSPACKs specifically version 8.14 Pspack 4 and above have hardened the SSH settings on the Aria Suite Lifecycle appliance. This can cause communication issues for products which do not support any of the newer macs or ciphers.”, so the cause is clear.

For the final fix, open KB “Steps for removing weak SHA1 algorithms and ciphers from VMware Aria Products (95835)”, mentioned here.

From the second KB, follow the instructions in section “VMware Aria Operations for Logs”, pointing to the KB “Remove SHA1 from SSH service in VMware Aria Operations for Logs 8.12.x and 8.14.x (95974)”. The third KB finally contains the steps that will solve the issue. For VMware Aria Operations for Logs version 8.12 follow the steps. It comes down to saving the current the version of the /etc/sshd/sshd_config file and make some modifications as described. Do not forget to restart the sshd daemon and repeat the steps for all nodes of the VMware Aria Operations for Logs cluster.

Now you should be able to successfully update the VMware Aria Operations for Logs cluster.

Aria Operations for Logs 8.14.1

VMware recently published VMware Aria Operations for Logs version 8.14 (8.14 Build 22564181, released on 19-10-2023).
Like most updates, this one comes with functional improvements and security enhancements.
In my opinion, the main reason to install this version is because it fixes a serious vulnerability (CVSS score 8.1), present in the previous versions since 8.6. See this bulletin for more information.

For a complete overview of the enhancements, see the 8.14 release notes. The most prominent are:

  • The product now supports the external NSX Advanced Load Balancer, providing more load-balancing configurations than the Aria Operations internal Load Balancer.
  • New Content packs are added for OpenShift and Tanzu Kubernetes Grid

Continue reading →

Aria Operations for Logs, found a bug in Access Control

It looks like VMware Aria Operations for Logs (previously Log Insight) contains a bug in the Access Control part. I will explain; Access is granted by assigning a role to users or groups. A role is a group of permissions that ultimately determines what a user is allowed to do.
For more information about the Roles and permissions in Aria Operations for logs, read my post.Fig. 1 – Four predefined Roles

Continue reading →

Aria Operations for Logs API and Workspace ONE issue

A brief description, recently I ran into a issue when working with an Aria Operations for Logs cluster configured to use Workspace One Access enabled for Active Directory support as an authentication source. Logging in via the GUI was not the problem, I was updating scripts as described in this post to work with Workspace One Access.

While working with the Aria Operations for Logs API, the first step is to authenticate. Authentication requires 3 parameters: username, password and provider.

The username and password do not require further explanation, although, one should also pay attention to the username in some cases.
The provider refers to the three supported authentication sources: Local (in case the local admin account is used), Active Directory (in case Active Directory support has been configured) and finally Workspace One Access.

The first part of the solution; the name of the provider should be written with the capital letters in the right places, like “Local”, “ActiveDirectory” and finally “vIDM” for Workspace One Access.

The second part, note the username. As an example when Workspace One Access has been enabled for an Active Directory named “acme.com”, the username should be something like “user@acme.com”. This notation will not work: “acme\user”.

I hope you can benefit from this, thank you for reading.

Aria Operations for Logs 8.12

Recently VMware released vRealize Log Insight, correction “VMware Aria Operations for Logs” version  8.12. The new name for this product had been going around for some time, but this is the first version to be released as “VMware Aria Operations for Logs” as you can see after booting the product.Fig. 1

Although things are still not always going well with the new naming as you can see below.Fig. 2

Apart from the branding, what else comes with the 8.12 version? The full overview can be found in the release-notes can be found here.

Continue reading →