Posts

day night meter

 I recently looked at moving from a basic electricity meter to a day/night meter, and got a little caught up in the maths, so thought I write it here. Where I live, your electricity is made up of a standing monthly charge, and a usage charge.  you by default get a meter which is an all day meter and not aware of day/night.  though smart meters are coming  (smart tarriffs some other time in the future). For free you can change your meter to be a day night meter, where the day tariff is higher than the all day tariff, but the night tariff is a lot cheaper.  The standing rate is different, but lets ignore that or now. There is a magic point where your % of electrcity used during the day vs night, will be equal to the cost of the all day tariff, and expressing this lets you figure out if you will save money moving from all day to day/night.  The maths looks like this (night rate - all day rate) / (night rate - day rate) = %day  (the percent of you 24hr us...

installing windows 10 on a mac mini 2,1

Mac mini 2,1 devices are tricky, they are 64bit, but have a 32bit EFI.  booting a usb to install windows isn't going to work. my internal cdrom drive is faulty, so can't use that an external cdrom won't install either. The easiest way to install it, is to boot the mac mini into target disk mode (hold T on boot).  Then connect a firewire cable to another system.  The internal disk in the mini will now show up as a disk on this other system. create a 4GB NTFS primary partition. copy the contents of windows 10 x32 cdrom onto it make the partition active with diskpart (select disk X/select partion X/active) put a bootsector on it. from cdrom \boot\bootsect.exe /nt60 y: reboot mini, and it will install windows from the internal disk. thanks to  https://www.bleepingcomputer.com/forums/t/619313/clean-install-windows-directly-from-the-hard-disk-drive/ drivers are fun, get apple ir, bluetooth etc from bootcamp 4.0.4326 and extract the sigmatel audio drivers,...

Installing FreeBSD 13 on a mac mini 2,1

Mac mini 2,1 devices are tricky, they are 64bit, but have a 32bit EFI.  booting a usb to install Freebsd isn't going to work. my internal cdrom drive is faulty, so can't use that an external cdrom won't install either. The easiest way to install it, is to boot the mac mini into target disk mode (hold T on boot).  Then connect a fireware cable to another system.  The internal disk in the mini will now show up as a disk on this other system. install virtualbox and setup raw disk access to the firewire drive.  install freebsd in virtualbox, which is therefore writing at a raw level to the disk in the mini.  complete the install, power cycle the mini and it should boot into freebsd. everything worked for me, graphics were a problem though with freebsd, it wouldn't detect the DVI.  digging around, this fixed it installing port graphics/drm-fbsd12.0-kmod and adding        kld_list="/boot/modules/drm.ko /boot/modules/i915kms.k...

Using Oracle Autonomous database with PHP

The Oracle Cloud free tier is pretty generous, one thing that stands out is the free tier for a managed database.  Normally I would use mysql , but this is oracle and I haven't used that in a long time.  I also haven't used it with PHP These are my notes to make it work on ubuntu overview: 1. download and install oracle client and sdk 2. setup your wallet 3. setup php 4. test 1. setup and install oracle stuff mkdir /opt/oracle mkdir /opt/oracle cd /opt/oracle wget https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-basic-linux.x64-19.3.0.0.0dbru.zip wget https://download.oracle.com/otn_software/linux/instantclient/193000/instantclient-sdk-linux.x64-19.3.0.0.0dbru.zip unzip instantclient-basic-linux.x64*.zip unzip instantclient-sdk-linux.x64-*.zip echo /opt/oracle/instantclient_19_3 > /etc/ld.so.conf.d/oracle-instantclient ldconfig echo "LD_LIBRARY_PATH=/opt/oracle/instantclient_19_3:$LD_LIBRARY_PATH" >> /etc/envirome...
Making SMS work with house alarm again. Some time ago, Eir ceased the SMS center feature, so house alarms couldn't send SMS's any more.  to make things worse, they would try, and eventually time out. Asterisk can act as a service center for SMSs, so setting up a sipura ATA to take the call from the alarm panel , convert it to sip and send it to asterisks, ends up with the SMS sitting in /var/spool/asterisk/sms I used astlinux on an alix system as my asterisks setup, and added this to the extensions.conf exten => 1234/98765,1,Verbose(Receiving SMS from ${CALLERIDNUM}) exten => 1234/98765,2,Answer exten =>  1234/98765,3,Wait(1) exten =>  1234/98765,4,SMS(sms_fixedline,as) exten =>  1234/98765,5,Hangup and made sure the call was routed to this extension. you can simple cron watching the spool directory, pick the sms and forward via an sms provider with curl ...

Fire Alarms

I recently had to find someone to service and install a fire alarm and security system.  Came across https://www.nfss.ie and they were excellent

Android Auto and Google maps 'GPS not found'

I started using android Auto, and found that with my S8 , google maps would be inaccurate, and not update location, and display 'searching for gps' occasionally. This turns out to be the power saving feature enabled on the s8, it disables background location checks.  Unfortunately disabling power saving makes me need to find a charger in the middle of the day, and I pretty much get through a full day without needing a charger. So, I looked at how I can remedy this situation and settled with using Automate to create a workflow, which is triggered when car-mode is enabled.  This workflow then calls a tasker plugin called securetask , which you grant special perms to.  This plugin changes the power state , disabling power saving, so it fixes the problem.  when car mode is exited, it turns powersaving back on.