Categories
Uncategorized

UniFi Protect G4 Doorbell + chime in Europe

One of the nice home improvements I always wanted to have was a smart doorbell. While looking at the options, I realized that choices I could accept were quite limited.

  • ideally poe powered solution – not feasible as of having to lay a cable to the front of the door while not doing substantial repairs in the area (plan for future)
  • something with batteries and wifi – not ideal of having to change the batteries from time to time and adding more bulk
  • solution using existing power line of the chime and cloud storage – don’t like cloud storage / associated subscriptions too much
  • using existing power line of the chime and UniFi Protect stack – the downside is UniFi hardware needed, the upside is their hardware is pretty awesome, would fill my rackmount and no subscription fees

There are multiple options for how to get into UniFi Protect, I decided to go with UniFi Dream Machine Pro to get a router with many security features. Basically means putting the ISP router in bridge mode and letting the UniFi router do the network routing + surveillance management (UniFi Protect part). A clear downside is poor support for 10Gbps networking, there are very few 10Gbps ports on the router / switches. Also the software is not ideal to say the least. But feature wise, it is pretty awesome.

Now for the installation of G4 Doorbell with a chime in Europe.

First thing to mention is that the product was not available in the UniFi store of Europe (sold out), had to order from the US to get it anytime soon.

Second thing would be that the chime (the box that actually makes the sound) has to be compatible with the power requirements of the G4 Doorbell – also preferably non-digital unless listed as compatible, and mine is not digital nor listed as compatible 🙂 . The specified power requirements are 16V to 24V of AC power, 20VA – although it also does state to consume most 12VA.

Fortunately, my existing chime probably from the 1970s (Friedlan 107 aka Honeywell D107) fits the spec by supporting 8V-16V AC power and wires are thick enough though not in the best shape – refreshed their isolation with some heat-shrinking tubes. Funny enough I discovered the chime was installed in some unsupported mode with batteries + transformer, probably batteries just closing the loop at this stage (more than 12 years of our use). After removing the batteries and wiring for transformer only, the chime still working, concluded it should work out.

Reading stuff found about G4 Doorbell in Europe, found many claims and some video evidence by Linus Media Group that the transformer supplied by G4 Doorbell in Europe package – 20VA, would not be enough for the doorbell + chime, 16V and 30VA are advised. This should be taken with a grain of salt seeing that the spec says 20VA and 12VA max usage, probably with a reserve of 8VA for the chime. However since I ordered from the US and my existing transformer was only supplying 12V, a new transformer was necessary anyway for me.

The following 2 articles explain possible setups for the G4 Doorbell in Europe:

https://lazyadmin.nl/home-network/unifi-protect-g4-doorbell-review/

  • was not applicable in my case it implies being able to connect wires between transformer and chime, which I could not do

https://blog.idave.it/2020-12-28-a-european-solution-for-the-unifi-g4-doorbell/

  • soldering needed, did not want to go there

So what I did is find a transformer (really not easy in Europe) that fulfills the claimed need for 30VA to be sure it would work, from Estonia of all places. So the setup is – transformer in basement, 220V connected, 16.5V 30VA out to 2 wires.

One of the wires goes directly to the doorbell.

The other one goes to the chime, where it is connected to a wire leaving the chime and then connected to the doorbell.

And the setup is working nicely, recommended 🙂

Categories
Latviešu

150 labākās fantastikas grāmatas

Jau ilgu laiku meklēju kādu zinātniskās fantastikas grāmatu ko biju izlasījis bērnībā kaut kad, atcerējos tikai ka tur bija runa par zvaigžņu dzēšanu, sarkanām asinīm, domu lasīšanu. Bet parastajos angliskajos avotos nekādi nevarēju atrast sev par lielu pārsteigumu. Tad ienāca prātā ka kādreiz lasīju tikai latviski, pameklēju un atradu šo 150 labāko fantastikas grāmatu sarakstu kurā bija arī man interesējošā grāmata. Pieglabāju tāpēc ka oriģinālā lapa laikam pazudusi.

Grāmatas pārlasīšana gan bija vilšanās 🙂 laikam jau priekšstati par literatūŗu un citām lietām laika gaida mainās, tomēr kļūstam par snobiem ar laiku.

Sapratu arÄ« kāpēc angliski nevarēju atrast – izskatās no franču valodas angliski kaut kādu iemeslu dēļ nav tulkota https://fr.wikipedia.org/wiki/Ceux_de_nulle_part

Categories
Gadgets IT

Synology DSM remote access slowness fix (SSL certificate)

