R2D2 Dashboard

Here’s my current R2D2 dashboard for my Sphero unit. I’ve spent a lot of time learning and setting up a custom MQTT integration for him. The two animations in the top left were screen recordings I pulled from the old Star Wars Sphero app and only show when he is on (kinda neat I thought).

r2d2_dashboard

I chose MQTT so I could control it both inside and outside HA. I have several automations in HA and some outside using F# and a little program that simulates a translation from him when he makes a chirp or worble. I’ll try to clean that one up because it would be embarrassing to post that in its current state.

Let me know what you guys think or any ideas you might have to improve the dashboard and/or automation ideas!

yaml
views:
  - title: Home
    background: >-
      center / cover no-repeat fixed
      url('https://images.wallpaperscraft.com/image/single/starry_sky_night_dark_152039_1920x1080.jpg')
    badges: []
    cards:
      - type: vertical-stack
        cards:
          - type: conditional
            conditions:
              - entity: sensor.r2d2_battery_state
                state_not: unavailable
            card:
              type: picture
              image: local/images/r2d2.gif
              style: |
                ha-card {
                  background: black;
                  border: none;
                }
                ha-card img {
                  width: 50%;
                  margin: 0 auto;
                }
          - type: conditional
            conditions:
              - entity: sensor.r2d2_battery_state
                state_not: unavailable
            card:
              type: picture
              image: local/images/r2d2-status.gif
              style: |
                ha-card {
                  background: black;
                  border: none;
                }
                ha-card img {
                  width: 50%;
                  margin: 0 auto;
                }
      - type: picture
        image: https://droidesswhome.files.wordpress.com/2020/01/r2d2-blueprint.jpg
        alt_text: R2D2
        tap_action:
          action: navigate
          navigation_path: /config/devices/device/202cc9b13f5db20549b1b4522860d798
        hold_action:
          action: none
        style: |
          ha-card {
            border: none;
          }
      - type: entities
        entities:
          - entity: input_select.r2d2_alarms
          - entity: input_select.r2d2_chattys
          - entity: input_select.r2d2_exciteds
          - entity: input_select.r2d2_heys
          - entity: input_select.r2d2_hits
          - entity: input_select.r2d2_laughs
          - entity: input_select.r2d2_negatives
          - entity: input_select.r2d2_positives
          - entity: input_select.r2d2_sads
          - entity: input_select.r2d2_screams
          - entity: input_select.r2d2_steps
        title: Audio Test
        style: |
          ha-card {
            background: #000000b2;
            color: white;
            border: none;
          }
          :host {
            --mdc-select-fill-color: #000000b2;
            --mdc-select-ink-color: white;
            --mdc-select-idle-line-color: #464646;
          }
      - type: vertical-stack
        cards:
          - type: entities
            entities:
              - entity: light.holoprojector
              - entity: light.front_led
                secondary_info: none
              - entity: light.back_led
            state_color: true
            title: Lights
            style: |
              ha-card {
                background: #000000b2;
                color: white;
                border: none;
              }
      - type: entities
        entities:
          - entity: automation.r2d2_play_audio
          - entity: automation.r2d2_keep_alive
          - entity: automation.r2d2_noon_alert
          - entity: automation.r2_pc_session_state
          - entity: automation.r2d2_random_front_led
          - entity: automation.r2_5pm
          - entity: automation.r2d2_low_battery
        title: Automations
        state_color: false
        style: |
          ha-card {
            background: #000000b2;
            color: white;
            border: none;
          }
      - type: entities
        entities:
          - entity: sensor.r2d2_battery_state
          - entity: sensor.voltage_state
          - entity: sensor.voltage
        title: Sensors
        state_color: false
        style: |
          ha-card {
            background: #000000b2;
            color: white;
            border: none;
          }

8 Likes

Hi @fischgeek!
I’m still super impressed with your posts on this forum. I have a Sphero R2D2 myself, and my dream is to program to be a desktop companion that can notify me from Home Assistant.

Your other posts got me started, and right now I have a python script running on my Macbook that allows me to play any droid sound I want from Terminal. I love it already, it’s so much fun to see this little guy just looking around and bleeping every once in a while!

I’m still looking for a way to either migrate all this to my Raspberry Pi, or to somehow allow HA (on the raspberry) to send commands to my Macbook that relays them to the droid. I’ll keep on tinkering and hope to one day come as far as your amazing dashboard that you shared! Keep it up!

Thanks for your kind words. Every now and then I look at him and think I should dust him off and continue. Maybe now I will. Let me know if you have any questions.

1 Like

This is incredible! I’d love any additional information on what all you’ve done here! I’ve threatened to work out something similar for years, but have never spent the time to make it happen.

1 Like

Wow…just holy crapola!

1 Like

Here’s my other post on this. In there, you’ll find a link to a repo to tap into the sphero unit. Then, it’s only a matter of using a small python script to connect him to HA. Let me know if you decide to dig in and I’ll help you any way I can.

Hi, @fischgeek can you please post your dashboard yaml and mqtt yaml here too? Or do you have that somewhere in GitHub?

I added the yaml. But, it probably won’t do anyone any good since all the coding is happening in an external script that is feeding HA the MQTT data. I’ll try to get my github repo cleaned up. I think I referenced this in another post but have long forgotten.