Skip to main content ramblings of a lost one

Posts

2020

  1. starting afresh

    So during this lockdown amongst other things i decided to re kick-start all projects which had either lay in waiting or been put on hold for more time, for example some of what was on that list was

    • DONE convert old mac mini to OMV5 server
    • DONE install syncthing under OMV
    • DONE get my orgmode agenda automatically rebuilt & setup sync to my phone
    • DONE setup motioneye on a RasPi to monitor my bike
    • TODO re-write dragelec the home monitoring system
    • TODO sort photos, improve Affinity workflow
    • TODO misc python scripts to mimic a second brain
      • basically these are scripts which pull data from various sources and output to a journal so for example i use Tasker to track start & end of car journey’s which gives me time spent plus GPS coords

    There are other jobs but one i had been putting off was a new domain as my current .eu one may end up being taken to the bottom of the garden and shot because of brexit, i also wanted a more controllable, more orgmode based blogging experience but a wise man once said “Coming back to where you started is not the same as never leaving” 1 and i can fully agree, I started this journey with some knowledge of hugo, reasonable orgmode knowledge and little if any CSS & to be blunt I feel like i’ve been dragged by my testicles backwards through a privet hedge by a small bearded dwarf with penchant for dense privet, what i thought would be a relatively simple transition turned out to be taking the red pill down a sewer of broken themes, conflicts and my own lack of understanding of both hugo and how to write in orgmode for ox-hugo. So i am back where started, scratched, a little bloody but wiser and with a significant amount of respect for Kaushal who not only wrote ox-hugo but this theme i’m using.

  2. ssh in to Android

    Lockdown experiment - could i run ssh and access my phone apparently the answer is yes if using the excellent Termux which i already use for emacs on android

    Firstly in termux install openssh with

    apt install openssh

    Next run ssh-keygen to generate your own access keys at this point you can choose to add a passphrase or not.

    The next step is to either create the /.ssh/authorized_keys file or ensure that the id_rsa.pub key is added to it, so first check if the file exists;

  3. elisp + yasnippet

    I keep a journal in orgmode, ok its not updated regularly but frequently enough and i use three different devices to do so. I wanted to keep track of the device used and the location in which the entry was completed, on my phone i get round the lack of an android based emacs & orgmode by using neutrinote combined with texpand and tasker to automatically populate a text file with the necessary org heading, properties and latitude/longitude (see bottom)

2019

  1. comparing data

    After getting bokeh to graph data I started trying to compare years/months against each other eg June 2019 vs 2018 but this did not quite go to plan especially as i had forgotten that despite dragelec running for almost 5yrs the SQL recording only started in Aug 2018…

    There is another issue; the way the data is recorded; i store values everytime a signal is output from one of the sensors this means when interrogating the data i can have a different number of values per day so a straight forward export of data does not work.

  2. a year of data

    Xmas is a pretty dead time for me, so i finally got round to programming something to export the data from the sql db and then more importantly graph it.

    I have struggled for ages trying to use matplotlib and was close to giving up then i stumbled across bokeh and magic happened, a gift at xmas time :smile: in short a few simple lines of code and i now have a scalable graph of data that works on this site as well as the dashboard monitor. Below is an image of the output;

  3. PIR controlled pi display

    Dragelec did at one time update via socketio to a flask based website showing temperatures, electricity usage and local weather but rather than leaving the display on all the time i added a PIR to turn it on/off whenever a presence was detected, the following is the complete code;

    python code snippet start

  4. communication failure

    I recently set up an old first revision RPi in the garage with a DS18B20 sensor wired, set to monitor external ground temperature and broadcast via MQTT it was also intended to perform some other functions such as garage door monitor & perhaps i’d add a PIR for alerts etc

    Originally it was connected via cable to an old router running DD-WRT as a repeater and as such i could always ping it or ssh into it.

  5. it got warmer

    I thought it was warm in the garage a few weeks ago but perhaps not as warm as today 25th July 2019. The temperature sensor in the garage recorded 45.11degC and a minimum for the entire day of 17.28degC makes me reconsider keeping the old netgear router in there!

    The min/max for the 3 days (ok not full data available yet for today)

    DATE MIN MAX
    2019.07.25 17.28 45.11
    2019.07.26 20.32 29.85
    2019.07.27 17.19 20.27

    on a different note i need to figure out how to link posts, all my files are written in org with the date as the file name 20190727.org and then hugo simply converts them but i still havent figured out how to get a working link from for example the file with the date shown to another dated file

  6. a little reprieve

    A hot day for the UK - my home monitoring system reports 38.91 in the garage …. so i decided to come back in doors for a short whilst and catch up on some work i’ve neglected.

    This is from a walk down the local canal sometime ago, its quite heavily stylised but i like it;

    from the same walk just much earlier in the day, a chance photo of canoeists paddling through the mist;

  7. adding epoch time to database

    Not pretty but it works…

    After a power cut had stopped the data recording on my home monitor I decided to follow up on my earlier post of storing the date in epoch format instead of just a date/time string by converting the existing db to add an epoch column, what follows is not pretty & probably not something anyone should follow. It’s cobbled together from my beginners knowledge and of course internet searches…

  8. poor choice made at DB creation

    OK i’ve been ignoring brexit and the fact our politicians were granted a delay and promptly went on holiday :rage: so in an effort to further distract from the failings of my government i took a little jaunt into utilising the data i’ve been recording for the last 9 months and its at this point i realise that perhaps whilst my data is readable to me i should have stored dates/times in a different format to allow for automated data analysis.

  9. orgmode syntax and the agenda

    Essentially i decided (for whatever whimsical reason!) to move from the emacs diary to keeping everything in a specific org file. So previously my diary simply contained lines such as;

    elisp code snippet start

  10. Getting colder

    Brrrrr ok we dont have the snow yet here and we definitely do not have the polar vortex weather being experienced in the States but it got pretty cold this morning.

    This is recorded by dragelec and is the temperature inside my garage

    DATE TIME degC
    2019-02-03 06:28:33 -6.87
    2019-02-03 06:34:31 -7.21
    2019-02-03 06:35:24 -7.21
    2019-02-03 06:37:16 -7.21
    2019-02-03 06:49:30 -6.87
    2019-02-03 06:53:38 -6.87
    2019-02-03 06:58:33 -6.87
    2019-02-03 07:04:31 -7.35
    2019-02-03 07:05:17 -7.35
    2019-02-03 07:07:13 -7.35
    2019-02-03 07:19:32 -7.42
    2019-02-03 07:23:30 -7.42
    2019-02-03 07:28:30 -7.42
    2019-02-03 07:34:33 -7.49
    2019-02-03 07:35:11 -7.49
    2019-02-03 07:37:08 -7.49
    2019-02-03 07:49:33 -7.21
    2019-02-03 07:53:24 -7.21
    2019-02-03 07:58:31 -7.21
    2019-02-03 08:04:33 -7.14

    Yes i cheated, i exported the sql data manually and graphed it in LibreOffice i really need to program this so its automatic but hey thats another task to do :)

