X10 Community Forum

💬General Category => Mac/Linux & Open Source and the X10 Home => Raspberry Pi, Arduino & other SBC => Topic started by: lviper on August 23, 2018, 02:06:10 PM

Title: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 23, 2018, 02:06:10 PM
I just wanted to share a few pics of my HA setup that includes X10 stuff.

These pics show 2 pages of my frontend webpage. I have circled the lights on the one page that are x10. The second page are all my door and motion sensors which are all x10.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 23, 2018, 02:09:24 PM
Home Assistant has a nice feature called HADashboard which is basically a way to control you HA from a tablet or phone. I finally got mine setup this week on a Fire 7 tablet. Now I just need to mount it on the wall.

Hadashboard is just a webpage and I use an app called Fully Kiosk to display it full screen.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 23, 2018, 02:12:23 PM
A couple of cameras would fit in there nicely if you were that way inclined. As you can see it looks quite impressive and is very modular. Quite straightforward adding other technologies to your project as you go along too.

Great to see you got it all up and running.

Edit. Just saw your camera screens now. Definitely finishes it all off nicely.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 23, 2018, 02:26:13 PM
I have done more with HA in the past few weeks then I have done in all the years I've been running automation stuff.

I started with AHP Pro and a CM15a. Moved on to another program called Home Control Assistant with a CM11a and W800USB. Add in the XTB-IIR and I had a flawless system. Just hated the fact I couldn't have my MS16a trigger my Sengled Zigbee smart bulb unless I used IFTTT.

In came HA a short while ago and everything is now working with each other and it's fast!
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 23, 2018, 02:31:45 PM
Looks like you've found a "keeper" with Home Assistant. How did you go about installing HADashboard.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 23, 2018, 02:39:00 PM
Looks like you've found a "keeper" with Home Assistant. How did you go about installing HADashboard.

Yes, this is a keeper. HAdashboard I'll admit was a bear, but I slowly followed the instructions here.
https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html (https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html)

Once I had my test dashboard up and running I took off with what I have now.
I want to go back and split things up in to modules. That way I can include certain common things in other dashboards to different devices and resolutions as well as rooms.

I'm just lucky it's slow at work which has afforded me a lot of play time.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 23, 2018, 03:51:47 PM
Looks like you've found a "keeper" with Home Assistant. How did you go about installing HADashboard.

Yes, this is a keeper. HAdashboard I'll admit was a bear, but I slowly followed the instructions here.
https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html (https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html)

 
Once I had my test dashboard up and running I took off with what I have now.
I want to go back and split things up in to modules. That way I can include certain common things in other dashboards to different devices and resolutions as well as rooms.

I'm just lucky it's slow at work which has afforded me a lot of play time.

Home automation is a labour of love and requires patience. Try fail, read up, ask questions and try again.

Clearly you stuck with it and im impressed at your results. Once you find a platform you're comfortable working in it's worth sticking with it. Patience is king. There's no quick fix here but the results were definitely worth it.

Unlike yourself I'm back in the thick of it work wise so I'll revisit HADashboard. Might be worth while doing a write up on how you succeeded with HADashboard install. I'll be watching out for your progress. :)%

Title: Re: Sharing a look at my X10 on Home Assistant
Post by: Tuicemen on August 23, 2018, 05:13:43 PM
Nice to see your screen shots it does help one see the possibilities of HA.
HA does need some work on its front end to attract newbie users. The initial install provides no inspiration however post like this do! #:)
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 23, 2018, 05:33:10 PM
Just curious to know what method you used when installing Home Assistant. Was it Docker, Python Virtual Environment or Hass.io. I was looking at the Pip installation and if that's what you used you definitely conquered Everest. Doesn't look too easy. You may want to share that experience while it's still fresh in your mind when you get a chance. >*<
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 23, 2018, 06:15:58 PM
I install HA following the Raspbian install instructions on the home assistant site. I believe that's the virtualenv method. I do remember running pip commands. I'll make an attempt at writing down my steps as best as I remember them.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 23, 2018, 06:38:32 PM
I install HA following the Raspbian install instructions on the home assistant site. I believe that's the virtualenv method. I do remember running pip commands. I'll make an attempt at writing down my steps as best as I remember them.

