Use the Sonos API to gather alarm data

**My alarm clock setup is based on a Sonos One that plays music and Home Assistant in combination with DeCONZ and Node-RED to automate my bedroom lights as a wake up light. I could also control the music to the Sonos One from Home Assistant, but I don’t want to rely on my home automation setup for me to wake up. Currently, the Home Assistant integration does not get the alarm data itself, but luckily the Sonos API is easily accessible!** ...

15-12-2019 · 3 min · Jean-Paul van Ravensberg

Migrate to Azure Logic Apps from Microsoft Flow

**People who follow me on Twitter might have noticed that I’m working more and more with Microsoft Flow. Microsoft Flow allows me to create simple automations (like IFTTT) and to create a bridge between services like Office 365 and my home automation with Home Assistant. Recent changes to the pricing model made me decide to move away from Microsoft Flow, back to Azure Logic Apps. In this blog post, I’ll explain how easy it is to move your flows to Azure Logic Apps.** In my flows I’ve been a heavy user of the HTTP Trigger and HTTP Request actions, because I’m relying mostly on REST API calls to perform the automation tasks. ...

06-04-2019 · 4 min · Jean-Paul van Ravensberg

Use Azure Logic Apps and RSS to Create a Simple Post Reminder on Social Media

In this blog post, I will show you how to create an RSS Feed/WordPress Post Reminder with Azure Logic Apps, which you can use to post to various Social Media platforms like Twitter or Facebook. If you’ve been following me on Twitter, you’ve probable seen a post like this with a reminder to check out my yesterday’s blog post: https://twitter.com/DevSecNinja/status/1084815812232388613?s=20 This is all works automatically by using Azure and Azure Logic Apps. ...

20-01-2019 · 3 min · Jean-Paul van Ravensberg

Installing the new Home Assistant Hass.IO 64-bit image on a Raspberry Pi 3 Model B+

Home Assistant recently announced a brand new image of Hass.IO running on HassOS. I instantly ordered a new Raspberry Pi 3 Model B+ to replace my older Raspberry Pi Model B, which was running Raspbian and Home Assistant. The guide below helps you with installing your new Hass.IO instance! Prerequisites Raspberry Pi 3 Model B+ 32 GB **Micro-**SD card (I ordered a SanDisk Micro-SDHC 32GB Extreme U3 100MB/s) Ethernet cable (if not using WiFi) Micro USB power supply (2.1 A - very important! I’m using an iPad charger) A Windows 10 machine (This guide might work on a MacBook Pro or a Linux distro too) Installation Guide - Step-by-Step Download the 64-bit version of Hass.IO from Hass.IO. (File was named hassos_rpi3-64-1.7.img.gz) Download and install Etcher. I’ve used the Win32DiskImager tool before, but just installed Etcher to ensure that I’m following the right process. Open Etcher, open the image file you just downloaded and select the SD card. Hit the Flash button! Wait until it’s completed. It took me a couple of minutes. Optional - If you want to setup WiFi or set a static IP: On a USB stick, create the network/my-network file and follow the howto from HassOS. Safely remove the SD card (and optional USB stick) from the computer. Insert the SD card (and optional USB stick) into the Raspberry Pi and turn it on. Make sure you connect the LAN cable if you don’t use WiFi! On first boot, it downloads the latest version of Home Assistant which takes about 20 minutes. This gives you enough time to remove Etcher from your PC if you don’t need it anymore. You can now check your router/DHCP server to find the IP address of the Raspberry Pi. You can also reach the Raspberry Pi at http://hassio.local:8123. In the next blog post, we will take about configuring Home Assistant in Hass.io with the new Raspberry Pi 3 Model B+. Cheers!

20-07-2018 · 2 min · Jean-Paul van Ravensberg

Azure - Deploy and automatically domain join a VM with Azure Automation Runbooks

I was looking for a way to deploy and automatically domain join a VM in Azure. The solution was quite simple: Azure Automation. I found the blog post of DexterPOSH very useful, but the script doesn’t work for me. Follow the steps on his blog and use this script below. I’ll update this post if I find some improvements. Don’t forget to update the domain in the Add-Computer part. To-Do list: - Custom static IP as variable. ...

18-02-2015 · 3 min · Jean-Paul van Ravensberg

Azure - Automatically deploy a VM in Azure (Runbook)

I was looking for a way to automatically deploy a VM in Azure. The solution was quite simple: Azure Automation. I found the blog post of DexterPOSH very useful, but the script doesn’t work for me. Follow the steps on his blog and use this script below. I’ll update this post if I find some improvements. To-Do list: Custom static IP as variable. Custom domain as variable. workflow Deploy-NonJoined-VM { param( [parameter(Mandatory)] [String] $VMName, [parameter(Mandatory)] [String] $ServiceName = "contoso<Insert name>", [parameter(Mandatory)] [String] $InstanceSize = "Small", [parameter(Mandatory)] [String] $VMImageName = "Specify custom or default image name", [parameter(Mandatory)] [String] $AzureSubscriptionName = "Subscription-1", [parameter(Mandatory)] [String] $StorageAccountName = "contoso", [parameter(Mandatory)] [String] $VMSubnetName = "subnet-1", [parameter(Mandatory)] [String] $VMVnetName = "CORP.contoso.com", [parameter(Mandatory)] [String] $VMAffinityGroup = "West-Europe" ) $verbosepreference = 'continue' #Change this to your needs $DomainJoinAccount = "Domain Join Account" $LocalAccount = "LocalAdmin" $AutomationAccount = "Azure Automation Account" #Get the Credentials to authenticate agains Azure Write-Verbose -Message "Getting the Credentials" $Cred = Get-AutomationPSCredential -Name $AutomationAccount $LocalCred = Get-AutomationPSCredential -Name $LocalAccount $DomainCred = Get-AutomationPSCredential -Name $DomainJoinAccount #Add the Account to the Workflow Write-Verbose -Message "Adding the Azure Automation Account to Authenticate" Add-AzureAccount -Credential $Cred #select the Subscription Write-Verbose -Message "Selecting the $AzureSubscriptionName Subscription" Select-AzureSubscription -SubscriptionName $AzureSubscriptionName #Set the Storage for the Subscrption Write-Verbose -Message "Setting the Storage Account for the Subscription" Set-AzureSubscription -SubscriptionName $AzureSubscriptionName -CurrentStorageAccountName $StorageAccountName #Select the most recent Server 2012 R2 Image Write-Verbose -Message "Getting the Image details" $imagename = Get-AzureVMImage | where-object -filterscript { $_.ImageName -eq $VMImageName } | Sort-Object -Descending -Property PublishedDate | Select-Object -First 1 | select -ExpandProperty ImageName #use the above Image selected to build a new VM and wait for it to Boot $Username = $LocalCred.UserName $Password = $LocalCred.GetNetworkCredential().Password New-AzureQuickVM -Windows -ServiceName $ServiceName -Name $VMName -ImageName $imagename -Password $Password -AdminUsername $Username -SubnetNames $VMSubnetName -VNetName $VMVnetName -InstanceSize $InstanceSize -AffinityGroup $VMAffinityGroup -WaitForBoot Write-Verbose -Message "The VM is created and booted up now.. Deployment done." } #Workflow end

18-02-2015 · 2 min · Jean-Paul van Ravensberg