22/09/2018

Am I too old to transition?


Am I too old to transition? My latest video hopes to clear up some of the misconceptions with people that there is an age as to when you should transition.

Some believe that once you hit a certain age in your life that you're far too old, that you've passed your prime in life, you've lost your young youthful looks and you'll never make it in the world as a woman. I wanted to clear up this misconception, that you're never too old, that age is really just a number. That what's considered to be normal is really just outdated. We are who we are, age and looks have nothing to do with it. Some people age well, some don't. But whether you're a trans woman or a cisgender woman, none of this has any bearing at all on who you really are.

20/09/2018

Sorry I've been away...


My very first video in what seems to me to being a very long time, 18 months in fact. There have been other videos of things I've been up to but this is the first video in a long time where I just sit and talk to you guys.

Thanks for stopping by and watching. Please remember to like and subscribe, but to also click the bell icon too so I can keep you up to date with things as they progress xx

18/09/2018

It seems I can spend hours and hours putting my thoughts down into words. Whether that be the creation of a brand new song for my band, or another thousand words or so for my next book, or two. And yet, the problem seems to be that I never actually spend any time writing a blog to tell you all about it.

Well, that's about to change! Over the next few months or so I want to continue writing to let you all know what I've been up to, how my next book is doing as well as all of the other exciting projects that I've done in the past that I've never written about, as well as all the new things I'd like to do.

Come back real soon for more updates xx

The Long Road Ahead - Reena Gibson


Right at the end of August my long awaited very first book "The Long Road Ahead" was finally finished and published on Amazon.

It talks in detail about some of the struggles of growing up in a loving home that became broken when in my early teens, and also of the struggle of realising I was somehow different to how people viewed me. I wasn't that young boy anymore that everyone thought I was, I was really a girl inside, trapped, playing out the gender role that society wanted to see me as.

Then one day it all came out, I just couldn't take it any more, I needed to make changes in my life. But there was a problem too. I was twenty four, madly in love with this girl I met three years before, and we were due to get married just seven months later. How could I break the news to her, without breaking her heart? How could I stay true to myself, be the girl I always should've been from birth, and when was this nightmare going to end?

My book is available on Amazon as a Kindle or paperback edition https://amzn.to/2Oxrn2t

18/02/2017

Node-Red Phone Pinger - Home Automation.

Node-Red Phone Pinger... Home Automation

As part of my home automation project that I have running on the raspberry pi, I wanted to use some sort of system where I could also automate my home security too, which is also built into my raspberry pi. I wanted to find a way to do away with the process of remembering to press buttons before you leave the house to set the alarm system and then the same again when you enter the house. It needed to be as fool proof as possible


I started thinking about using an RFID approach and build this into a key pad, coupled with an Arduino Nano and linked to my raspberry pi via I2c with the an RFID keyring attached to my keys, but again this involved me having to do something in order to arm and disarm my house alarm, it wasn't the approach I was looking for. I needed something that I would always have by my side pretty much 24 hours of the day but wouldn't cost me a huge amount of money. So, after searching the internet I found an easier solution by using my phone.


As I'm already using Node-Red throughout all of this project I found a way for Node-Red to ping my phone every 20, 30 or 60 seconds, it's really up to you. As I'm still in the testing stages I have it pinging my phone every 5 seconds.There are a few things you need to do in order to get all of this working first though.

Firstly, you'll need your WiFi on your phone active all the time, don't worry about running your battery flat, WiFi on smartphones usually only accounts for around 5% of battery usage. It will also need to have a static IP address too since you will need a way for your ping node to always ping the phone you want it to, this isn't as complicated as it first might sound but does involve you logging into your ISP router, for me it's Virgin Media and quite straight forward.

The thing I like using this approach is that you can lock your phones identity to your home network via the IP address you assign it and the MAC address built into your phone. It's a bit like using the RFID approach with a built in digital signature but of course using something that you'll have with you all the time.

Let's make a start. For Virgin Media users who have the black Super Hub 2, once you've logged in to your hub you need to click on the advance settings button (bottom right hand corner), when you get to the next page, scroll down towards the bottom to where it says DHCP, you'll need to click where it says "DHCP Reservation". On the top of the next screen you'll see a tab that says "Attached Devices", somewhere on this list you will see the IP address and the MAC address of your phone.

If you're not sure which one is yours then you can find this one your phone. For Android users, go to Settings > About Phone > Status and on the list you'll see the "IP Address" and "WiFi MAC Address" of your phone. In my case it was 192.168.0.8 and the MAC address ended with b3.

As I've done below, looking on the DHCP page of you router will reveal that your phone and it's MAC and IP address are listed.




Underneath all of this you'll see the section where you can add the IP address reservation for your phone, this means that it's only your phone with it's unique digital marker (MAC address) that can connect to your homes WiFi with the IP address that you specify. Give it a name to easily identify it, in my case I've called it "Reena Phone", after you've filled out the MAC address details you can then click the Add Reservation button.

Underneath all of this you'll see the IP Lease Table. This gives you a list of every device connected to your home network and the IP address that's been assigned to it by the DHCP server built into your router, or in my case, the IP address that you've reserved for specific devices that you have connected. You'll see here that I have five phones connected and all of their IP addresses have been reserved. Don't forget to click "Apply" before you finish.

Now we've got all of that out of the way we move onto the Node-Red part of the process. Below you can see the simple flow that I've got set up along with the two nodes, Ping, and Function.




For the Ping node it's pretty straight forward, all you need to do is enter the IP address of your phone, specify how often you want it to ping and then just name the node








