Announcement

Collapse
No announcement yet.

I miss the old PageBuilder stuff

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

    #76
    I find HS4 and its SDK to be a step up from HS3, but it has taken a lot of time to start to get my head around it. The bootstrap tutorial is actually quite good.

    There is more focus on client-side operation in HS4 to make the UI compatible with a variety of clients. This part did not exist in HS3. I had always liked tight presentation to fit as much in a small space as I could. With the HS4 views the layout is more spread out to better accommodate fat fingers. What had fit nicely on a standard monitor now needs scrolling to see the entire page.

    The Actions and Triggers are much easier in HS4 than they were in HS3. I left these to last as they looked to me to much different than what I had in HS3 and I wanted to take smaller bites at the start. It may have been easier to start with them. I suspect, however, that they were only easy because because I did my learning in other areas first.

    The PageFactory and general setting of devices/features/VSP/VGP is a little different, but the conversion is easy once you get the hang of it. I have not benchmarked yet, but I am concerned that device-oriented operations will be slower in HS4 as the option no longer exists to used the cached device. Each update needs to remote to get a new copy of the device property. I also had many times were I updated a set of properties of a device at one time before saving the device, but now each property needs to be updated individually.

    The Hubitat plugin was pretty small, had minimal dependence on the UI and a limited set of Device/VSP types of needs. That one got the brunt of the basic learning curve of using the new SDK.

    mcsMQTT is a different story. It is heavy in the UI, does multiple Actions and Triggers, and makes extensive use of Device-oriented methods. It has been about a month of focused development to do its conversion. As I indicated earlier in this thread I wanted to have minimum change in the UI as all the client side logic was complex and too easy to break it with a new design. From the developer side it looks much like the jQuery but bootstrap styling rather than jQuery styling was used to construct each control/view.

    On the journey I have submitted 20 or 30 issues to GitHub. For most I worked around the problems. For some it will result in a plugin limitation until the bug is fixed. Initially I could not determine a bug vs. a lack of understanding. This was the time when I made most use of this forum.

    Both Hubitat and mcsMQTT for HS3 have been in active development during the time I was doing the HS4 port. This meant I had to update both sets of source code to keep the plugins in sync. There is no hope for having a single code base for these two. I am still hoping that I can keep mcsSprinklers with a single code base as I have done since the original standalone and HS1 versions. I have not cracked the book open on this one, but will be doing it soon now that the other two have been completed.

    I will likely go back at some point in the future and make some design changes now that I have a better understanding, but what does exist now is totally acceptable and are going into the HS4 updater.

    Comment


      #77
      Anyone figured out this yeat? :P Just started working on feature pages, and oh man it is frustrating. Trying for the bare minimum of triggering postbackproc with button. But I cant get it to work. Any help would be highly appriciated!

      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="HomeSeer Technologies"> <!--This liquid tag loads all of the necessary css files for HomeSeer--> {{includefile '/bootstrap/css/page_common.css'}} <title>Sample Blank Feature Page</title> </head> <body class="body homeseer-skin"> <!--These liquid tags add the HomeSeer header and navbar to the top of the page when appropriate--> {{includefile 'header.html'}} {{includefile 'navbar.html'}} <!--Primary container for the page content The .container class ensures the page content is fit and centered to the screen--> <div class="container"> <!--This is an intentionally blank page that you can use as a blueprint to create feature pages from--> <button type="button" class="btn btn-default" action="button_press">Save</button> </div> <script> $(document).on('click','button', {} ,function(e){ var data; $(this.attributes).each(function() { var parts = this.nodeName+"="+this.nodeValue; if(data==null) { data = parts; } else { data = data+"&"+parts; } }); var fdata = $(this.form).serialize(); if(fdata != null) { data = data+"&"+fdata } AjaxPost(data,"teslaSeerTest/blankTest.html"); }); </script> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> {{includefile 'bootstrap/js/page_common.js'}} </body> </html>
      Code:
      public override string PostBackProc(string page, string data, string user, int userRights) { HomeSeerSystem.WriteLog(HomeSeer.PluginSdk.Logging.ELogType. Error, "Postback: ", Name); return ""; }

      Comment


        #78
        have you tried the sample vb.net plugin. it has a working example
        Mark

        HS3 Pro 3.0.0.534
        Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
        Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
        Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

        Comment


          #79
          Originally posted by mnsandler View Post
          have you tried the sample vb.net plugin. it has a working example
          I have checked the sample C# plugin. Looks like it is similar to the VB one. Still I am not getting PostBackProc to trigger in my plugin with the simple code above.

          Comment


            #80
            I managed to get it working by modifying the samples.

            Comment


              #81
              salvesen what did you have to change?
              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


                #82
                Seems to me learning bootstrap would be a good use of time while I wait for hs4.2 pdk.

                came across this..... https://www.w3schools.com/bootstrap4 Lots of online examples to play with.

                regarding pinegrow seems like $12/month after 7day free trial...I won’t need it much has anybody tried other alternatives?
                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