Now that Microsoft Flow is out of Beta I thought I would play with it and integrate it with Home Assistant running my house. The Microsoft Flow is fairly flexible and has more flow options than IFTTT to make choices.
To use this with Home Assistant I am going to use the REST API to make and set a sensor value, you can then take this and make it as complicated as you want. 🙂
You need to ensure you have this information at hand.
* Home Assistant Endpoint – https://publicdomin:optionalPort/api
* Your password for the http component. If you public expose HA without a password, stop and fix it now!
* The name of the sensor you want to update. sensor.kitchen_temperature in this case.
- Go to https://flow.microsoft.com and login.
- Make a new Flow from a blank template
- Search for button (you can use other triggers but this is an easy start)
- Add a new step of type action.
- Select HTTP
- Change Method to POST
- In URI put the full URI of the sensor you want to change. Using the data above this is https://publicdomin:optionalPort/api/states/sensor.kitchen_temperature
- In headers add the following JSON blob.
- In Body put the JSON to update the sensor.
- Save the Flow!
Now open up Flow on your phone and log in with the same account, you will see a nice big button with manual -> HTTP on it. Click that button and look at the state of the sensor in Home Assistant. You will see it with the value you set in the body.
To trouble shoot, in the web UI click on the i with a circle around it. It will show a log of successes and failures. If you click on that you can drill into the details of the flow and the responses from Home Assistant.
I have just moved to Two-Factor authentication, there was a bit of work to get everything signed in again but the additional security is worth it. I use my Microsoft account as a central hub for everything, it is on all my PCs at home and work, I have a WP8 that I log into with it, I use it to log into Skype. Basically if someone takes it you have access to everything I have.
In addition I have lots of photos and file on SkyDrive now and do not feel like having to deal with the issues if that is compromised. The process is fairly easy and I have the simple steps below so if you have a Microsoft Account I would recommend enabling it.
- Install the Authenticator App on your Phone if it is a Windows Phone
- Got to the account page for your account.
- Click on the link to enable two factor authentication (two-step)
- The page will give you a nice bar code that you can scan using the Authenticator application, this makes setup a breeze.
- Not this is done you will need to reset up your devices and accounts on your machines. If you have already trusted your accounts on your desktops you are good to go and only need to deal with things like SkyDrive by providing the Auth from your phone.
- Not everything likes the passcodes created so for other apps and devices such as Xbox 360, Windows Phone, or mail apps on your other devices you will need a App Password, you use this instead of your regular password to log into your account. More details can be found at the following link to setup different apps
With that you are done, all your apps now have two factor auth, if you choose to trust an account or remember the code then you are back to single access if the device is stolen, if that happens head straight to your manage page and remove the app passwords and un-trust all your devices.
What was on the device my be compromised but any new information will be secured from that point on. Also you do have BitLocker enabled on your desktop hard drives, don’t you?