It has been quite some time since I started using Synology as my NAS (thanks JeromeH for the suggestion!) – it has been great its software is one of a kind. Recently I experienced a problem – although the remote access using ssh tunneling / VPN is very safe, it is not very user friendly, especially for connecting from a non-rooted Android Synology apps.

Eventually I decided to give a go of just exposing the Synology NAS ports to the web making the connection as secure as possible in process.

  1. tried Synology QuickConnect – but dropped it pretty quickly a) awfully slow 2) everything is proxied over Synology servers, explains the slowness and cannot call it very secure neither
  2. DDNS with port forwarding of HTTPS ports and default (self signed) SSL certificate (443 for PhotoStation and 5001 for the rest of DSM) – very slow, very unstable, I read about the possible reasons why and understood that getting an SSL certificate for the DDNS would probably resolve the issue as apparently lot of time is spent just negotiating exceptions around the self-signed certificate etc.
  3. DDNS with port forwarding and SSL certificate, this setup was a wee more complex and expensive, but the result is really usable compared to 1 and 2:
    • had to get a SSL supporting DDNS provider, went with noip.com since it is well supported on DDNS supporting routers and since I was already using it with the free account that has to be confirmed every month which is a bit irritating anyway 🙂
    • bought a domain for this purpose (any domain provider will do), set it to be managed by noip.com DNS servers
    • bought a managed DNS service for my domain from noip.com, set up the subdomains including the one to be used for Synology remote access
    • set up DDNS ip address renewal to the new subdomains, check that it works
    • bought a RapidSSL from noip.com for the subdomain to be used for Synology remote access – there is a procedure to confirm the SSL certificate, easiest if you already point your MX records to a mailserver and can control forwarding of wildcard e-mails arriving as part of the process is to receive an email sent to the subdomain admin user
    • make sure to use the intended ports in DSM – 5001 for https (Control Panel -> Network -> DSM settings) and 443 for PhotoStation (default) – they can be forwarded by the router to different external ports
      • note – the PhotoStation is a special beast not really integrated well with DSM, it seems it ignores port settings pretty much so just assume it runs on port 443, use that with forwarding for most reliable connection
    • enter the hostname and external DSM https port in Control Panel -> External Access -> Advanced section of the DSM
    • import the SSL certificate associated with the hostname in Control Panel -> Security -> Certificate
Categories
Latviešu

Haoss Ogrē vai tomēr visā veselības sistēmā?

Izlasīju rakstu no Re: Baltica par haosu Ogres slimnīcā ar Covid-19, https://rebaltica.lv/2020/04/haoss-ogre-ka-viens-no-covid-19-upuriem-saslima-veselibas-aprupes-darbinieku-rokas/ un radās dažas pārdomas par rakstu un objektivitāti.

Pirmkārt, reģīonālo slimnīcu problēmas ar pakalpojumu kvalitāti nav nekas jauns. Gan paša ģimenē, gan arī no draugiem un paziņām dzirdēti daudzi gadījumi kad skaidrs ka veselības aprūpe reģionālās slimnīcās (manis dzirdētie konkrēti Valmierā) ir šausmīgā stāvoklī (piemēram cilvēku kam vakar bija krītamās kaites lēkmē un spēcīga aritmija, putas pa lūpām, šodien izraksta un sūta tālāk diagnosticēties pašam). Manuprāt šis ir pamatīgs akmens veselības sistēmas, nodokļu sistēmas dārziņā un tas, ka visredzamākās ir reģionālajās slimnīcas, ir tikai simptoms vispārējam haosam sistēmā pat bez Covid-19.

Tikai loÄ£iski ka ārkārtas apstākļos šādi simptomi izpaudÄ«sies vēl ļaunāk. BriesmÄ«gi, bet par Å¡o situāciju sižetus iepriekÅ¡ neesmu manÄ«jis – tā ir tāda acÄ«mredzamā lieta, par ko labāk nerunāt jo risinājuma ko varētu izsist cauri koalÄ«cijai jau Ä«sti nav, jau entos ministrus atpakaļ. Tā vietā veselÄ«bas vadÄ«ba nodarbojas ar e-veselÄ«bu un citām. uz papÄ«ra skaistākām lietām, kuras gan arÄ« totāli nevedas.

Un, protams ka gan neatliekamās palÄ«dzÄ«bas, gan slimnÄ«cas izpildÄ«jumā aizsarglÄ«dzekļu nelietoÅ¡ana ir bÅ«tiska problēma – lai gan par to Ä«stu pierādÄ«jumu rakstā nav, tikai viena pacienta radinieku teiktais.