With the function node we just need to add a few lines to make everything work. Because I have five devices that are going to be pinged I need to know which device is either on or off, to do this we have to set a topic message, in this case it's "Reena". I also wanted the output on this to be either a zero or one to represent on or off. The typical debug output for the ping node is either "false" showing the phones WiFi to be off or out of range, or a bunch of numbers which I imagine represents the ping time, but this is no good for what we need, which is a one or zero. So we need a simple if and else command and then output this as a message to the next node. 




In the case of the phone connected to the home WiFi network the output would be topic: Reena and msg.payload = 1 as shown here
So there it is, a simple way to use your phone as part of a home automation project which is secure and safe, but don't just take my word for it, try it for yourself. You could add extra nodes to the flow for more connected mobile phones/devices and then pull all of this into a function node to deal with the logic side of things.

If you fancy giving this a go just copy the code below and import it into Node-Red the usual way.

[{"id":"3e290137.a4488e","type":"debug","z":"c5eb5e6e.d7c1b","name":"","active":true,"complete":"false","x":671,"y":72,"wires":[]},{"id":"a39c7032.c8cc6","type":"function","z":"c5eb5e6e.d7c1b","name":"Analyze Result","func":"msg.topic=\"Reena\";\nif (msg.payload === false){\n        msg.payload = 0;\n} else{\n        msg.payload = 1;\n}\nreturn msg;","outputs":1,"noerr":0,"x":324,"y":72,"wires":[["3e290137.a4488e"]]},{"id":"89cba4fe.3d2058","type":"ping","z":"c5eb5e6e.d7c1b","name":"Reena Phone","host":"192.168.0.8","timer":"5","x":116,"y":72,"wires":[["a39c7032.c8cc6"]]}]

I'll add more for this as I go along, but If you have anything to say or add to this then please feel free to comment below, thank you.

Raspberry Pi - Upgrading Node.js, npm and installing latest Node-Red v0.16.2

I've posted this more for myself really as a reference point to come back to as I keep forgetting how to do it, but if anyone else finds this useful then even better.

As of posting this, the latest version of raspbian was released in January 2017 still doesn't come with the latest versions of npm and node.js leaving you with the rather outdated version node 0.10.29 and npm 1.4.21

I'm not sure why they pack these images with the outdated versions, it's really annoying to have to do it yourself, and then having to scour the internet all the time, especially if you're still a noob at this like I am.

Upgrading to latest Nodejs

Firstly we need to check our current version by running the following command from the terminal

$ node -v
v0.10.29

Next we need to run the update command, this doesn't actually update anything, it just downloads (or is supposed to) the latest package lists from the repositories.

$ sudo apt update

To find the latest version we need to run this

$ apt list nodejs

The output of which should look like this

Listing... Done

According to the result on the terminal though there was no upgrade available, even though I knew there is a Nodejs v7.5 out there. 

Running "$ sudo apt install nodejs" just told me that the latest version was already installed, which of course it wasn't. Running node -v still produced v0.10.29 as an output.

So let's get the latest version which we know to be v7.5

$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

This doesn't actually install anything, it just pulls everything down from the repository, what we need to do now is to install it.

$ sudo apt install nodejs

Now this is when the latest version gets installed, afterwards we run the command again

$ node -v
v7.5.0

Nodejs has now been updated to the latest version, and npm (although I didn't physically install it) is now npm v4.1.2 which you can find by using the command npm -v

On checking this now though I found that my already preinstalled version of Node-Red no longer worked and it no longer existed in the start menu either... So time for a reinstall.

As of writing the latest version of Node-Red is v0.16.2, use the following command in the terminal to install Node-Red.

sudo npm install -g node-red

Unlike the preinstall version of Node-Red, the new version doesn't work in the same way as before using the command node-red-start, instead you have to use the command "node-red" to get it started

The new version of Node-Red comes with a new interface which is really cool (I might cover this another time) and unlike the previous version where you had to stop and restart Node-Red you can now search for and install nodes from the GUI, and for the most part you don't have to do a restart, pretty cool. The downside I found though is that there is no option to get Node-Red to start up at boot time, so if you're like me where I use it for home automation, if there is a system crash or power failure which causes a reboot you'll find that Node-Red isn't running. Even an attempt at getting it to run via pm2 didn't work. ...but there is hope.

This next bit of wizardry comes from GitHub, just copy and paste the following lines (one at a time) into the terminal, these run as sudo so it's up to you how you want to do things.

sudo wget https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/nodered.service -O /lib/systemd/system/nodered.service
sudo wget https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/node-red-start -O /usr/bin/node-red-start
sudo wget https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/node-red-stop -O /usr/bin/node-red-stop
sudo chmod +x /usr/bin/node-red-st*
sudo systemctl daemon-reload

These commands update the system service starter with the start and stop commands (node-red-start and node-red-stop) which are then made executable and then the final command refreshes the systemd config.

If you run the following command this will enable Node-Red to run as a service at start up as it used to when you previously had the preinstalled version, before you upgraded. 

sudo systemctl enable nodered.service

Hope this helps some of you out there, if it does then please feel free to comment below.

27/11/2016

Oooh Ahh, just a little bit.


WOW, my first ever blog, whatever shall I post? Being dragged kicking and screaming into the 21st century can take its toll on a girl.

Anyway, let's not waste any time...

I'm quite eclectic in most things. I'm a songwriter, musician and singer. I also write too and I published my very first book in 2015 "The Long Road Ahead", you must read it sometime.

I also love computers and electronics, but most recently I'm also rediscovering an old passion for programming too, something I've not touched on since my teens. That was quite a long time ago. Current projects I'm working on is a home automation system based on the Arduino Nano and a Raspberry Pi, it's going quite well even if it has turned out to be quite a steep learning curve.

Oh yes, I occassionally like to blow things up in my own back yard too (see the blog about fireworks).