2018

  1. Squirrels

    Since moving house we have more birds visiting the garden and even a family of squirrels that bound playfully through the trees at the bottom of the garden on the down side there are a few mice and rats which get attracted by the bird food but thats a small price to pay to be able watch all this from the comfort of the house.

    After watching them from a distance i decided to set up a little squirrel feed station for when its really icy/cold and it did not take them long at all to figure out there was food available.

  2. black & white

    There was a time i was quite heavily in to photography, i had my own dark room working mainly in B&W. Preferred landscapes but occasionally did some model work but then i went digital and carried on for a short whilst but i think the magic disappeared.

    There was something uniquely magical about watching a print form in the solution how the image gradually faded into view and now everything is instant and before i would think about the image, plan its capture and now boom “oh that looks nice” snap click & discard once its been seen on the computer.

  3. Learning SQL and some poor python

    Since converting to storing the data in sqlite form i’ve been learning how to extract specific sections of data so i can then learn how to graph it and ultimately serve it on the home dashboard and during these experiments i can see my decode routine is not quite as efficient as i originally thought as it lets through non-numeric data so lets look at the sql extraction code and then the decode issue;

  4. home monitor conversion

    I finally have some ‘free’ time so i upgraded a few things on the pi server but not without issues,

    From jessie to stretch - network drive

    For some reason the old command for mounting a network drive on the pi which worked on jessie did not work under stretch. I kept getting a host is down fault yet it was clearly not. The line i had in fstab before was;

  5. Slow progress

    Its been a very quiet period in terms of programming, website updates etc but things have been moving slowly. I was never happy with the home made dashboard nor the background program so over the last few weeks i’ve been (time permitting) changing and tweaking such that the dashboard uses an LCARS CSS template and i’m much happier with it. The python backend has been tweaked and temperatures are moving to an sql storage of values to allow historic data analysis.

  6. politics, brexit and a short rant

    I don’t normally post or talk about politics, religion and so on because it is so argumentative and polarising and i’ve met many who are unable to discuss a counter argument or theory instead they simply become enraged and what could have been a reasonable discussion breaks down, but brexit and Syria are two topics where i feel i need to put something down.

    Syria - a war which we the UK have helped to prolong, our media is so much of a propaganda machine that it cannot ever be consider unbiased. Where are the facts, the data, the information that shows the Western nations have supported the rebels against Assad. It may well be that he is the dictator that he’s portrayed to be but we cannot sit still and say the length of the war, the violence, the deathtoll are all to be laid at his, Iran’s or Russia’s feet.

2017

  1. shortening the code

    The module i wrote for decoding the sensor data stream bugged me it was too repetitive with multiple if statements ie;

    python code snippet start