Kaut kā nesamērÄ«gi izklausās raksta secinājumi Covid-19 sakarā, kas apkopoti zem virsraksta “Haoss Ogrē”, sākot ar to ka hronoloÄ£iski notikumi bija citā secÄ«bā, kas ir diezgan svarÄ«gi lai saprastu kontekstu.

0. Vispārējā stratēģija ir Covid-19 pacientus ārstēt RÄ«gā. Papildus tam no raksta –

“13.martā, veselÄ«bas nozares vadÄ«ba, sargājot RÄ«gas slimnÄ«cu vietas smagākajiem Covid-19 pacientiem, bija nolēmusi “vieglākos” novirzÄ«t ārstēšanai zemāka profila slimnÄ«cās. RÄ«gai tās bija JÅ«rmala, Jelgava un Ogre.”

1. 2020. gada 16. martā uz Ogres slimnīcu aizveda sievieti, kurai bija Covid-19 simptomi. Slimnīca uzskatīja ka ir augsts Covid-19 risks, veica neoficiālu ekspresstestu un tā kā tas izrādījās pozitīvs, sieviete tika aizvesta uz Latvijas Infektoloģijas Centru (LIC) un nomira. Oficiālais tests negatīvs. Tad Veselības Ministrija uzsāka pārbaudes un arī publiskajā telpā parādījās pārmetumi Ogrei, un Ogres slimnīcas versija par notikušo.

https://jauns.lv/raksts/par-veselibu/377063-vinkele-pamatigi-noskaitusies-uz-ogres-medikiem-kuri-eksperimentejusi-ar-covid-19-analizem

“Valdes priekÅ¡sēdētājs stāstÄ«ja, ka slimnÄ«cā Å¡onedēļ vienu pēc otra ieved pacientus no RÄ«gas. Neskatoties uz to, ka slimnÄ«ca no rÄ«ta esot informējusi atbildÄ«gās institÅ«cijas, ka visas trÄ«s tās rÄ«cÄ«bā esošās plauÅ¡u ventilācijas iekārtas ir aizņemtas, 16.martā Ogres slimnÄ«cā ievesta 49 gadus veca sieviete ļoti smagā stāvoklÄ«, kurai bijusi nepiecieÅ¡ama neatliekama plauÅ¡u ventilācija.

“Man tagad ir jābÅ«t ļoti piesardzÄ«gam un jānovēro savi darbinieki, vai viņi nebÅ«s inficējuÅ¡ies. Tādēļ es vakar VeselÄ«bas ministrijā lÅ«dzu pieÅ¡Ä·irt RÄ«gā esoÅ¡os rezidentÅ«ras studentus par, kuriem Ogres slimnÄ«ca maksā naudu, lai ārkārtas situācijā viņi varētu aizvietot trÅ«kstoÅ¡os mediÄ·us. Manam lÅ«gumam ministre nicinoÅ¡i atbildēja “kam tā Ogre vispār vajadzÄ«ga”,” savu saÅ¡utumu neslēpa Å irovs.

Jautājums – kāpēc, ja galvenā stratēģija ir Covid-19 pacienti RÄ«gā, cilvēkus ar Covid-19 simptomiem bez iepriekÅ¡ veikta testa veda uz Ogri, it seviÅ¡Ä·i ja vajadzÄ«ga plauÅ¡u ventilācija bet visas iekārtas jau aizņemtas?

2. 2020. gada 26 martā uz Ogres slimnīcu aizveda vīrieti, kam bija Covid-19 simptomi. Sakarā ar iepriekšējiem notikumiem un Veslības ministrijas reakciju, pacients tika pieņemts bez ekspresstestiem. Tāpat tika pieņemti citi potenciāli Covid-19 gadījumi.

Tas pats jautājums – kāpēc, ja galvenā stratēģija ir Covid-19 pacienti RÄ«gā, cilvēkus ar Covid-19 simptomiem bez iepriekÅ¡ veikta testa veda uz Ogri?

Otrs jautājums, kādi bija pēcpasākumi pirmajai epizodei, pavisam noteikti tika sākta pārbaude par situāciju, vai bija arī kādi citi, ne tik redzami veidi, kādos Veselības Ministrija vērsās pret Ogres slimnīcu, un kā šie pēcpasākumi ietekmēja notikumus slimnīcā?

“lai aizbāztu muti, mums uzreiz atsūtīja komisiju. Prasa vēl tagad sagatavot uz 130 lapām tur visādus jautājumus (..). Kad nevarēja ar visiem iepazīties, teica, ka atbrauks vēl lielākā sastāvā. Teicu, laipni lūdzam, jūs tādi patīkami cilvēki, mēs vienmēr priecāsimies, kad kāds šajā grūtajā brīdī vēl traucē darbu.”

