It has been a year full of decisions—some very difficult, others quite simple.
I continue to learn what it means to be a father, and it’s proving to be as complicated as I had imagined.
I’m not active on social media, and after the collapse of Twitter, I’ve been trying to revive my activity here on the blog.
On the professional front, I made the decision to leave Netcentric, where I worked for the past five years. I had a great time there, and it was a tough decision, but an exciting new opportunity came my way. I left the AEM consultancy world to join Alén Space, a company focused on building satellites. I now work on their Mission Control System software. So, while I’m still pursuing my career as a Java developer, I’m also taking on a more managerial role, leading a developer team.
In another change, after seven years of working with a Mac, I’m back on Linux—and I’m very happy about it. I also replaced my old home lab Dell T3500 workhorse with a sleeker Minisforum UM890 Pro, and it’s been amazing. For my home office setup, I’ve also switched back to OpenWRT with a Xiaomi AX3000T (with WiFi 6). I had forgotten how easy it is to configure OpenWRT.
This has also been a great year for my home automation journey. I started the year by moving Home Assistant to a small and efficient Orange Pi 3B. I’m extremely happy with the combination of Home Assistant and ESPHome. Home Assistant has become an essential part of our daily routine, mainly for climate control and air quality monitoring.
On a personal note, we moved from an apartment in the city back to our country house. This means more commuting, but it also means more comfort and a better school for our little one. I was disappointed by Santiago de Compostela—it’s turning into a theme park focused solely on tourism.
Finally, I replaced my 20-year-old diesel car with an electric one. I would have switched sooner if I had known just how great and affordable electric cars are. I chose a Tesla primarily for its price-to-technology ratio. I’m not a fan of the brand or their CEO, but the car has made living in the country much cheaper.
Actualización 16/10/2024: El precio del Model 3 ha bajado de 37.970 € a 36.470 € y os dejo mi enlace de referido para ahorrar 1.000 € más y que os salga en 35.470 €.
Acabo de cambiar mi Citroën C3 con 20 años y 350.000 Km por un Tesla Model 3. A día de hoy comprarse un eléctrico es más barato que cualquier coche de combustión, siempre que dispongas de un garaje donde cargarlo por las noches. Cada vez que digo esto aún veo caras de incredulidad, así que voy a explicar mis cuentas.
Para ello vamos a compararlo con el coche más vendido en España, el Dacia Sandero, y con su versión más barata, un gasolina de 90 CV. Primero vamos a ver los precios de compra:
Dacia Sandero Essential TCe 90CV: 13.490 € (según su web)
Son dos coches de gamas muy distintas y estamos comparando un coche de lujo contra un coche básico. En principio parece que el Model 3 es mucho más caro… no es así.
Primero las ayudas: Con el Model 3 obtienes una deducción en el IRPF de 3.000 € que cobrarás el siguiente año. Luego está el Moves III, que achatarrando tu anterior coche te van a devolver 7.500 € (o 4.500 € sin achatarrar). El Moves III se suele cobrar año y medio después, y ojo que del Moves se paga IRPF que depende de tu tramo de IRPF, pero vamos a asumir que devolvemos un 30%. Así el precio de compra del Model 3 quedaría en:
35.470 – 3.000 – 7.500 x 0,7 = 27.220 €
Por lo que pagamos 27.220 – 13.490 = 13.730 € más por el Model 3. ¿Es posible recuperarlos?
Vamos a ignorar mantenimiento, IVTM, etc. (que también son más baratos en el Model 3) para centrarnos sólo en el gran elefante en la habitación, el consumo en combustible.
Y vamos a usar datos de consumo WLTP (los reales serían más altos y por tanto más favorables al Model 3).
El Dacia consume 5,2 l / 100 km y el día que escribo esto la gasolina está a 1,549 € / l. Por lo tanto, hacer 100 km en el Dacia costaría:
5,2 l / 100 km x 1,549 € / l = 8,0548 € / 100 km
Con los eléctricos hay que acostumbrarse a usar los kWh (kilovatios hora). El consumo WLTP del Model 3 es de 13,2 kWh / 100 km. El precio del kWh depende mucho de donde carges.
Lo que le cuesta inicialmente comprender es que es muy fácil cargarlo en casa, sin necesidad de montar una Wallbox de 1.000 €, simplemente con el Mobile Connector de 200 €. Cargando en un enchufe schuko a 13 A se recuperan 19 km de autonomía por cada hora de carga. En 8 horas de carga por la noche (que es la duración del periodo de bajo coste P3 de la tarifa eléctrica, de 00:00h a 8:00h) se recuperan 152 km. Si no fueran suficientes sí que tendrías que instalar un Wallbox.
Planificándose para cargarlo por las noches en P3 con una tarifa como la Octopus 3 sale el kWh con IVA a:
0,084 x 1,21 = 0,10164 € / kWh
Y hacer 100 Km con el Tesla cuesta:
13,2 kWh / 100 km x 0,10164 € / kWh = 1,3416 € / 100 km
Y cuántos kilómetros necesitamos hacer para recuperar los 13.730 € de diferencia en el precio de compra:
13.730 / (8,0548 – 1,3416) x 100 = 204.522 km
Como os contaba, a mi anterior coche le hice más de 350.000 km. En mi caso comprar un eléctrico es un chollo.
Evidentemente la comparación sale mucho mejor contra un coche de su mismo segmento y características (pocos hay más baratos que el Model 3) y sale peor si usamos cargadores públicos (que en mi caso será de forma esporádica).
A día de hoy las únicas razones para no comprarse un eléctrico serían:
No tener garaje propio o el extraño caso de no poder instalar un enchufe en él.
No poder disponer del dinero para la inversión inicial. Es como una hipoteca inversa, pones el dinero inicialmente y lo vas recuperando mes a mes.
El también extraño caso de que la autonomía no sea suficiente.
Creerte alguno de los bulos que diariamente difunde sobre los coches eléctricos la agonizante industria del automóvil de combustión.
En mi caso me decidí por el Model 3 pero también entiendo que no es coche para todo el mundo. Es muy largo (4,7 m) y requiere estar familiarizado con pantallas táctiles. A lo mejor puedes necesitar más espacio e irte a por un Model Y. El Model 3 SR a día de hoy sigue siendo el eléctrico más eficiente del mercado según https://ev-database.org A nivel tecnológico está una década por delante de las marcas tradicionales. Algunas calidades están rateadas (como la pintura…) pero a mi parecer sigue siendo el coche más disruptivo de este siglo.
Os dejo mi enlace de referido, por si queréis ahorraros 1.000 € euros más al comprarlo:
I bought from a popular chinese store a generic Tuya smart plug with power monitoring. It was extrememly cheap, costing less than 4 EUR. And of course I bought it to play trying to flash ESPHome.
The first challenge was to open it without breaking it. I was able to open it by wrapping it in cardboard and gently tapping it with a hammer around the body.
You never know what chip you are going to find. In the past ESP8266 was very common but now they switched mainly to Beken chips. This smart switch has a T102_V1.1 board with a Realtek RTL8710BX chip:
Luckily the support for this chip was developed in the LibreTiny project:
After the flashing, if I try to power it from USB the WiFi module did not start and it causes a boot loop, but It worked perfectly plugging it into the mains power. A new device appeared in the router and I can connect to the ESPHome web dashboard.
Adding power metering
The plug includes a power metering chip: the BL0936, that is supported by ESPHome:
However, after configuring and uploading the firmware with the power meter enabled to the board, the device enters a boot loop, displaying the following error:
[D][switch:016]: 'Smart Plug 1' Turning OFF.
[D][binary_sensor:034]: 'Button': Sending initial state OFF
[C][hlw8012:014]: Setting up HLW8012...
W [ 0.109] CHANGE interrupts not supported
Luckily, after 10 reboots, the firmware enters in the “OTA safe mode”, disabling all the modules and connecting to the WiFi without the web dashboard but opening a port to allow remote flashing.
It can be fixed with the workaround of SuperXL2023 modifying the .esphome/platformio/platforms/libretiny/cores/realtek-amb/arduino/src/wiring_irq.c file and adding the lines 64 and 65:
In the ESPHome config I’m specifying the version of the framework to avoid losing this fix in an automatic update. It works perfectly after rebuilding the image with this fix and uploading it to the device.
This is the complete ESPHome configuration with power metering:
It needs to calibrate the sensor to obtain the proper values of voltage_divider, current_resistor and current_multiply. It can be done with a multimeter and entering the values in the hlw8012 page.
Now that the new Avatar movie was released, it’s time to remember what happened when the first Avatar was released in 2009: It unleashed a craze about stereoscopic 3D movies & TVs.
2010 was declared “The year of 3D TV”. Somehow it was assumed that we were going to watch TV with glasses. I remember “experts” saying ‘In the future all the TVs will be 3D”.
I went to the cinema a couple times to watch 3D movies, and at the begining it was fun to try, but I got bored soon. I also bought a TV without 3D.
There was a lack of 3D content, and some movies where converted to 3D with algorithms producing a mediocre result. Also 3D viewing was causing headaches in a lot of people.
Nintendo joined the trend in 2011 launching the 3DS, that was showing 3D without glasses. But almost everybody was using it with the 3D deactivated, and in 2013 they launched the 2DS, without the 3D.
The production of 3D TVs ended in 2016 putting an end to this trend.
I remember this every time that someone says we are going to use VR headsets for work. Glasses, stereoscopic view, trends, headaches…
Getting back to the old days where I used Emacs to code (ok, more than ten years ago), now I’m using a dark theme in Eclipse. Dark themes are less eye-stressing and now are becoming popular with editors like IntelliJ, Sublime Text and the last Visual Studio. And that’s why more people is learning to programming even to his difficulty, although there are strategies that people can use to improve their learning, so you can use all the power of your mind to learn, you could visit http://www.subconsciousmindpowertechniques.com/ to find out more about this.
The Eclipse Juno platform supports styling of the SWT widgets via CSS, but many other elements must be setup manually, so I published my CSS and setup instructions in a GitHub repository: https://github.com/albertoruibal/eclipse_dark_css
Ok, I’m supossed to be an Android developer, but i’m going back to HTML+JS for some projects, and I found that HTML5 has really powerful new APIS, these are my favourite:
WebGL: Is changing the game rules, finally advanced 3D graphics in the browser. As it’s very hard to use directly, I suggest the Three.js library
Storage:A very simple system so store data in the browser, much more powerful than cookies
Web Workers: Multithreading in Javascript, yes, now it’s possible
WebAudio: a good sound API for the web, continues having some differences between browsers, but promises to be great
And I am already using this APIs in some Mobialia web apps:
This apps are developed in Java with Google Web Toolkit (GWT), you can also view my slides: Migrating apps from Android to HTML5 via GWT. I also want to recommend the P4rgaming site, which has been one of my favorites when it comes down to getting gaming services for my video games. When it comes to playing WoW, you might find it hard to build up a sustainable sum of money. In the past for BFA and Legion i was using sites like 6Kgold and others like G2, now i simply hop off to Gold4Vanilla for all my warcraft gold needs.
Este fin de semana aparecí en el suplemento Tendencias del periódico El Gorreo Gallego. Lo que esperaba fuera una esquina de una columna resultó ser un reportaje de dos páginas (!). Sólo puedo agradecer al periodista Xabier Sanmartín y al períódico el interés demostrado. Os dejo los enlaces al artículo y al PDF:
Esta semana invitáronme a participar nun programa da televisión local de Ponteareas (Canal TEA). Falamos un pouco dos fundamentos de Android, das aplicacións de Mobialia, tablets, MiFis etc. Foi unha experiencia moi interesante e a primeira vez que vou a unha canle de Televisión.
This easter we were on London, it was a great experience and I want to share with you some travel tips:
AIRPORT
I arrived to Stansted Airport. Try to get a fligth to Heatrow or Gatwick. Stansted is 1 hour away by bus from London city center.
There are many bus companies from Stansted to London, the cheapest and fastest is Terravision (15£ with return, 14£ if you book online) but National Express (9£ single) has free WiFi.
CURRENCY
There are many currency exchange offices, but the best is to get cash on an ATM with you credit card. If your bank charges a small comission (ING Direct charges only 2.5%), is cheaper than the exchange offices.
BUS & UNDERGROUND
The city is divided into zones, all the city center is zone 1-2. You can get a “Day Travelcard” for zones 1-2 by 6.60£ (cheap compared to the 4£ of a single travel). You can buy it on the automatic machines at the entries of the tube (allows payment with credit card).
This travelcard also allows you to use the city bus on this zones (only showing the card to the driver). A great tip is to get the bus line 11, you will get a sightseeing arround the touristic zones by the price of a Day Travelcard.
CYCLE HIRE
One funny thing that you can do is to hire a bicycle on one of the many points along the city. You can do it with your credit card. First you must pay 1£ for the access to the cycle hire for 24 hours. Then, you get a cycle by obtaining a printed release code from the machine. This code is composed of “1”, “2” and “3” digits that you must type on the cycle dock to release it.
When you dock the cycle again the system charges you card with an amount depending of the time that you used the cycle. One hour costs 1£ and the prices lower as you use it more hours. By only 2£ you can get a cycle by one hour.
MUSEUMS
The British Museum and other public museums are free so don’t miss them. Quite curious that you can’t take photos with flash on the underground but the British Museum is full of unconscious tourists taking photos with flash and touching pieces from the ancient Egypt.
WIFI
It’s quite hard to find free WiFis on London, but there are lot of BT-FON spots, my advice is to became a FON member before traveling to London, buy “La Fonera” by only 39€ at http://www.fon.com and share your home ADSL. As a FON member you can use this WiFis for free.
HOTELS
We were on a Easyhotel room but I can only say that it was cheap. Easyhotel thinks that a “room with window” is an underground room with a window to a corridor without natural light. It’s also quite surprising to make fit a bed and a bathroom on 6m2.
You can also check if providerFine and providerCoarse are the same provider. When receiving location, the one received from providerFine must take precedence over the one from providerCoarse. Location’s provider can be obtained with location.getProvider():
public void onLocationChanged(Location location) {
if (location.getProvider().equals(providerFine)) {
...