Announcement

Collapse
No announcement yet.

how does one control when speech is spoken in Marks Example above

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

    how does one control when speech is spoken in Marks Example above

    i need a switch that i can turn on or off so i can control when things are spoken
    hs virtual switch ? maybe

    #2
    is it possible to have homeseer device control weather speech is spoken or not
    like a on/off switch so that if company is over you can disable anything from being spoken.
    Thanks
    Paul.

    Comment


      #3
      In that example, something will be spoken every time one of the HomeSeer device's values change. You could have an On/Off virtual device in HomeSeer and use the status of that to decide if something is spoken or not. You could also have Node Red decide based on the time or other items. I personally like the idea of a HomeSeer device as you have complete control over the setting without changing your flow. What would be your preferred method/trigger and we can work on something from there if you like.
      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
        Ksum
        thanks for the reply.

        Originally posted by ksum View Post
        In that example, something will be spoken every time one of the HomeSeer device's values change. You could have an On/Off virtual device in HomeSeer and use the status of that to decide if something is spoken or not. You could also have Node Red decide based on the time or other items. I personally like the idea of a HomeSeer device as you have complete control over the setting without changing your flow. What would be your preferred method/trigger and we can work on something from there if you like.
        i like the idea of homeseer having the control (and not having to change the flow)

        Comment


          #5
          Sorry for the delay on this. I would add the Simple Gate contrib to your palette (Under hte 3 line/hamburger menu select Manage Palette, then the Install tab and in the search enter simple gate. We then add the Gate node in front of the Alexa Routine node. The Gate node is either Opened or Closed. When closed, it stops the flow from moving forward. When open, it passes any context through. Now we need to Open and Close the gate, which we will do by a HomeSeer device. Create a virtual device in HomeSeer which has a Status of On and Off. When On, this will open the gate, so Alexa Output will be On. When Off, this will close the gate, so no Alexa output will occur. We will add a couple other nodes as well. Some to set the payload, but one to Delay the output from our new HomeSeer virtual device. I set the delay to 15 seconds. The purpose of this is that some of the HomeSeer devices may report their status on startup of Node Red. Startup occurs whenever you deploy a new flow or your Node Red server reboots. We will have the new virtual device report its status on startup, delay it 15 seconds to give everything else a chance to do their things, then let it go through. Since we will also set the Gate to be closed by default, on startup the gate will be closed, so there will be no output from Alexa for any values received on startup. If the new virtual device is On, only new changes to the reporting devices will go through the gate. After this it is just a Switch node so we can set the payload to Open or Close the gate based on the Status of our new virtual device.

          The added nodes are included below. Import them into your flow and insert it as shown in the image below.

          Flow Image

          We are adding the Gate node and all the nodes to the left of that. These are in the Flow to Import, below.
          Click image for larger version

Name:	hs3.png
Views:	266
Size:	50.2 KB
ID:	1442726

          Here is how the Set gate to Closed Change node is configured. The only difference between it and the Set gate to Open node is the value of the payload. This is case sensitive and the Open node it is just lower case "open" without the quotes.
          Click image for larger version

Name:	hs4.png
Views:	89
Size:	19.6 KB
ID:	1442727


          The Gate node uses the default settings, save the value of the Default State, which is set to Closed. As mentioned, in combination with the Delay node, this keeps us from having stray announcements when Node Red starts.
          Click image for larger version

Name:	hs5.png
Views:	87
Size:	23.1 KB
ID:	1442728

          Flow to Import

          Code:
          [{"id":"3c7a0472.72c77c","type":"hs-device","z":"51c074b1.9415ec","name":"Announce Status","device":"416","server":"e002f3ec.8aabe","feature":0,"reportonstartup":true,"x":290,"y":1120,"wires":[["2c831a48.444f26"]]},{"id":"b292e640.d6c078","type":"gate","z":"51c074b1.9415ec","name":"","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"x":830,"y":1160,"wires":[["368b406e.4868d"]]},{"id":"af1947d9.871e18","type":"switch","z":"51c074b1.9415ec","name":"","property":"payload.status","propertyType":"msg","rules":[{"t":"eq","v":"On","vt":"str"},{"t":"eq","v":"Off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":1220,"wires":[["6ec95a43.aab344"],["fe857c61.e8ad6"]]},{"id":"6ec95a43.aab344","type":"change","z":"51c074b1.9415ec","name":"Set gate to Open","rules":[{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1160,"wires":[["b292e640.d6c078"]]},{"id":"fe857c61.e8ad6","type":"change","z":"51c074b1.9415ec","name":"Set gate to Closed","rules":[{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1220,"wires":[["b292e640.d6c078"]]},{"id":"2c831a48.444f26","type":"delay","z":"51c074b1.9415ec","name":"","pauseType":"delay","timeout":"15","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":380,"y":1180,"wires":[["af1947d9.871e18"]]},{"id":"e002f3ec.8aabe","type":"hs-server","z":"","name":"House","host":"192.168.1.10","port":"8008"}]
          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


            #6
            Ksum
            Thank you for taking the time to help me, I appreciate it very much.
            i will look at it this evening
            Paul.

            Comment

            Working...
            X