Un treÅ¡ais jautājums (pievienots vēlāk) – http://www.ogrenet.lv/policija/46425/ – ja jau 20. martā slimnÄ«cu un tās “epidemioloÄ£isko gatavÄ«bu epidemioloÄ£iskās droÅ¡Ä«bas ietvaros” pārbaudÄ«ja VeselÄ«bas Ministrijas pārstāvji – un slimnÄ«cā ir tik svarÄ«gi pārkāpumi kā rakstā minēts – kāpēc Covid-19 potenciāli slimnieki slimnÄ«cas virzienā tika sÅ«tÄ«ti?

Uz portāla jautāto – vai pārbaudes jāveic laikā, kad ārstniecÄ«bas iestāde ir pārslogota saistÄ«bā ar Covid – 19 ierobežojoÅ¡ajiem pasākumiem un vai Å¡Ä«s pārbaudes neapgrÅ«tina slimnÄ«cas darbÄ«bu brÄ«dÄ«, kad slimnÄ«ca tā jau uzņem smagus pacientus no RÄ«gas klÄ«nikām, VI pārstāvji uzskata, ka minētā pārbaude ārstniecÄ«bas personāla darbu neesot traucējusi. Pārbaude bijusi nepiecieÅ¡ama, lai novērtētu Ogres slimnÄ«cas epidemioloÄ£isko gatavÄ«ba epidemioloÄ£iskās droÅ¡Ä«bas ietvaros.

Cik pilnÄ«gi rakstā atzÄ«tais “katrā posmā bija robi” korelē ar virsrakstu “Haoss Ogrē” nevis “Haoss veselÄ«bas sistēmā”?

Re:Baltica rekonstruēja notikumu gaitu, kas rāda – lai gan valstiski sistēma bija skaidra un iestādes skaitÄ«jās gatavas, katrā posmā bija robi, kas beidzās ar cilvēka nāvi.”

ArÄ« jāpiebilst ka “Valstiski sistēma bija skaidra” nenozÄ«mē to paÅ¡u ko “Valstiski sistēma bija racionāla / loÄ£iska”.

Kas labi sasaucās ar šo pamatīgo jautājuma zīmi:

“Kad Aleksandrs vaicāja “ātrajiem”, uz kuru no RÄ«gas slimnÄ«cām tēvu vedÄ«s, brigāde atbildēja, ka uz Ogri. Kādēļ šāds lēmums – Re:Baltica nav izdevies noskaidrot, jo, piemēram, Stradiņa slimnÄ«cā šāda profila pacienti (vecāki par 60 gadiem, ar hronisku pneimoniju un citām kaitēm vidējā vai smagā stāvoklÄ«) kopÅ¡ marta vidus ir lielākā ar “ātrajiem” atvestā grupa.

Categories
Health

Covid-19 and Latvia mid-April 2020

It is mid-April 2020.

The numbers of Latvia and Covid-19 makes me wonder – if not exploiting the advantage to improve your economic situation, perhaps at least use it as a relief for the people and businesses?

Categories
IT

Access to Facebook APIs for WordPress re-posting

Wanted to reactive a seemingly simple feature, to re-post from my WordPress to Facebook as well as other social networks.

I have been using this paid plugin, https://www.nextscripts.com/social-networks-autoposter-wordpress-plugin-pro/

Which works well for Twitter and Linkedin after some initial setup trouble.

But Facebook, since 2018, is another story. It is not enough to create an application at Facebook side, no no that would be too easy.

So there is a choice of buying a subscription to another NextScripts API, which is better but well its a yearly fee, so that excludes it for me.

The other option is to get your application approved by Facebook and main limitation is that you can only post to your Pages / Groups. And WordPress has to be in https.

What I had to do (and yes finally it seems to be working)

  1. Creating and configuring the Facebook application
  2. Configuring Auto-poster WordPress plugin
  3. App review:
  4. Confirm your identity (need to send an official identity document scan), accept use policies – which took quite some time as of manual intervention needed
  5. For the needed access, send application forms (publish, manage pages) – this is the real trouble, it was back and forth like 7 times. I also got the feeling that there is some review gateway team who don’t have a clue about IT or technical matters. What finally helped was getting to live chat with an actual reviewer who understood the use case and left a message for the gateway to let the request go through next time.
Categories
IT

Set Windows 10 background slideshow script in Powershell

I have set with every installation of Windows 10 with my profile a slideshow to change picture from a folder every X minutes. However recently I noticed that this resets from time to time and goes to one picture / slideshow over only some of the pictures that Windows has decided to keep in it’s cloud cache.

