Announcement

Collapse
No announcement yet.

[BUG] Device String line break causes Hubitat's Echo Speaks app to crash *logs*

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

    #16
    So you want to replace a single character with a sequence of space, the character and space? What if the character occurs in the middle of other text. Do you want it encased in spaces as well in that case?

    The "nothing" is the case of an empty line which was done to avoid speaking the volume that you experienced before. What do you want to have sent if all that exists in LF or CR?

    Comment


      #17
      the test I want to run is... if we encase the character between 'spaces' (not remove it or replace it) then the engine might speak the name of the character. Like we already know it does with some of them. In many situations I'd suspect that is desirable... http:// (and such)

      Odd it speaks "nothing" if an empty line is sent to it. I guess that's ok, just might confuse people if that happens (prob rare)

      Comment


        #18
        Here is the padded special characters version
        Attached Files

        Comment


          #19
          test newest 14

          Almost there...

          &
          - suggest simply replace with a space. might be a bug in the Hubitat app
          In any phrase makes Echo say "sorry having trouble accessing..." -- this is odd, I would expect & to be spoken as "Ampersand" or "And"?
          I'll ping the Echo Speaks dev to see if this is a bug.

          / \ # ?
          ANY phrase combo using these is not sent, in any form, to Hubitat. Log doesnt show it
          ALL of these are spoken when put into the Echo Speaks app directly

          "Go Home" works fine while "Go Home " + any of these 4 characters is not sent


          Seems to be working...

          ( ) | * [ ] { } ` "
          Sent but not spoken; all others non-alpahnum character names are spoken (as expected)
          None of these are spoken when put into the Echo Speaks app by themselves but the words around it are.
          Prob by design so I'll ping the dev

          Comment


            #20
            The # I overlooked. The others are problematic characters because they are part of the syntax being used to communicate with Hubitat. I changed them to space.
            Attached Files

            Comment


              #21
              Originally posted by Michael McSharry View Post
              The # I overlooked. The others are problematic characters because they are part of the syntax being used to communicate with Hubitat. I changed them to space.
              for / \ ? is there a change I can ask for in Echo Speaks app to make it work proper?

              Comment


                #22
                Two choices as I see it. One is communicate with the Maker API developer as that is where the communication fails as you indicated these were not in the log. The second is to encode these using URI encoding or escape encoding. It this case it is again Maker API that needs to decode whatever was encoded. It may have support for some type of encoding but I do not know what it is.

                you can look at the mcsHubitat debug to see what URL is being sent for each command. You can use this URL in a browser to send commands to Hubitat without going through the plugin. You just need to use the real API key rather than the redacted one in the debug. This allows you to experiment without the need for any plugin updates.

                Comment


                  #23
                  thx, I'll ping

                  Comment


                    #24
                    Michael McSharry
                    found a new one

                    If I put in a comma into the Echo Speaks app directly, the speaks puts in a pause. But when using your plugin to send it - boom, fails.

                    Logs of working and not...

                    Code:
                    dev:82021-01-31 11:08:20.654 am errorgroovy.lang.MissingMethodException: No signature of method: user_driver_tonesto7_Echo_Speaks_Device_405.setVolumeSpeakAn dRestore() is applicable for argument types: (java.lang.Integer, java.lang.String, java.lang.String, java.lang.String) values: [80, Noah , stop yelling, 80] Possible solutions: setVolumeSpeakAndRestore(java.lang.Object, java.lang.String), setVolumeSpeakAndRestore(java.lang.Object, java.lang.String, java.lang.Object) (setVolumeSpeakAndRestore)
                    dev:82021-01-31 11:08:14.786 am info Echo (4.0.3.0) | SpeakCommand Sent | (Noah stop yelling) | Runtime: (3 sec) | QueueItems: (0)
                    dev:82021-01-31 11:00:51.209 am info Echo (4.0.3.0) | SpeakCommand Sent | (Noah stop yelling Noah stop yelling) | Runtime: (4 sec) | QueueItems: (0)
                    dev:82021-01-31 10:58:55.083 am errorgroovy.lang.MissingMethodException: No signature of method: user_driver_tonesto7_Echo_Speaks_Device_405.setVolumeSpeakAn dRestore() is applicable for argument types: (java.lang.Integer, java.lang.String, java.lang.String, java.lang.String) values: [80, Noah , stop yelling Noah stop yelling, 80] Possible solutions: setVolumeSpeakAndRestore(java.lang.Object, java.lang.String), setVolumeSpeakAndRestore(java.lang.Object, java.lang.String, java.lang.Object) (setVolumeSpeakAndRestore)
                    dev:82021-01-31 10:58:48.948 am info Echo (4.0.3.0) | SpeakCommand Sent | (Noah stop yelling Noah stop yelling) | Runtime: (4 sec) | QueueItems: (0)
                    dev:92021-01-31 10:58:42.168 am info Echo (4.0.3.0) | SpeakCommand Sent | (Noah stop yelling Noah stop yelling) | Runtime: (4 sec) | QueueItems: (0)

                    Comment


                      #25
                      This is again a syntax issue with MakerAPI. Did you ever reach out to the MakerAPI developer on method to encode text going to it?

                      Comment


                        #26
                        Originally posted by Michael McSharry View Post
                        This is again a syntax issue with MakerAPI. Did you ever reach out to the MakerAPI developer on method to encode text going to it?
                        Yea, I understand. I'm just thinking we'll need to replace comma with space.

                        I submitted a bug report with Hubitat since I think they are the developer on Maker API? I got an email saying it was being sent to developers... likely a black hole.

                        Comment


                          #27
                          I looked to make the request change about the comma and it is in the removables list so it should never be sent. I can move it to the replaceables list so it is converted to a space. Is this what you want?

                          Comment


                            #28
                            Originally posted by Michael McSharry View Post
                            I looked to make the request change about the comma and it is in the removables list so it should never be sent. I can move it to the replaceables list so it is converted to a space. Is this what you want?
                            I cant think of a use case where a removing it would be harmful? In sentences there is always a space after it, in numbers (123,456) it should still be the same result.

                            Might be cool to have a config file that allows the user to edit the subs/replace and removal list. We could replace things like * with 'star' or " with 'quote' and then we dont have to worry about the problem Maker API has with encoding

                            Comment


                              #29
                              I tried various encoding schemes without success. I did not go to the step to change HTTP headers. The only issues are with the special characters that are part of the syntax used to communicate with MakerAPI. ? & , are the printable ones that need to be filtered out. I posted 3.4.0.0 version in another thread a few hours ago that has the comma filtered correctly. I see no point in complicating it with the user needing to specify the filter.

                              Comment

                              Working...
                              X