Home Automation: Anyone use home assistant / hass.io (1 Viewer)

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Hi.

    Just wondering if anyone else here is in to home automation. End of last year i installed hass.io (home assistant) on a raspberry pi. I use it to control my lights, tv, stereo, heat pump using a web interface but also via voice commands (Google home) and via automation scripts (eg. Turn on hallway light at night if motion in hallway). Send notification if movement inside the house when the wife and i are not home (phone gps and wifi presence detection).

    I use a combination of zigbee (xiaomi) and mqtt (sonoff and nodemcu/esp8266).

    I haven't integrated it into the htpc yet. Stuff like dim lights when movie starts, brighten them when movie is paused or finishes, etc.
     

    charli181

    Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    Hi Kiwi,
    Been a long time since I have been on the forums, but like you, I have just started with HassIO over the past couple of months, hence this is how I found your post.

    I run MP1 throughout the house and have a Harmony Remote Hub running in the Lounge room to control my Setup.

    Basically, I can ask Google Home to tell Harmony to turn TV On/Off/Mute/Unmute at the moment.This happens via the Harmony IR commands. However, HassIO monitors the current state of the Harmony remote and sends a shutdown command to the PC or WOL command to start PC up. This weekend I am setting up some Sonoff's with Tasmota firmware to allow me to control the Sub Woofer power, and will include that in the turn On/Off script.

    Eventually I want Google Home to send commands directly to HassIO to control Harmony Hub, but taking baby steps first due to Wife Acceptance Factor.

    I am looking into building a plugin for MP1 that would somehow integrate HassIO with with MP1 so you could eventually send commands via Google Home to control your HTPC.

    this way you could control certain things of MP1 via the HassIO web Interface, which also meant controlling it via Google Home. Not sure how well this will go, as basically I have jsut started thinking about it and searching to see if anyone is already developing something already.

    I am sure there is a lot of work here to be done to integrate the 2 together - if it is even possible, but maybe its worth a try.

    Sean
     

    JDWestoby

    MP Donator
  • Premium Supporter
  • April 9, 2008
    265
    32
    68
    Poltimore, Devon
    Home Country
    United Kingdom United Kingdom
    Oh, look what you made me do - I had to login to reply.

    Yes, MP is an integral part of my HomeAutomation - but I use HomeSeer [HS] for the actual work (it is just SOOO flexible). I wrote some plugins.

    One allows me to send a command to HS from an MP screen and another allows HS to control MediaPortal.

    Reason for this is that I use NetBooks with MP as room clients, normally these are showing a digital clock (again my plugin) but HomeSeer can send 'keystrokes' and turn on the radio etc. So these are also Radio Alarm clocks! So nice I NEVER have to handle the GMT/BST changeover...

    We have Somfy blinds and, with the RFx433Xtra, HS also opens and closes these as required (this does LightWaveRF too).

    With HomeSeer I can have Google Home turn things on and off with (free with HS) myHS - a round trip command to HomeSeer via their server and back to my box (which is ALSO running MP client/server and iSpyConnect a CCTV system).

    (Using myHS you can control your home from anywhere but I generally use a simple schedule file for recurring things.)

    I did think about ditching HS and writing things directly from MP, but trying to make Z-Wave work would have been horrendous (SDK costs a fortune).

    Not only that but the flexibility makes a lot of things trivial (and to be honest a lot of trivial things more complicated as you get lost). I've been using it for 20 years, can't say I'd bother changing. It ain't that pretty but it IS that powerful.


    Oh, I made an Android app (HomeSeerRemote - free) to control HS too - just sends it locally using Ethernet, simple string like - <Request VR="Family Room Lights On"/>. In fact ALL of my tools use this sort of plain text interface


    If you want the plugins I keep them up to date but don't bother posting as not many people seemed to care. So just ask if you want them or more info - I'll happily bore the socks off you <grin>!
     

    JimCatMP

    Documentation Group
  • Team MediaPortal
  • April 1, 2010
    652
    283
    Leeds
    Home Country
    United Kingdom United Kingdom
    Hi.

    Just wondering if anyone else here is in to home automation. End of last year i installed hass.io (home assistant) on a raspberry pi. I use it to control my lights, tv, stereo, heat pump using a web interface but also via voice commands (Google home) and via automation scripts (eg. Turn on hallway light at night if motion in hallway). Send notification if movement inside the house when the wife and i are not home (phone gps and wifi presence detection).

    I use a combination of zigbee (xiaomi) and mqtt (sonoff and nodemcu/esp8266).

    I haven't integrated it into the htpc yet. Stuff like dim lights when movie starts, brighten them when movie is paused or finishes, etc.

    Hello all:)

    Been playing in much the same sand pit as yourself of late [last 10 days in fact:-] - using Alexa rather than Google as gateway into controlling SONOFF devices (I'm going to flash them with ESPuna eWelink is just too slow, can take 40 seconds to cycle command and I prefer to keep as much in house as possible:)

    Had an old [one of the 1st Gen B I waited ages for on release release] PI to hand, installed image which included Node-RED, lots of updates later and added MQTT, I have headless web enabled setup. Links over WiFi to Node-MCU, just on bread board at the moment with DHT11 temp/humidity sensor and a bit of code to read & return values, switch test led via Alexa, announce values as sound output from web page, etc.

    Node-RED side makes a lot of 'stuff' very simple, well worth a look if you want to create complex setups OR have visual feedback or sensors with zero coding :)

    Exactly HOW or IF I can work this into MediaPortal I've really no idea, the simple on/off power option isn't that much in the PC/TV area - sending complex IR commands covering differing device is more like it - and using Arduino libraries + IR diode may be my next step..............

    Cheers - JCMP
     

    JDWestoby

    MP Donator
  • Premium Supporter
  • April 9, 2008
    265
    32
    68
    Poltimore, Devon
    Home Country
    United Kingdom United Kingdom
    Global Cache will send IR - but I think it is far from easy. For my MP use I have a plugin (mine - Automator/Automation) which allows me to send a TCP/IP packet and it does things. So my commands to turn on Radio 2 (Don't judge me <grin>) are -
    Screen Home
    Press Radio
    Press …
    Press All Channels
    Press Radio 2
    Screen Home
    Screen Clock

    Of course this is sequenced (by HS) on a weekday only schedule.

    As I say if you want the plugin just ask or search - no hidden snafus!

    PS I am normally massively impressed by the sort of things people make work - thank goodness the hacker is not dead.
     

    charli181

    Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    Does any one know if there is a capability to get the current state/action of MP. What i mean by that
    * is that as I change a channel for the TV, MP knows it is on Channel 9 in TV,
    * if I go to Movies, and select a Movie, it knows it is in Movies, watching "Caddy Shack"...
    * if I am on the main screen doing nothing (MP just started) then there is a status for that.

    the reason behind this would be to build a MQTT Plugin for MP, which monitors this state field, and on change would broadcast this to the Home Automation Server for it to do processing on its side, instead of MP being configured to control the external devices. Then the next step would be the HA server would send MQTT commands back to MP (maybe by emulating keystrokes) to do what you want within MP.
     

    JDWestoby

    MP Donator
  • Premium Supporter
  • April 9, 2008
    265
    32
    68
    Poltimore, Devon
    Home Country
    United Kingdom United Kingdom
    I never found a single 'version of truth' last time I actually looked, but admittedly that was AGES ago. But my Automation/Automator* plugin DOES what you are saying. And I HAVE been using it for years (at least ten) as my interface to MP.

    Problem is that if (say) I write a plugin, there isn't a requirement for me to tell MP anything - so MP >might< know it's selected my screen but what that screen is up to is too general for MP to keep. Shame really a simple piece of info text would be a nice (non-parsable) way of keeping track

    Oddly there IS a way to 'Goto Home' - funny!

    There IS one caveat (which I impose because I don't like the new skins - personal preference) and that is that it uses the Classic (and Blue!) layout not Titan etc. which makes button processing easier.

    But this does trundle up and down (that's the caveat) buttons (on ANY screen) finding the text on each before pressing it etc.

    Please have a look at it, if you want the updated source then ASK - I'm not {THAT] precious about it!

    (EDIT - link - MediaPortal Automation)

    *One of then is the actual MP Robot, pressing buttons, the other allows me to test said robot by building up simple text lines and then executing them - so I don't even need my HomeSeer to test things.)


    PS A rather nice Android app (not mine, other apps are no doubt available) called AnyMote allows sending TCP/IP commands, so this is my portable interface to HS/MP.)


    That's it, rather than 'flogging a deceased equine' I'll keep out, have fun.
     
    Last edited:

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Yeah an MQTT plugin for mediaportal would be amazing, it would work with all the home automation software available.

    I'd want to know the following states for MediaPortal
    - watching video file
    - watch live tv
    - paused video
    - paused live tv
    - stopped video
    - stopped live tv

    I think it would be useful to differentiate between tv and video, but some may disagree.

    This would allow me to:
    - dim the room lights and close blinds when watching a movie
    - brighten the room lights when paused
    - open blinds and turn lights back on when movie finished

    I'd also like to be able to control mediaportal using MQTT
    - Load a plugin, eg. say ok google let's watch a movie, this would turn on all my home theatre gear, and load moving pictures plugin in mediaportal.
    - Pause movie, eg. if phone rings or there is someone at the door then pause the video / tv and brighten the room lights.
     

    Sinbe

    Portal Pro
    December 12, 2007
    70
    0
    Home Country
    Finland Finland
    For now I'm using EventGhost as a go-between for Home Assistant and MediaPortal. There's a plugin EventGhost Plus that pushes the information to EG and then I send that on with MQTT plugin for hass to read. Works perfectly and not only does it differentiate between TV and Movies, mediaportal also reports if it's a "short video" or a "long video" which I find useful. Actually I think tv series plugin even reports the genre of the file playing so you could set lighting based on that ;)

    I'd still love to have the ability to tell my Google Home Mini to play something specific on MediaPortal but for now I have to use VoxCommando for that.
     
    Last edited:

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    That's cool. That's is on my to-do list.

    Today i setup a chromecast plugged into my hifi with my google home.
    - When the chromecast starts playing music, an automation makes sure my hifi is powered on and then selects the correct input.
    - When the chromecast stops playing music, an automation switches the hifi back to the default input (htpc) and then turns it off.

    So I can say "hey google play some music" and it starts playing spotify on my hifi.

    Also added a door sensor to the heat pump so if the heat pump is turned on via the old fashioned remote control, it updates the status in home assistant. The heat pump is automatically turned off if there is no movement in the lounge for >90 minutes during the day or no motion for >30 minutes at late at night.
     

    Users who are viewing this thread

    Top Bottom