Thinking it should be easy I looked around for solutions but found out it is not that trivial (doh it is after all Microsoft 🙂 ). Finally seem to have something workable in Powershell below which you can add to startup (%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) e.g. by using a batch file that runs the poweshell script:

@rem save as a *.cmd file (add shortcut to it in startup)
@echo off
powershell .\set-slideshow.ps1
# to use this, need to create a good slideshow setup from a folder then copy the files from $dest to $source
$source = "$env:userprofile\Install\MySoft\pws\slideshow"
$dest = "$env:appdata\Microsoft\Windows\Themes"

$id = get-random
$code = @"
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32;
using System.Threading;
namespace Wallpaper {

   public class Setter$id {
      public const int SetDesktopWallpaper = 20;
      public const int UpdateIniFile = 0x01;
      public const int SendWinIniChange = 0x02;

      [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
      private static extern int SystemParametersInfo (int uAction, int uParam, string lpvPara, int fuWinIni);

      public static void SetWallpaper (string path) {
         SystemParametersInfo(SetDesktopWallpaper, 0, path, UpdateIniFile | SendWinIniChange);
      }

      public static void SetSlideshow (string path) {
         RegistryKey keyz = Registry.CurrentUser.OpenSubKey("Control Panel\\Personalization\\Desktop Slideshow", true);
		 //enable shuffle
		 keyz.SetValue(@"LastTickHigh", 0);
 		 keyz.SetValue(@"LastTickLow", 0);
		 //set to 10 minutes shuffle slideshow
		 keyz.SetValue(@"Interval", 600000);
		 keyz.SetValue(@"Shuffle", 1);
		 keyz.Close();
		 
         keyz = Registry.CurrentUser.OpenSubKey("Control Panel\\Desktop", true);
         //"Fit" style
         keyz.SetValue(@"WallpaperStyle", "10");
         keyz.SetValue(@"TileWallpaper", "0");
		 keyz.Close();
         SystemParametersInfo(SetDesktopWallpaper, 0, path, UpdateIniFile | SendWinIniChange);
		 //Thread.Sleep(20000);
      }
	  
   }
}
"@

Copy-item -Path "$source\*" -Destination $dest -Force
# don't know how and why but setting it to empty string makes shuffle working (nonexist.jpg attempt does not although it does set to a color background)
#[Wallpaper.Setter]::SetWallpaper("c:\nonexist.jpg")
Add-Type -TypeDefinition $code -Language CSharp
Invoke-Expression "[Wallpaper.Setter$id]::SetWallpaper('')"
Invoke-Expression "[Wallpaper.Setter$id]::SetSlideshow('$dest\TranscodedWallpaper')"
#Stop-process -name explorer
Categories
Uncategorized

Funeral sound track preferences 2019 update

In 2014 I apparently wrote on what would be a nice sound track for my funeral ceremony. Well, with my German-like liking and tolerance for surprises, the best option is still the one I really noticed in Watchmen, Sound of Silence by the apparently otherwise incompatible Simon & Garfunkel

Though to add one more I heard in Legion and Westworld tv series 🙂

Or the coolest revelation in terms of lyrics (bit dramatic though for my taste)

Categories
Funny

Another slow solution

Saw this small problem on YouTube, as usual got to the solution but took time + it was not very straight forward like in the video scroll below for it 🙂

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

big total square area = (2a)^2 = 4a^2
corner triangles hipotenuse Pythagorean theorem c^2 = a^2 + a^2 -> c=sqrt(2)a

one corner triangle area = big total square / 8 -> a^2 / 2

20 cm^2 = two triangles area = (a^2 / 2) + (x * sqrt(2)a) / 2
-> a^2 + x * sqrt(2)a – 40 = 0 (1)

blue area n
n = big square area minus 20 minus 32 minus 16
n = 4a^2 – 68
n also two triangles area = (a^2 / 2) + (((sqrt(2)a – x) * sqrt(2)a) / 2
->
2n = 8a^2 – 136 = a^2 + ((sqrt(2)a – x) * sqrt(2)a
7a^2 – 2a^2 + x * sqrt(2)a – 136 = 0
5a^2 + x * sqrt(2)a – 136 = 0 (2)

combining (1) and (2)
5a^2 + x * sqrt(2)a – 136 = a^2 + x * sqrt(2)a – 40

4a^2 = 96
n = 4a^2 – 68
n = 28

 

Categories
Phones

Ex-phones 2017 update

Phones I have had previously (3 more added meanwhile since 2014):

(could be that 1 to 3 phones are missing, but are considered to not important since don’t change the overall picture, ericsson -> siemens -> windows mobile -> android (HTC then Samsung) )