Announcement

Collapse
No announcement yet.

I guess I need to learn YAML now... Google Home Script Editor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I guess I need to learn YAML now... Google Home Script Editor

    This just showed up! Apparently Google Home Scripts use YAML, so I guess I will be learning YAML in order to see what the Scripts can do.


    Click image for larger version

Name:	image.png
Views:	137
Size:	65.3 KB
ID:	1620059
    Karl S
    HS4Pro on Windows 10
    1070 Devices
    56 Z-Wave Nodes
    104 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

    #2
    Yaml positioning is fussy - one reason I don't like it so much. There are sites available to check you Yaml file. FYI
    HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

    Comment


      #3
      Originally posted by langenet View Post
      Yaml positioning is fussy - one reason I don't mind it so much. There are sites available to check you Yaml file. FYI
      I have access to Bard AI as well. Maybe I can get it to write the YAML files for me!
      Karl S
      HS4Pro on Windows 10
      1070 Devices
      56 Z-Wave Nodes
      104 Events
      HSTouch Clients: 3 Android, 1 iOS
      Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

      Comment


        #4
        Actually, this isn't too bad. You get a template when you Add New and in that there are pick lists of various items such as the Action Type, such as device.command.OnOff (being used here but hidden under the pick list) and for Devices a list of the available devices. Most of these are HomeSeer devices while others are directly added devices (Basement Fios TV, Basement TV, and the Chromecast) or added via SmartNORA through Node-RED (Dennon - TV Room). The template has a lot of notes in it as well. Oh, and the on: prompted me for a true/false value. So everything here was done without consulting API references. I am sure I will be shortly, though.

        Click image for larger version

Name:	image.png
Views:	119
Size:	184.9 KB
ID:	1620093
        Karl S
        HS4Pro on Windows 10
        1070 Devices
        56 Z-Wave Nodes
        104 Events
        HSTouch Clients: 3 Android, 1 iOS
        Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

        Comment


          #5
          There's a YAML extension for Visual Studio Code that takes care of the formatting for you. We use YAML at my work for some network tools configuration and this extension hasn't let me down yet.
          "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

          Comment


            #6
            The editor actually has a Validate "button" which checks the script for you. It seemed to work well.

            Interestingly, this script turns on a HomeSeer controlled z-wave light switch when I turn on the Chromecast on a weekday with the time between 8 AM and 5 PM (for testing purposes - the time will be changed of I use this but likely a HomeSeer Event could do the same) and while the light switch shows as On in HomeSeer, it is not showing as On in the Google Home app. I have provided Google with feedback on this and suspect that when Google tells HomeSeer to control a device, a confirmation message is not sent back to Google which would then trigger the app to show the switch as On. I am guessing this is normal behavior and would suspect the scripting engine needs to be updated but thought I would mention it here in case rjh or Sgt. Shultz (seems to be who understands the HomeSeer Google integration) have any insight.

            Click image for larger version

Name:	image.png
Views:	133
Size:	115.7 KB
ID:	1620115
            Karl S
            HS4Pro on Windows 10
            1070 Devices
            56 Z-Wave Nodes
            104 Events
            HSTouch Clients: 3 Android, 1 iOS
            Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

            Comment

            Working...
            X