How did you install AppDaemon when installing HADashboard. Doesn't look like its for the faint hearted but the results are very impressive. I believe HADashboard is not really suitable for use outside of the home. I'm looking forward to giving it a go.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 24, 2018, 08:41:00 AM
How did you install AppDaemon when installing HADashboard. Doesn't look like its for the faint hearted but the results are very impressive. I believe HADashboard is not really suitable for use outside of the home. I'm looking forward to giving it a go.

I followed the instructions I linked to in my prior post.
https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html (https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html)

The very first step said refer to the AppDaemon install at
https://appdaemon.readthedocs.io/en/latest/INSTALL.html (https://appdaemon.readthedocs.io/en/latest/INSTALL.html)

Since I had installed HA using the manual HA install on a raspberry pi here which uses the virtual environment method
https://www.home-assistant.io/docs/installation/raspberry-pi/ (https://www.home-assistant.io/docs/installation/raspberry-pi/)

I installed AppDaemon using the pip method. I followed all the steps but I did skip the optional steps. Just wanted to see if I could get it running first. Then I could always revisit the optional steps I skipped. Basically I copied the sample config file entering my info and skipped down past the test app to the Running section for PIP3. I saw what they say I should see when starting it so I moved down to the instructions for starting at reboot. I then went back to setting up my first test dashboard.

I also added the disable_apps: directive since I wasn't worried about running apps right now and hadashboard didn't need it.

Here is my appdaemon.yaml file. I removed the secret stuff because I didn't use the secrets.yaml. I put my url and key directly in the file for simplicity. I may change that later.

Code: [Select]
pi@RPi3bplus-HA:/home/homeassistant/.homeassistant $ cat conf/appdaemon.yaml
appdaemon:
  threads: 10
  disable_apps: 1

  plugins:
    HASS:
      type: hass
      ha_url: https://redacted.duckdns.org:8123
      ha_key: redacted
hadashboard:
  dash_url: http://192.168.10.205:5050
  access_file: /var/log/dash_access

Title: Re: Sharing a look at my X10 on Home Assistant
Post by: Tuicemen on August 24, 2018, 08:57:49 AM
How are you handling HA's inability to see x10 commands sent from other devices?
Mochad is capable of seeing PL & RF commands not just sending, something HA on the surface appears not to utilize.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 24, 2018, 09:24:11 AM
How did you install AppDaemon when installing HADashboard. Doesn't look like its for the faint hearted but the results are very impressive. I believe HADashboard is not really suitable for use outside of the home. I'm looking forward to giving it a go.

