Solar Powered

So we finally did it. We got solar panels installed on the roof.

I’ve been sceptical about it since our house is facing east/west and for the highest efficiency you want south facing roof. But it was explained to me that with a east/west roof you can put panels on both sides to get solar electricity from when the sun goes up until it goes down. It might not be as efficient per solar panel but when it comes to getting the most amount of hours out of your installation it’s actually pretty good even if you have to pay more for more panels.

And after this winter with very high electric bills, finding out some of that was imported “brown” electricity and also finding out we’d consume about 16,000kWh annually, we decided to give it a shot. So we invested about $20,000 for an installation that would generate about 8,500kWh per year and got a company to do the entire installation for us, from climbing on the roof to hooking it up, they handled it all.

And now, after less than three months it’s produced over 4,000kwh! Granted, those months have been June-July-August but still. Also the electric bill have so far been in the negative, meaning they actually owe us money!

So so far we’re pretty damn happy about it. Fortunately we don’t have to look at our own roof much 🙂

Between 60-70 kWh per day in July!

Finally Double Vaccinated

Yay – I ‘m finally fully vaccinated to combat covid19 should I get it!

During this entire pandemic I’ve been trying to be cautious – staying at home as much as possible, avoid crowded places, not going out to restaurants or anything like that, order things on the web, basically doing my best to limit the risk of getting covid. But at the same time you still want to live, not just survive right so there’s been a few exceptions. I’ve had to take my woman out to dinner a few times and we’ve had to go on a crowded boat to Gotland and so on. I haven’t been panicking about “oh my god I’ll die if I get it!”. I’ve followed the statistics and risk of dying and I’ve been countering them as best as I can. For example I’ve started to… exercise! Yeah I know, but when statistics show that the biggest contributing factor to sever Covid, besides age, is obesity then you bet I’m on that treadmill!

But now that I’m fully vaccinated, how much of this will change? Covid hasn’t gone away and the mask wearing is still a thing for me to protect others. So until the booster shot I think I’m still going to be somewhat conservative of being in crowded places.

As far as going back to work, the biggest issue there is the actual going to work. They still recommend people working from home and one of the reasons is to avoid crowded trains and buses and since I can’t take the car to work (way too expensive) that means I’ll be working from home until either told by my superior I can’t or the recommendation goes away in September. But I’ll miss it, even if I haven’t been as productive as I would have been at work it’s still been way better for us as a household with me being home more and not having to spend about 3 hours commuting.

Exporting Assets from Freshservice using Powershell

I recently got a request to write an automation to check the warranty status of all our computers. Simply request, huh?

I decided the best way was to write a script that would export all the assets from our Freshservice instance and get the serial number of them. The next stage is to write a script that actually checks the warranty status with HP, but currently their warranty API is offline so that will come later. Right now we’re only exporting the assets and getting the serials from Freshservice.

You will need to find your API key in your profile for Fresh, and your instance URL which you already should now. The next thing to check for is if your ID for serial number is the same, in our case it’s “serial_number_26000476017” but I guess that may vary.

#################################################
# Export all assets and get serial to check with HP warranty
#################################################

# API Key
$FDApiKey="XXXXXX"

#################################################
# Prep
$pair = "$($FDApiKey):$($FDApiKey)"
$bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
$base64 = [System.Convert]::ToBase64String($bytes)
$basicAuthValue = "Basic $base64"
$FDHeaders = @{ Authorization = $basicAuthValue }
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12
# The Doing part
$FDAssetData = ""
$Output = @()
$i = 1
do
	{
		$FDAssetDatatmp = ""
		$FDBaseEndpointSummary = "https://<your fresh URL>/cmdb/items.json?page=$i"
		# You may want to write this out to check how many pages it loads
		# write-host $FDBaseEndpointSummary
		$FDAssetData = Invoke-WebRequest -uri $FDBaseEndpointSummary -Headers $FDHeaders -Method GET -ContentType application/json | ConvertFrom-Json
		$Output = $Output + $FDAssetData
		$i++
	} while($FDAssetData)
Write-host -foregroundcolor Cyan "$i pages imported..."

#Now let's go through every row and only filter out the HP computers and get the serial number.
foreach($Outputrow in $Output)
{
    $name = ""
    $serial = ""
    $name = $Outputrow.name
    # This levelfield for serial number may not be the same for everyone, please check this up!
	$serial = $Outputrow.levelfield_values.serial_number_26000476017
    # Using the example of HP here
	if($Outputrow.product_name -like "HP*")
        {
            write-host -foregroundcolor Green "Here you can check warranty for $name with serial $serial..."
        }
    else
        {
            write-host -foregroundcolor Yellow "Asset $name is not HP computer."
        }
}

Credit goes to Mark Wilkinson for writing the basics of this in a forum post here.

Still Alive and Kicking

Hey. It’s me. I know, it’s been a long, long time since I updated this place. But the past months have been pretty boring. Which considering everything that is happening is a good thing!

It got a bit depressing after summer when my wife lost her job and was unemployed for a while but she got a new job so that’s over and done with. But other than that we’re pretty much in a holding pattern until we get vaccinated (or infected) so we can start living again and society starting to open up. Because I’m pretty tired of our house by now after spending almost 12 months here. I’m one of the lucky ones that can do 99% of my job from home but that also means I don’t get out much. Or at all…

But so far we’ve been able to avoid getting covid19, the closest it has gotten was my sister that got symptoms day after she was here for an evening of F1. She had pretty rough 2 weeks and is still suffering a bit unfortunately even after 5 months!

So here’s hoping we can get vaccinated and start living again and people can start travelling so our company doesn’t go down as a result of this considering how much we’ve survived. Tsunami, ash clouds, bankruptcy, we beat them all!

We managed to find a new ice cream joint in Stockholm that we didn’t know about so we won’t have to travel to Söderköping that much!