Announcement

Collapse
No announcement yet.

Trying to get lrpspeak going

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

    #31
    Hello Larry

    I thought I would try using your script info. until the events issue gets worked out. Here's what I did. I renamed Speaker-1 LivingRoom in the INI file and it shows up on HS just fine. I then put the below script in Notepad and saved it as a vbs. file. I then put it in the scripts folder in HS.

    &hs.plugin("lrSpeak").SpkrOn("LivingRoom")



    I made and event to run this script and get the following error in my log.

    <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>8/23/2007 10:29:54 PM </TD><TD class=LOGType0 align=left colSpan=3>Info </TD><TD class=LOGEntry0 align=left colSpan=8>Event Trigger "Living Room Speakers On"</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>8/23/2007 10:29:54 PM </TD><TD class=LOGType1 align=left colSpan=3>Info </TD><TD class=LOGEntry1 align=left colSpan=8>Running script in background: LivingRoom.vbs</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>8/23/2007 10:29:54 PM </TD><TD class=LOGType0 align=left colSpan=3>Error </TD><TD class=LOGEntry0 align=left colSpan=8>Running script, script run or compile error in file: LivingRoom.vbs1024:Expected statement in line 1 More info: Expected statemen
    </TD></TR></TBODY></TABLE>

    Can you let me know what I'm doing wrong?

    Thanks
    Lance

    Comment


      #32
      I finally got a version working that saves PREVIOUS state. I could not get the HACS-AB8SS query state function to work as documented in there protocol spec, so I wrote my own save and restore states routines. I will now look into the event problem and see whats going on there.
      -Larry

      A member of "The HA Pioneer Group", MyWebSite

      Plugins:
      VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

      Hardware:
      Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

      Comment


        #33
        Sounds good. I extended my trial for another month. I'm ready to start using it.

        Thanks
        Lance

        Comment


          #34
          Originally posted by lpitman View Post
          I could not get the HACS-AB8SS query state function to work as documented in there protocol spec, so I wrote my own save and restore states routines.
          Larry,

          I got the query state to work fine. You may want to look at the script package I wrote. It is posted here. Jasv also converted it from VBScript to VB.Net and dressed it up a bit. His package is posted here. I haven't tried his VB.NET stuff, but I know mine seems to retrieve the status from the AB8SS consistently. Feel free to learn / re-use anything you can.

          Steve

          Comment


            #35
            Thanks,

            I'll have a look at it. I am sure it is timing related, and is very touchy about when I should look for a response. Right now my plugin is event driven off the serial port and when data arrives at the port it fires an event for me to process. But I am always interested in learning new things from others.

            Thanks again.
            -Larry

            A member of "The HA Pioneer Group", MyWebSite

            Plugins:
            VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

            Hardware:
            Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

            Comment


              #36
              I will try to remember tonight to post a couple of my scripts as examples, as I can not find a reason for the failures above. My scripts seem to run fine in testing, so there must be some sort of syntax error or something eluding me. Has anyone tested the newer version 2.2.0.6, I am curious if everything is as you had wished for, like previous state, etc...
              -Larry

              A member of "The HA Pioneer Group", MyWebSite

              Plugins:
              VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

              Hardware:
              Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

              Comment


                #37
                Originally posted by lpitman View Post
                Thanks,

                I'll have a look at it. I am sure it is timing related, and is very touchy about when I should look for a response. Right now my plugin is event driven off the serial port and when data arrives at the port it fires an event for me to process. But I am always interested in learning new things from others.

                Thanks again.
                Larry,

                I had originally tried to code my script to do the reads off the com port as event driven, and the timing never worked out. So I changed it so that I poll the port from within the routine that queries for the status. Just had to put lots of waitevents in there, but it seems to work fine every time now.

                BTW: Greetings from a few miles north of you (Centennial)

                Steve

                Comment


                  #38
                  Hello Larry

                  Just wondering how the plugin is coming along?

                  Thanks
                  Lance

                  Comment


                    #39
                    Are you testing the 2.2.0.6 Version that is posted on the updater ?
                    -Larry

                    A member of "The HA Pioneer Group", MyWebSite

                    Plugins:
                    VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                    Hardware:
                    Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                    Comment


                      #40
                      I didn't know you had a new version. Just tried it using an event and still have the same problem. It says it turned the speaker on in the log and it shows on in the status page but doesn't turn the speaker on. It still works manually from the status page. Its not sending the signal to the speaker selector. When I manually turn the speaker on or off from the status page my edgeport flashes and the selector clicks the relay on. When the event turns it on I get no flash from the edgeport and no action from the speaker selector. Let me know what you think is going on here.

                      Thanks
                      Lance

                      Comment


                        #41
                        Post an example of how you are using in an event... I am not experiencing the problem you are describing.
                        -Larry

                        A member of "The HA Pioneer Group", MyWebSite

                        Plugins:
                        VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                        Hardware:
                        Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                        Comment


                          #42
                          I select "add event", "device action", pick the speaker you want turned on, and save. Here's what the log shows when I run the event. It just doesn't turn the speaker on. Again it will work if I go to the status page and manually turn it on. It's realy the same problem I and the others had from the begining.

                          <TABLE cellSpacing=2 cellPadding=0 width="100%" border=0><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>9/26/2007 9:18:02 AM </TD><TD class=LOGType0 align=left colSpan=3>Info </TD><TD class=LOGEntry0 align=left colSpan=8>Event Trigger "Kitchen Music"</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>9/26/2007 9:18:04 AM </TD><TD class=LOGType1 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry1 align=left colSpan=8>NTTP=0 after HandleShuffle</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>9/26/2007 9:18:04 AM </TD><TD class=LOGType0 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry0 align=left colSpan=8>NTTP=0 after iTunesPlay</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>9/26/2007 9:18:04 AM </TD><TD class=LOGType1 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry1 align=left colSpan=8>StartPlaylist called</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>9/26/2007 9:18:04 AM </TD><TD class=LOGType0 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry0 align=left colSpan=8>NTTP=0 after StartPlaylist(1)</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>9/26/2007 9:18:04 AM </TD><TD class=LOGType1 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry1 align=left colSpan=8>NTTP=1 after NextTrack</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>9/26/2007 9:18:04 AM </TD><TD class=LOGType0 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry0 align=left colSpan=8>NTTP=0 after HandleShuffle</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>9/26/2007 9:18:04 AM </TD><TD class=LOGType1 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry1 align=left colSpan=8>NTTP=0 after HandleShuffle</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>9/26/2007 9:18:05 AM </TD><TD class=LOGType0 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry0 align=left colSpan=8>NTTP=0 after HandleShuffle</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>9/26/2007 9:18:05 AM </TD><TD class=LOGType1 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry1 align=left colSpan=8>NTTP=0 after iTunesPlayPlaylist</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>9/26/2007 9:18:05 AM </TD><TD class=LOGType0 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry0 align=left colSpan=8>StartPlaylist called</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>9/26/2007 9:18:05 AM </TD><TD class=LOGType1 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry1 align=left colSpan=8>NTTP=0 after StartPlaylist(1)</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>9/26/2007 9:18:05 AM </TD><TD class=LOGType0 align=left colSpan=3>ITUNES DEBUG </TD><TD class=LOGEntry0 align=left colSpan=8>NTTP=1 after NextTrack</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>9/26/2007 9:18:05 AM </TD><TD class=LOGType1 align=left colSpan=3>Info </TD><TD class=LOGEntry1 align=left colSpan=8>Device: lrpSpeak Kitchen (]3) Value set to 2</TD></TR></TBODY></TABLE>

                          Comment


                            #43
                            I select "add event", "device action", pick the speaker you want turned on, and save. Here's what the log shows when I run the event. It just doesn't turn the speaker on. Again it will work if I go to the status page and manually turn it on. It's realy the same problem I and the others had from the begining.
                            There never was support for device action, Try this:

                            Select "add event", "run script", and use "&hs.plugin("lrSpeak").SpkrOn("Kitchen") "

                            The problem as I see it is the instructions supplied earlier were not followed correctly, the plugin never did have support for actions, just function calls as described.
                            -Larry

                            A member of "The HA Pioneer Group", MyWebSite

                            Plugins:
                            VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                            Hardware:
                            Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                            Comment


                              #44
                              That's interesting since I've posted 3 times how I was trying to get it working and you never said anything. Any reason it won't work using devices? It's just a lot easier for people like me who don't know anything about scripts.

                              I did try the script you left. "&hs.plugin("lrSpeak").SpkrOn("Kitchen") "

                              I cut and pasted this in to notepad and saved it as a vbs. file. I then copied it to the HS scripts folder. Here's the error I get know.


                              9/26/2007 11:47:48 AM - Info - Running script in background: kitchenon.vbs
                              9/26/2007 11:47:48 AM - Error - Running script, script run or compile error in file: kitchenon.vbs1024:Expected statement in line 1 More info: Expected statement

                              Thanks
                              Lance





                              From Aug. 7th

                              Now to get it working. Here's what I do.

                              1.click add event tab.
                              2.click on action tab.
                              3. select device action from the drop down list.
                              4.select the speaker I want turned on or off
                              5. click update and repeat steps 3 and 4 to adjust each set of speakers for that event.
                              Again on Aug 11th
                              Quote:
                              <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0><TBODY><TR><TD class=alt2 style="BORDER-RIGHT: 1px inset; BORDER-TOP: 1px inset; BORDER-LEFT: 1px inset; BORDER-BOTTOM: 1px inset">1.click add event tab.
                              2.click on action tab.
                              3. select device action from the drop down list.
                              4.select the speaker I want turned on or off
                              5. click update and repeat steps 3 and 4 to adjust each set of speakers for that event.

                              I then try running the event. It shows on or off in the log and on or off under the status page but nothing actualy happens.

                              Let me know what I'm doing wrong.
                              </TD></TR></TBODY></TABLE>
                              <!-- / message --><!-- controls -->
                              Aug. 1st

                              I don't know anything about scripts but it appears that the only way to run things is through scripting. Is that correct? When you look under the events tab it's listed. It lets you set up on and off settings for each set of speakers but doesn't appear to work for people.

                              Comment


                                #45
                                Originally posted by lpitman View Post
                                I don't think it's going to work. Everything points to a failed install. Without the ini file being created it does not look good. Anyway here is a link to a thread that talks about events usage.

                                http://board.homeseer.com/showthread.php?t=120737

                                Here is another one.

                                http://board.homeseer.com/showthread.php?t=120795
                                I have posted examples many times before....see post #8 and post #10

                                And still get blamed for not giving this information.

                                Here is an example of a script. The example given last time, was using the command in the event.

                                If you want to use a script...use this.

                                Sub Main()
                                hs.plugin("lrpSpeak").InputAB("B")
                                End Sub

                                see post #4 under lrpSpeak/Help
                                -Larry

                                A member of "The HA Pioneer Group", MyWebSite

                                Plugins:
                                VWS, AB8SS, lrpSpeak, Calendar, Arduino, Harmony, BlueIris, Sprinklers, ZipBackup...

                                Hardware:
                                Intel NUC8i7BEH1 running Windows 10 Pro headless, HS3 Pro, Plex running on Synology dual High Availability DS-1815+ NAS (24Tb each), Synology Surveillance Station running on DS-416 Slim (8Tb), Samsung SmartThings, Google Home, Alexa, Hubitat Elevation, ZNET, Ubiquiti UniFi Network, Davis Vantage Pro II Weather Station. Whole house speaker system using a couple of AB8SS switches. Vantage Pro II Weather Station, Rain8Net Sprinklers, Hubitat Elevation, Google Home, Alexa, DSC Security System, Ubiquiti UniFi Network.

                                Comment

                                Working...
                                X