I followed the instructions I linked to in my prior post.
https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html (https://appdaemon.readthedocs.io/en/latest/DASHBOARD_INSTALL.html)

The very first step said refer to the AppDaemon install at
https://appdaemon.readthedocs.io/en/latest/INSTALL.html (https://appdaemon.readthedocs.io/en/latest/INSTALL.html)

Since I had installed HA using the manual HA install on a raspberry pi here which uses the virtual environment method
https://www.home-assistant.io/docs/installation/raspberry-pi/ (https://www.home-assistant.io/docs/installation/raspberry-pi/)

I installed AppDaemon using the pip method. I followed all the steps but I did skip the optional steps. Just wanted to see if I could get it running first. Then I could always revisit the optional steps I skipped. Basically I copied the sample config file entering my info and skipped down past the test app to the Running section for PIP3. I saw what they say I should see when starting it so I moved down to the instructions for starting at reboot. I then went back to setting up my first test dashboard.

I also added the disable_apps: directive since I wasn't worried about running apps right now and hadashboard didn't need it.

Here is my appdaemon.yaml file. I removed the secret stuff because I didn't use the secrets.yaml. I put my url and key directly in the file for simplicity. I may change that later.

Code: [Select]
pi@RPi3bplus-HA:/home/homeassistant/.homeassistant $ cat conf/appdaemon.yaml
appdaemon:
  threads: 10
  disable_apps: 1

  plugins:
    HASS:
      type: hass
      ha_url: https://redacted.duckdns.org:8123
      ha_key: redacted
hadashboard:
  dash_url: http://192.168.10.205:5050
  access_file: /var/log/dash_access


Yes you can refine that AppDaemon.yaml file now that you have it up and running. Don't forget your security password setting and careful with SSL settings. Hope to have a go at an install over the weekend so fingers crossed  :-*
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: bkenobi on August 24, 2018, 01:57:09 PM
How are you handling HA's inability to see x10 commands sent from other devices?
Mochad is capable of seeing PL & RF commands not just sending, something HA on the surface appears not to utilize.
I am very interested in this as well.  I use MS16A motion sensors in HG to trigger scripts and turn on/off various lights.  Without the ability to receive and act on X10 RF commands, I'm going to be stuck and HASS won't be a viable option.  Also, I have several switches that send X10 PL commands that must be interpreted and utilized to turn on other lights (similar to the RF issue) and some that directly turn on/off lights (meaning HASS must update status).  I see so much good in HASS but this basic issue will be critical for actually implementing it.

I don't know the answer, but from a quick search the following thread seems to indicate mochad_dispatch (mochad->MQTT) seems to be the only available solution.  Seems kinda clunky though.

https://community.home-assistant.io/t/need-help-getting-x10-working/8180/22
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 24, 2018, 02:28:28 PM
How are you handling HA's inability to see x10 commands sent from other devices?
Mochad is capable of seeing PL & RF commands not just sending, something HA on the surface appears not to utilize.

I'm using a cm11a for plc. WGL Design's W800usb (supports both regular and security rf) for RF. And lastly HeyU.

Heyu has a state engine built in and the HA X10 component uses this for state information. When I use my palmpad to turn on a light, HA reflects this within a second or 2. HeyU also has a nice scripting function that allows me to map some palmpad rf signals to either be forwarded to plc or to the aux_engine to be processed by HA. So for example, my palmpad is house code F. F1 and F2 or forwarded to the aux_engine and never go to the powerline. This way I can use a script in heyu to send a command directly to HA to turn on a light on a different protocol. Meanwhile the rest of the unit codes on the palmpad transceive directly to plc.

That's why I say you could possibly use the rf of a cm15a to have mochad send everything to the powerline where the cm11 will pick it up and heyu act on it. Just wouldn't directly work for security rf though.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: Tuicemen on August 24, 2018, 02:31:43 PM
I can't believe HA uses Mochad but doesn't utilize all its possibilities! :o Makes me wonder how many other things in HA are half baked ::) :'
The mochad_dispatch >> MQTT user workaround is klunky to say the least. :(
However they're not the only Linux Home Automation software using mochad and not to its full potential ::) :'
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 24, 2018, 04:03:55 PM
I know there is way more potential for mochad, and if I knew how to program or script I would run with it. I bet someone who knew how could somehow merge heyu and mochad together so heyu would support the cm15a.

I just felt since I had invested so much in getting my X10 working so reliably with the W800usb for RF and the XTB-RII with CM11a for plc, I had to find a way to continue using the devices. I was never able to get reliable RF from the CM15a even with several different antenna mods. My house is a story and a half and if I include the unfinished full basement, I have over 4000 sq ft. I have my W800usb antenna on the main floor in the middle of the house and it just works. I have 6 MS16's around the house outside all triggering different lights and all of them report in all the time. I have 9 DS10a's on doors and windows and everyone reports in.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 24, 2018, 04:25:03 PM
You've well and truly nailed X10 in Home Assistant along with the other aspects of home automation it has to offer. So much more to explore too by the looks of it. You've taken to Home Assistant on the Raspberry Pi like a duck to water  >*<

So glad your experience was a positive one and a lot more to report in the coming months by the sounds of it.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: Tuicemen on August 24, 2018, 04:28:06 PM
I don't think heyu needs to be in the mix. (just more things running )
I wonder ::) HA has TCP and HTTP modules and since Mochad is a TCP based application one may be able to tap into that.
I'll see what I can learn on that front.
 >!
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 24, 2018, 05:05:16 PM
Give this page a look. It's for the Restful API. I used this to have my old program, Home Control Assistant, make calls to turn on lights in HA before I setup X10 in HA.

