Announcement

Collapse
No announcement yet.

{{plugin_function is not called from html file? Any ideas what could be wrong?

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

    {{plugin_function is not called from html file? Any ideas what could be wrong?

    I have this in a html file.....

    Code:
    <div class="col-md-7">
    {{plugin_function 'HS4Test' 'GetPluginVersion' []}}
    </div>
    But instead of the plugin_function getting called in my plugin the plaintext is presented in the browser.....Any ideas I'm stumped.

    What does plugin_function depend upon?

    If it fails where does it present that information?
    HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
    BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
    DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

    #2
    That's what I have:
    HTML Code:
    <!DOCTYPE html>
        <html lang=""en"">
        <head>
            <meta charset = ""utf-8"" >
            <meta http-equiv=""X-UA-Compatible"" content=""IE=edge"">
            <!--This maintains the scale of the page based on the scale of the screen-->
            <meta name = ""viewport"" content=""width=device-width, initial-scale=1"">
            <meta name = ""author"" content=""ABK"">
            <!--This liquid tag loads all of the necessary css files for HomeSeer-->
            {{includefile '/bootstrap/css/page_common.css'}}
            <link href='/#ID#/abk.css' rel='stylesheet'>
        <title>
            {{ plugin_function '#ID#' 'GetTitle' ['#PAGE#'] }}
        </title>
        </head>

    Comment


      #3
      That's what is in the sample plugin also.....something is wrong, but the system provides no indication of what, so fixing is a bummer as I don't know where to start. I've spent two days tweaking and twiddling the html to no avail.....
      HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
      BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
      DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

      Comment


        #4
        Github then

        Comment


          #5
          I'm just beginning to begin to begin learning this stuff, but I think you may have to say "hs.plugin_function"

          This may help:

          https://forums.homeseer.com/forum/de...on#post1388632
          HomeSeer Version: HS3 Pro Edition 3.0.0.548
          Operating System: Microsoft Windows 10 Pro - Work Station

          Enabled Plug-Ins
          3.0.0.6: AK Smart Device 3.0.1.9: AmbientWeather 2.0.63.0: BLBackup 3.0.55.0: BLGData 3.0.38.0: BLLock 2.0.26.0: BLUPS 3.2.0.1: Device History 3.0.0.73: EasyTrigger 3.25.614.1: HSBuddy 3.1.0.22: MeiHarmonyHub 3.1.0.2: SDJ-Health 19.10.7.1: TPLinkSmartHome 3.0.6681.34300: UltraCID3 3.0.6644.26753: UltraLog3 3.0.6554.33094: UltraMon3 3.0.5960.36744: UltraSighthoundVideo3 3.0.7806.23606: UltraWeatherWU3 3.0.2.0: Z-Wave

          Comment


            #6
            Originally posted by ewkearns View Post
            I'm just beginning to begin to begin learning this stuff, but I think you may have to say "hs.plugin_function"
            OP is asking about Liquid tags in HTML page, but you are talking about scripting

            Comment


              #7
              Ususally when there is something wrong with the tag, your page doesn't render at all, it gives you gobbledy gook. Given it shows in plain text and the rest renders properly (is that correct), I would venture the page isn't being processed by scriban.

              Some questions:
              - you have this page rendered by HS4, right? (meaning you have a registered link in your plugin) and that's what you use, not another webserver that might be in use?
              - is the file named .htm or .html, should be the latter?
              - the scriban.dll is located in the <hs root>\bin\homeseer directory, is it there? Nothing screwed up the dll directories?

              Just some pointers

              Comment


                #8
                Also, hit F12 in chrome to see if there are any errors in the console.
                HS4Pro Running on a Raspberry Pi4
                79 Z-Wave Nodes, 131 Events, 383 Devices
                Z-Wave, UPB, WiFi
                Plugins: EasyTrigger, weatherXML, OMNI, Z-Wave, Tuya, Device History
                HSTouch Clients: 3 Android, 1 Joggler

                Comment


                  #9
                  Originally posted by alexbk66 View Post

                  OP is asking about Liquid tags in HTML page, but you are talking about scripting
                  OK, that's a few semesters ahead of me, but looks very interesting. I don't think I can look at the example and the "description" and see a lot of commonalities, but then I know so little about it. Thanks for the information. Somehow, I feel like I am looking at the basics of the "New HSTouch Designer".
                  HomeSeer Version: HS3 Pro Edition 3.0.0.548
                  Operating System: Microsoft Windows 10 Pro - Work Station

                  Enabled Plug-Ins
                  3.0.0.6: AK Smart Device 3.0.1.9: AmbientWeather 2.0.63.0: BLBackup 3.0.55.0: BLGData 3.0.38.0: BLLock 2.0.26.0: BLUPS 3.2.0.1: Device History 3.0.0.73: EasyTrigger 3.25.614.1: HSBuddy 3.1.0.22: MeiHarmonyHub 3.1.0.2: SDJ-Health 19.10.7.1: TPLinkSmartHome 3.0.6681.34300: UltraCID3 3.0.6644.26753: UltraLog3 3.0.6554.33094: UltraMon3 3.0.5960.36744: UltraSighthoundVideo3 3.0.7806.23606: UltraWeatherWU3 3.0.2.0: Z-Wave

                  Comment


                    #10
                    Originally posted by rmasonjr View Post
                    Also, hit F12 in chrome to see if there are any errors in the console.
                    true, on the other hand, this is server side processing that seems not to happen for some reason

                    Comment


                      #11
                      Originally posted by dcorsus View Post
                      Ususally when there is something wrong with the tag, your page doesn't render at all, it gives you gobbledy gook. Given it shows in plain text and the rest renders properly (is that correct), I would venture the page isn't being processed by scriban.

                      Some questions:
                      - you have this page rendered by HS4, right? (meaning you have a registered link in your plugin) and that's what you use, not another webserver that might be in use?
                      - is the file named .htm or .html, should be the latter?
                      - the scriban.dll is located in the <hs root>\bin\homeseer directory, is it there? Nothing screwed up the dll directories?

                      Just some pointers
                      Yes the page is registered and available with HS....
                      Yes the page otherwise registers correctly
                      Yes it is .html
                      Yes scriban.dll (11/15/2019) is in bin/homeseer

                      and weirdly the SamplePlugin renders correctly.....and processes the plugin_function

                      HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
                      BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
                      DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

                      Comment


                        #12
                        Instead of [] try ['0']
                        HS4Pro Running on a Raspberry Pi4
                        79 Z-Wave Nodes, 131 Events, 383 Devices
                        Z-Wave, UPB, WiFi
                        Plugins: EasyTrigger, weatherXML, OMNI, Z-Wave, Tuya, Device History
                        HSTouch Clients: 3 Android, 1 Joggler

                        Comment


                          #13
                          Originally posted by rmasonjr View Post
                          Instead of [] try ['0']
                          No change, seems either is valid.
                          HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
                          BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
                          DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

                          Comment


                            #14
                            Originally posted by dmurphy View Post

                            Yes the page is registered and available with HS....
                            Yes the page otherwise registers correctly
                            Yes it is .html
                            Yes scriban.dll (11/15/2019) is in bin/homeseer

                            and weirdly the SamplePlugin renders correctly.....and processes the plugin_function
                            do you mind post the whole file, I'll try it against my system, see if the issue is somewhere else

                            Comment


                              #15
                              Originally posted by alexbk66 View Post
                              That's what I have:
                              HTML Code:
                              <!DOCTYPE html>
                              <html lang=""en"">
                              <head>
                              <meta charset = ""utf-8"" >
                              <meta http-equiv=""X-UA-Compatible"" content=""IE=edge"">
                              <!--This maintains the scale of the page based on the scale of the screen-->
                              <meta name = ""viewport"" content=""width=device-width, initial-scale=1"">
                              <meta name = ""author"" content=""ABK"">
                              <!--This liquid tag loads all of the necessary css files for HomeSeer-->
                              {{includefile '/bootstrap/css/page_common.css'}}
                              <link href='/#ID#/abk.css' rel='stylesheet'>
                              <title>
                              {{ plugin_function '#ID#' 'GetTitle' ['#PAGE#'] }}
                              </title>
                              </head>
                              Solved.......user error

                              I had implemented the scheme above to allow creation of html within the c# code.

                              {{plugin_function '#ID#' 'GetHTML' ['#PAGE#'] }}

                              BUT you cannot embed

                              Code:
                              <div class="col-md-7">
                                  {{plugin_function 'HS4Test' 'GetPluginVersion' []}}
                              </div>
                              in the html produced as it doesn't get evaluated recursively......doh
                              HS3 Pro Edition 3.0.0.435 (Windows 10 vmware)
                              BLOccupied:,UltraNetCam3:,weatherXML:,RFXCOM:,Current Cost 3P:,UltraGCIR3:
                              DMMQTT:,Kodi:,Z-Wave:,BLRadar:,EasyTrigger:,MySensors:,BLBackup:

                              Comment

                              Working...
                              X