Announcement

Collapse
No announcement yet.

Jon00 Ini Editor for Homeseer 3 & Homeseer 4

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

    Jon00 Ini Editor for Homeseer 3 & Homeseer 4

    This is a simple web page that can be used to add, delete or alter entries in any ini file contained in Homeseer's Config directory.

    The page has the option to run a defined event specific to the file displayed so that you can easily run this to act on any changes to the ini file.

    Hopefully it may appease some of you with my obsession of using ini files and now allowing editing via the web server

    As always, you can download it from my site (click on my banner below).

    Any problems, please post them here.

    Works on Windows and Linux (which support ASP.NET).
    Attached Files
    Last edited by jon00; April 18, 2020, 07:11 AM.
    Jon


    #2
    Originally posted by jon00 View Post
    This is a simple web page that can be used to add, delete or alter entries in any ini file contained in the Homeseer HS3/Config directory.

    Hopefully it may appease some of you with my obsession of using ini files and now allowing editing via the web server

    As always, you can download it from my site (click on my banner below).

    Any problems, please post them here.

    Works on Windows and Linux (which support ASP.NET).
    Thanks Jon.

    This looks like just what we were after. I will give it a go.

    Greig.
    Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
    X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
    Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
    Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
    Scripts =
    Various

    Comment


      #3
      V1.0.1 Released

      I've corrected a small bug where HTML encoded special characters were not saved as per the original file.

      Guest access is now not allowed to view the page.

      I've also updated the docs regarding issues with saving ini files containing HTML style tags and how this can be overcome.
      Jon

      Comment


        #4
        Hi Jon,

        Nice tool! Comes in handy with my Jon00 plugins!

        May I propose two feature enhancements?

        1. Option to create a second copy of the ini backup files with date/timestamp (e.g. yyyymmdd_hhmm_filename.ini). This will create a history of backups, each identifiable by edit date/time, and prevent the possibility of inadvertently overwriting original data. The Restore option would still restore the filename.ini, but having archived copies (managed manually) would be piece of mind.

        2. Add a blank section at the end of the list of sections that can be edited to allow the creation of sections, if needed. Rethinking this... would this be already possible by simply adding a section inside an existing section in the HTML?
        Mike

        Comment


          #5
          Thanks...

          On the second point, you can now.

          Go to the bottom of one of the ini sections and just add the new ini section i.e. [Test], then press 'save changes' and the new section will be created in the location you want.

          I'll add the first feature request on the next update.
          Last edited by jon00; October 18, 2015, 12:33 PM.
          Jon

          Comment


            #6
            Like !

            Comment


              #7
              Originally posted by jon00 View Post
              This is a simple web page that can be used to add, delete or alter entries in any ini file contained in the Homeseer HS3/Config directory.

              Hopefully it may appease some of you with my obsession of using ini files and now allowing editing via the web server HAHA


              Works on Windows and Linux (which support ASP.NET).
              Thanks JON!!! This is just insanely helpful! Just saw it. Who needs a UI when you have this lol?

              Comment


                #8
                Originally posted by Summerguy View Post
                Thanks JON!!! This is just insanely helpful! Just saw it. Who needs a UI when you have this lol?
                Good to here!
                Jon

                Comment


                  #9
                  Hey Jon,

                  How can I run the ini editor from the HS3 dashboard without having to type in jon00inieditor.aspx.

                  I'm going to use it to hold notes and a to-do list on a fictitious ini file called notes.ini and would like to access it easily from any browser on any device without having to remember the link.

                  Comment


                    #10
                    You can add it to the HomeSeer menu by using the custom links (Setup/Custom tab).
                    Jon

                    Comment


                      #11
                      Add a link to it (the aspx URL) using the Homeseer dashboard, Tools-> Setup-> and then "Custom" tab, where you can set up additional web pages. Or you can download Jon00Links, which allows you to add a lot more links to the dropdown menus, and even add a couple additional rows of your own custom links.

                      Jon00's stuff is awesome!

                      Comment


                        #12
                        Thanks Jon and jhirschhorn - I forgot about the custom page option. I've never put it to use. That's exactly what I was looking for.

                        Comment


                          #13
                          Hi Jon, script works, however I get this error when trying to change/save Jon00Links.ini:
                          Server Error in '/' Application.

                          A potentially dangerous Request.Form value was detected from the client (s2="..., Timers, & Counters"
                          2UR...").


                          Description: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874.

                          Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (s2="..., Timers, & Counters"
                          2UR...").

                          Source Error:
                          The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

                          1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

                          <%@ Page Language="C#" Debug="true" %>

                          or:

                          2) Add the following section to the configuration file of your application:

                          <configuration>
                          <system.web>
                          <compilation debug="true"/>
                          </system.web>
                          </configuration>

                          Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

                          Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
                          Stack Trace:
                          [HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (s2="..., Timers, &#38; Counters" 2UR...").] System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +324 System.Web.HttpRequest.ValidateHttpValueCollection(HttpValue Collection collection, RequestValidationSource requestCollection) +239 System.Web.HttpRequest.get_Form() +50 System.Web.HttpRequest.get_HasForm() +61 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +48 System.Web.UI.Page.DeterminePostBackMode() +82 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5796 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +250 System.Web.UI.Page.ProcessRequest() +73 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +23 System.Web.UI.Page.ProcessRequest(HttpContext context) +111 ASP.jon00inieditor_aspx.ProcessRequest(HttpContext context) +37 System.Web.CallHandlerExecutionStep.System.Web.HttpApplicati on.IExecutionStep.Execute() +772 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73

                          Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.3928.0



                          EDIT : same thing for on00BBCWeatherHS3.ini




                          Comment


                            #14
                            I expect you are trying to save something to the ini that contains < > tags (such as html) or content with '&#' together. The error is ASP.NET4 protection to stop cross site injection (XSS) attacks.

                            You can override this behavior by modifying the web.config file found in your html directory. Open this up in a text editor and find the line:

                            <system.web>

                            Add the following 2 lines underneath this tag:

                            <pages validateRequest="false" />
                            <httpRuntime requestValidationMode="2.0"/>


                            Then save the changes. I would only recommend this if you do not expose your HS server to the internet.
                            Jon

                            Comment


                              #15
                              Thanks for the feedback Jon,
                              Once I add the 2 lines, I get this when starting the script:
                              Server Error in '/' Application.


                              Configuration Error

                              Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

                              Parser Error Message: Unrecognized configuration section pages.

                              Source Error:

                              An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
                              Source File: C:\Program Files (x86)\HomeSeer HS3\html\web.config Line: 46


                              Show Additional Configuration Errors:
                              Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.3928.0





                              my web.config looks like this (bottom part)



                              <sessionState
                              timeout="40"
                              />


                              </system.web>
                              <pages validateRequest="false" />
                              <httpRuntime requestValidationMode="2.0"/>
                              </configuration>


                              Thx








                              Comment

                              Working...
                              X