https://developers.home-assistant.io/docs/en/external_api_rest.html (https://developers.home-assistant.io/docs/en/external_api_rest.html)

I also use MQTT Sensors to get my DS10a's and MS16's setup in HA.

https://www.home-assistant.io/components/sensor.mqtt/ (https://www.home-assistant.io/components/sensor.mqtt/)
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: Tuicemen on August 24, 2018, 06:00:09 PM
I believe Rest , MTTQ and TCP would work but no better then how HA does it now with the Mochad module  :(
There is a Broadlink switch module which will allow sending any x10 RF even security codes, However no way to tell if the switch was turned on/off by another device as the broadlink RM is oneway (send only). B:(
Saddly I see this isn't the software for me. :( Love your setup lviper!
 >!


Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 26, 2018, 06:50:47 PM
Just curious to know did you script and skin your own Dash files or did you mod examples that you found on the net. I finished off installing AppDaemon and HADashboard, did the Hello World thing so before I reinvent the wheel, did you find working examples you could mod yourself.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 27, 2018, 08:28:23 AM
Just curious to know did you script and skin your own Dash files or did you mod examples that you found on the net. I finished off installing AppDaemon and HADashboard, did the Hello World thing so before I reinvent the wheel, did you find working examples you could mod yourself.

I did script my own dash file but used the default skin. I basically created my dash file from scratch using what I learned from examples on the net. Here is my main dash file for an example.

Code: [Select]
##
## Main arguments, all optional
##
title: Main Panel
widget_dimensions: [140, 140]
widget_size: [1, 1]
widget_margins: [5, 5]
columns: 7
global_parameters:
    use_comma: 0
    precision: 1
    use_hass_icon: 1
    namespace: default
    devices:
      media_player:
        step: 5

layout:
    - clock(2x1), sensor.smartthings_motionv4_0107d8a1_1_1026, alarm, spacer, spacer, cameradash
    - weather(2x2), porchcamera(3x2), porchlight, weatherdash
    - sidedoor
    - barlight, polelight, craftlight, spotlights, patiolights, backdoor, familysecurity

clock:
    widget_type: clock
    show_seconds: 1

weather:
    widget_type: weather
    prefer_icons: 1
    show_forecast: 1
    forecast_title: Tomorrow
    sensors:
      icon: sensor.dark_sky_icon
      temperature: sensor.dark_sky_temperature
      apparent_temperature: sensor.dark_sky_apparent_temperature
      humidity: sensor.dark_sky_humidity
      precip_probability: sensor.dark_sky_precip_probability
      precip_intensity: sensor.dark_sky_precip_intensity
      precip_type: sensor.dark_sky_precip
      pressure: "" #sensor.dark_sky_pressure
      wind_speed: sensor.dark_sky_wind_speed
      wind_bearing: sensor.dark_sky_wind_bearing
      forecast_icon: sensor.dark_sky_icon_1
      forecast_temperature_min: sensor.dark_sky_overnight_low_temperature_1
      forecast_temperature_max: sensor.dark_sky_daytime_high_temperature_1
      forecast_precip_probability: sensor.dark_sky_precip_probability_1
      forecast_precip_type: sensor.dark_sky_precip_1

spotlights:
    widget_type: light
    icon_on: mdi-spotlight-beam
    icon_off: mdi-spotlight-beam
    entity: group.spotlights
    title: Spot Lights

patiolights:
    widget_type: light
    icon_on: mdi-lightbulb
    icon_off: mdi-lightbulb
    entity: group.patiolights
    title: Patio Lights

craftlight:
    widget_type: light
    icon_on: mdi-spotlight-beam
    icon_off: mdi-spotlight-beam
    entity: light.sengled_e11g13_0311c010_1
    title: Craft Light

backdoor:
    widget_type: light
    icon_on: mdi-lightbulb
    icon_off: mdi-lightbulb
    entity:  light.sengled_e11g13_03117c11_1
    title: Back Door

alarm:
    widget_type: alarm
    entity: alarm_control_panel.alarm_system
    title: Alarm Status

barlight:
    widget_type: light
    icon_on: mdi-lightbulb
    icon_off: mdi-lightbulb
    entity: light.bar
    title: Bar Light

polelight:
    widget_type: light
    icon_on: mdi-lightbulb
    icon_off: mdi-lightbulb
    entity: light.pole
    title: Pole Light

familysecurity:
    widget_type: light
    icon_on: mdi-lamp
    icon_off: mdi-lamp
    entity: light.family_room_security
    title: Family Security Light

sidedoor:
    widget_type: light
    icon_on: mdi-lightbulb
    icon_off: mdi-lightbulb
    entity: light.side_door
    title: Side Door

allfamilyroomlights:
    widget_type: light
    entity: group.familyroomlights
    title: All Family Room Lights

cameradash:
    widget_type: navigate
    title: Cameras
    dashboard: camera
    icon_inactive: mdi-cctv
    args:
      timeout: 15
      return: main

weatherdash:
    widget_type: navigate
    title: Weather
    dashboard: weather
    icon_inactive: mdi-weather-sunny

porchcamera:
    widget_type: camera
    entity_picture: https://REDACTED.duckdns.org:8123/api/camera_proxy_stream/camera.camera_proxy__camerafront_porch?&api_password=REDACTED
    refresh: 300

porchlight:
    widget_type: light
    title: Porch Light
    icon_on: mdi-lightbulb
    icon_off: mdi-lightbulb
    entity: light.porch

Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 27, 2018, 09:03:07 AM
Probably the best route to go so.

The AppDaemon and HADashboard install instructions were overkill. The process was actually very straightforward in the end. Looking forward to designing my own HADashboard scripts and skins.

Plenty to keep busy over the winter months.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 27, 2018, 08:55:42 PM
Well HADashboard is all up and running. iPad hung on the wall and visibility of widgets is 100%. Some very interesting HADashboard projects on GitHub that can be installed. All that's needed now is a little spare time to install them and configure them around my Home Assistant project.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on August 28, 2018, 09:40:14 AM
Congrats. You're one step ahead of me. I still have to get my tablet mounted.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on August 28, 2018, 11:37:22 AM
Congrats. You're one step ahead of me. I still have to get my tablet mounted.

It was one of the old Gen 1 iPads too. It was heading for the recyclers so I changed the battery and now it has a new home.

The options available to Home Assistant are endless. From basic configuration to high end automation. I'm glad I chose the Python install as the Docker and the Hass.io are very limiting expansion wise.

I'm still laughing at the four spaces and a dash problem one of the users came across in his dashboard configuration. He spent hours trying to figure out the problem. That's the problem when using a plain text editor. If you get down and deep with Python later on try PyCharm IDE. Open source and very able.

Anyway Home Assistant is the distraction of choice for the coming season. Should be fun to see what comes of it.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on September 07, 2018, 10:54:46 AM
Could you post the config of your hadashboard3.dash file. I think I've discovered a bug in the way the configuration.yaml is passing names to the Dashboard but I just want to confirm this before I report it to Home Assistant.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on September 10, 2018, 08:30:35 AM
Could you post the config of your hadashboard3.dash file. I think I've discovered a bug in the way the configuration.yaml is passing names to the Dashboard but I just want to confirm this before I report it to Home Assistant.

What I posted a few posts back is still my current main dash file.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on September 10, 2018, 01:11:37 PM
Could you post the config of your hadashboard3.dash file. I think I've discovered a bug in the way the configuration.yaml is passing names to the Dashboard but I just want to confirm this before I report it to Home Assistant.

What I posted a few posts back is still my current main dash file.

Looking at that post you have 3 separate dashboard files, dashboard1.dash, dashboard2.dash and dashboard3.dash. I imagined you were calling them via navigate from a main page. The reason I ask is that I don't see your individual weather widgets configs.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on September 11, 2018, 08:18:47 AM
Could you post the config of your hadashboard3.dash file. I think I've discovered a bug in the way the configuration.yaml is passing names to the Dashboard but I just want to confirm this before I report it to Home Assistant.

What I posted a few posts back is still my current main dash file.

Looking at that post you have 3 separate dashboard files, dashboard1.dash, dashboard2.dash and dashboard3.dash. I imagined you were calling them via navigate from a main page. The reason I ask is that I don't see your individual weather widgets configs.

Ahh, so sorry. Misunderstood what you were asking. Here is my weather.dash file. And yes, I call the camera and weather dash files with the navigate widget type. The camera dash is called with navigate using a timeout and return to main argument.

Code: [Select]
title: Weather Panel
widget_dimensions: [140, 140]
widget_size: [1, 1]
widget_margins: [5, 5]
columns: 7

layout:
    - weather_frame(4x3),temperature, apparent_temperature, humidity
    - precip_probability, precip_intensity, wind_speed
    - summary, visibility, wind_bearing
    - minutely_summary(2x1), hourly_summary(2x1), daily_summary(2x1), maindash

weather_frame:
    widget_type: iframe
    refresh: 300
    frame_style: ""
    img_list:
      - https://icons.wxug.com/data/weather-maps/radar/united-states/bowling-green-kentucky-region-current-radar.gif

temperature:
    widget_type: sensor
    title: Current Temp
    entity: sensor.dark_sky_temperature

apparent_temperature:
    widget_type: sensor
    title: Feels Like
    entity: sensor.dark_sky_apparent_temperature

humidity:
    widget_type: sensor
    title: Humidity
    entity: sensor.dark_sky_humidity

precip_probability:
    widget_type: sensor
    title: Precip Probability
    entity: sensor.dark_sky_precip_probability

precip_intensity:
    widget_type: sensor
    title: Precip Intensity
    entity: sensor.dark_sky_precip_intensity

wind_speed:
    widget_type: sensor
    title: Wind Speed
    entity: sensor.dark_sky_wind_speed

summary:
    widget_type: sensor
    title: Current Condition
    entity: sensor.dark_sky_summary

visibility:
    widget_type: sensor
    title: Visibility
    entity: sensor.dark_sky_visibility

wind_bearing:
    widget_type: sensor
    title: Wind Direction
    entity: sensor.dark_sky_wind_bearing

minutely_summary:
    widget_type: sensor
    title: Current Summary
    entity: sensor.dark_sky_minutely_summary

hourly_summary:
    widget_type: sensor
    title: Hourly Summary
    entity: sensor.dark_sky_hourly_summary

daily_summary:
    widget_type: sensor
    title: Daily Summary
    entity: sensor.dark_sky_daily_summary

maindash:
    widget_type: navigate
    title: Main Dashboard
    icon_inactive: fa-home
    dashboard: main

Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on September 11, 2018, 12:32:26 PM
Thanks.

It was a localization issue with HA which I reported and it's sorted now. I'm using a combination of sunset/sunrise and cloud cover for lighting automation which is now working properly

If you get a chance you should try Font Awesome and MDI icons. Takes the bare look off the dashboard. The Obsidian skin stands out well on the Dashboard too
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on September 12, 2018, 10:03:20 AM
.... I'm using a combination of sunset/sunrise and cloud cover for lighting automation which is now working properly

Care to share how you are doing this? I understand the sunrise/sunset using elevation, but I'm curious as to what you use for cloud cover. Which weather sensor are you using? I've tried Dark Sky but it isn't really all that accurate for my location. Either is YR or any of the non-US weather sensors. Yahoo is close but slow to update. Weather Underground is the most accurate and quickest to update but since they don't give out free api keys anymore, I'm afraid the key I already have may stop working at anytime. So I'm looking for an alternative which may have to be Yahoo weather.


If you get a chance you should try Font Awesome and MDI icons. Takes the bare look off the dashboard. The Obsidian skin stands out well on the Dashboard too

I've used some MDI Icons for my dashboard but many of the Font Awesome icons didn't work for some reason. I also haven't tried skinning yet but plan to some day.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on September 12, 2018, 05:14:45 PM
These are the sensors I used based on Dark Sky Sensors in the configuration.yaml. The automation I configured in the Configuration section of the Home Assistant API using the States in the Developer Tools section

icon1:
  title: Cloud
  widget_type: sensor
  entity: sensor.dark_sky_summary
  units: "%"
  precision: 0


icon2:
  title: Rain
  widget_type: sensor
  entity: sensor.dark_sky_precip
  state_text: 1

icon3:
  title: Humidity
  widget_type: sensor
  entity: sensor.dark_sky_humidity
  state_text: 1

icon4:
  title: Wind Speed
  widget_type: sensor
  entity: sensor.dark_sky_wind_speed
  state_text: 1

icon5:
  title: Temperature
  widget_type: sensor
  entity: sensor.dark_sky_temperature
  units: "&deg;C"
  precision: 0

icon6:
  title: Wind Bearing
  widget_type: sensor
  entity: sensor.dark_sky_wind_bearing
  state_text: 1
icon7:
  title: UV Index
  widget_type: sensor
  entity: sensor.dark_sky_uv_index
  state_text: 1

icon8:
  title: Rain Total
  widget_type: sensor
  entity: sensor.dark_sky_precip_accumulation
  state_text: 1

icon9:
  title: UV Index
  widget_type: sensor
  entity: sensor.dark_sky_uv_index
  state_text: 1

icon10:
  title: Cloud Coverage
  widget_type: sensor
  entity: sensor.dark_sky_cloud_coverage
  state_text: 1

icon11:
  title: Daily Rain Intenisity
  widget_type: sensor
  entity: sensor.dark_sky_daily_max_precip_intensity
  state_text: 1
icon123:
  title: UV Index
  widget_type: sensor
  entity: sensor.dark_sky_daily_summary
  state_text: 1

icon12:
  title: Daytime High Appparent
  widget_type: sensor
  entity: sensor.dark_sky_daytime_high_apparent_temperature
  state_text: 1

icon13:
  title: Day Time High
  widget_type: sensor
  entity: sensor.dark_sky_daytime_high_temperature
  state_text: 1

icon14:
  title: Dew Point
  widget_type: sensor
  entity: sensor.dark_sky_dew_point
  state_text: 1

icon15:
  title: Hourly Summary
  widget_type: sensor
  entity: sensor.dark_sky_hourly_summary
  state_text: 1

icon16:
  title: Dark Sky
  widget_type: sensor
  entity: sensor.dark_sky_icon
  state_text: 1

icon17:
  title: Minute Summary
  widget_type: sensor
  entity: sensor.dark_sky_minutely_summary
  state_text: 1

icon18:
  title: Overnight Low App
  widget_type: sensor
  entity: sensor.dark_sky_overnight_low_apparent_temperature
  state_text: 1

icon19:
  title: Overnight Low
  widget_type: sensor
  entity: sensor.dark_sky_overnight_low_temperature
  state_text: 1

icon20:
  title: Ozone
  widget_type: sensor
  entity: sensor.dark_sky_ozone
  state_text: 1

icon21:
  title: Rain Intensity
  widget_type: sensor
  entity: sensor.dark_sky_precip_intensity
  state_text: 1

icon22:
  title: Rain Probability
  widget_type: sensor
  entity: sensor.dark_sky_precip_probability
  state_text: 1

icon24:
  title: Visibility
  widget_type: sensor
  entity: sensor.dark_sky_visibility
  state_text: 1

Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on September 13, 2018, 08:18:08 AM
Ok, thanks. I see you're using darksky for your sensors. I'm curious to see how you did the automation. You mentioned you are using sunrise/sunset with the darksky sensors to automate lights. I'm automating some lights based on sun elevation but wanted to add in cloud cover. I have a room that needs lights during the day if it's partly to mostly cloudy. So I'm curious how you did your automation for that.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on September 13, 2018, 04:09:33 PM
Use this entity to determine your cloud coverage   entity: sensor.dark_sky_minutely_summary

Returns simple cloud coverage in plain English you can include in your automation. Currently my output is partly cloudy for the hour.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on September 13, 2018, 04:13:16 PM
You could also try this for a generic approach

automation:
  - alias: 'Rainy Day'
    trigger:
      - platform: state
        entity_id: sensor.precip_intensity
        to: 'rain'
    condition:
      - condition: state
        entity_id: group.all_devices
        state: 'home'
      - condition: time
        after: '14:00'
        before: '23:00'
    action:
      service: light.turn_on
      entity_id: light.couch_lamp
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: lviper on September 14, 2018, 08:45:19 AM
Thanks for that. I actually went a different route using a template sensor to determine if indoor lights need to be turned on. It uses the sun elevation and darksky cloud coverage sensors. Here is the code.

Code: [Select]
  - platform: template
    sensors:
      need_indoor_lights:
        friendly_name: 'Need Indoor Lights'
        value_template: >
          {% if (states.sun.sun.attributes.elevation | int < 22) %}true
          {% elif ( (states.sun.sun.attributes.elevation | int < 40) and (states.sensor.dark_sky_cloud_coverage.state | int > 30)) %}true
          {% elif (states.sensor.dark_sky_cloud_coverage.state | int > 50) %}true
          {% elif ( states.sensor.need_indoor_lights.state == 'true' and ((as_timestamp(now()) - as_timestamp(states.sensor.need_indoor_lights.last_changed)) | float < 1200)) %}true
          {% else %}false
          {% endif %}

This sensor turns true under the following conditions.
If the sun elevation is below 22 then true.
or if the sun elevation is below 40 and cloud coverage is above 30% then true.
or if cloud coverage is above 50% then true.

The timestamp statement may not be needed. I just included it from the example I found. It was put in to offer a buffer for times when the statements are close to keep the lights from turning on and off. I'm only using it to turn lights on, not off.

I use the sensor as a trigger in one automation with a condition of someone home. I use it again as a condition when the front door opens and someone is arriving home in case the lights are off because no one was home when it triggered the other automation.
Title: Re: Sharing a look at my X10 on Home Assistant
Post by: petera on September 14, 2018, 09:09:05 AM
Yes the automation scripting is very powerful and varied so there's so many ways available to come at it. The extensive documentation and the active community input is what makes this product. Once HA has identified the states it's fairly straightforward from there.

You can have your setup as simple or as complex as you choose depending on your level of experience. There appears to be a platform for every element of hardware that you throw at it.

I have all the basics set up at this stage so I'm going to spend the winter months integrating my current setup under the HA roof and develop a lot more scripts for it. X10 is functioning nicely with it now.