Announcement

Collapse
No announcement yet.

Problem with Jon00_HTML2Image utility.

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

    Problem with Jon00_HTML2Image utility.

    It was working last night but today I get this error:
    13/04/2012 19:02:01 Jon00_HTML2Image Error at Webgrab Subroutine Block 1 (Parameter is not valid.)
    The ini file is:
    [Info]
    Version=V1.03
    [Capture1]
    URL=devicestringG54
    ImagePath=GogsLocation.png
    Delay=
    WBWidth=
    WBHeight=
    Crop=
    [Capture2]
    URL=devicestringG51
    ImagePath=HouseHeating.png
    Delay=
    WBWidth=
    WBHeight=
    Crop=
    [Capture3]
    URL=devicestringG55
    ImagePath=Occupancy.png
    Delay=
    WBWidth=
    WBHeight=
    crop=
    [Capture4]
    URL=devicestringG53
    ImagePath=SRTemp.png
    Delay=
    WBWidth=
    WBHeight=
    crop=
    [Capture5]
    URL=devicestringG52
    ImagePath=OSTemp.png
    Delay=
    WBWidth=
    WBHeight=
    crop=
    [Capture6]
    URL=devicestringG50
    ImagePath=Broadband.png
    Delay=
    WBWidth=
    WBHeight=
    crop=
    [Capture7]
    URL=devicestringG56
    ImagePath=Wind.png
    Delay=
    WBWidth=
    WBHeight=
    crop=
    [Capture8]
    URL=devicestringG57
    ImagePath=Gust.png
    Delay=
    WBWidth=
    WBHeight=
    crop=
    I am calling the routine like this:
    Attached Files
    sigpic
    A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

    #2
    Originally posted by Pete
    Gordon,

    What does your Jon00_HTML2Image.ini file look like. The one you posted is the Jon00ImageDemo1.ini.

    Here's what my #2 Jon00_HTML2Image.ini entry looks like:
    Pete, the ini I have posted is the ini it's using.
    sigpic
    A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

    Comment


      #3
      I never saw a png file in the html location. How does your scripting references look in the settings ini file. I put a comma where a period should be on mine when I put in the weather xml stuff. Mine looks like:

      ScriptingReferences=System.XML;System.XML.dll,System.Drawing ;System.Drawing.dll,System.Drawing.Image;System.Drawing.dll, system.data;System.Data.Dll;system.Web;system.Web.Dll
      - Pete

      Auto mator
      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb- Mono 6.12.X - HSTouch on Intel tabletop tablets
      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.12.X
      HS4 Pro - V4.1.17.0 - Ubuntu 20.01/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb - Mono
      6.12.0.122
      HS4 Lite -

      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

      Comment


        #4
        Originally posted by Pete View Post
        I never saw a png file in the html location. How does your scripting references look in the settings ini file. I put a comma where a period should be on mine when I put in the weather xml stuff. Mine looks like:
        The png files are in html/images/,

        I wondered about the comma, as you say it should be a semi-colon, but thats what the instructions say and the emphisise it's a comma!

        I think I will change it and see what happens.
        sigpic
        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

        Comment


          #5
          Do not change it - it screws up completely.
          sigpic
          A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

          Comment


            #6
            Gogs,

            I cannot see what would cause it. Is it only Capture 2 causing the issue?
            Jon

            Comment


              #7
              Originally posted by jon00 View Post
              Gogs,

              I cannot see what would cause it. Is it only Capture 2 causing the issue?
              Hi Jon, I did not think you would spot anything wrong as it is set up basically text book.

              It's all Captures except Capture 1!

              I think I may have found the problem, the script is being called for a different capture while it is still running. I am going to try and prevent that happening by just calling the script once with no parms every so often.
              sigpic
              A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

              Comment


                #8
                Originally posted by Gogs View Post
                Hi Jon, I did not think you would spot anything wrong as it is set up basically text book.

                It's all Captures except Capture 1!

                I think I may have found the problem, the script is being called for a different capture while it is still running. I am going to try and prevent that happening by just calling the script once with no parms every so often.
                How about only allowing one instance of the script to run in each event?
                Jon

                Comment


                  #9
                  Originally posted by jon00 View Post
                  How about only allowing one instance of the script to run in each event?
                  That did work, however, running it without any Parm works great so leaving it at that.

                  Is there any way to set the background to transparent?
                  sigpic
                  A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                  Comment


                    #10
                    Originally posted by Gogs View Post
                    That did work, however, running it without any Parm works great so leaving it at that.

                    Is there any way to set the background to transparent?
                    No, but that can be done by running it through my Image builder utility.
                    Jon

                    Comment


                      #11
                      Originally posted by jon00 View Post
                      No, but that can be done by running it through my Image builder utility.
                      OK so are you saying dump the HTML2Image utility and go for the image builder?
                      sigpic
                      A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                      Comment


                        #12
                        No, You would need to put the captured image through image builder to achieve background transparency. I appreciate it is another process but it works!
                        Jon

                        Comment


                          #13
                          Originally posted by Gogs View Post
                          That did work, however, running it without any Parm works great so leaving it at that.

                          Is there any way to set the background to transparent?
                          OK, I spoke far too soon.

                          Error error error everytime. So I thought I would look at the HS ini file entry as I have alwayas thought it was wrong. So where I added the drawing bit to the Scriptingreferences I changed it to what I thought it should be, thus
                          Code:
                          ScriptingReferences=System.XML;System.XML.dll;System.Drawing;System.Drawing.dll
                          that caused havoc in the logs, so changed it back to
                          Code:
                          ScriptingReferences=System.XML;System.XML.dll, System.Drawing;System.Drawing.dll
                          and that gave me the original error back!
                          01/05/2012 22:48:40 ~!~Jon00_HTML2Image~!~Error at Webgrab Subroutine Block 1 (Parameter is not valid.)
                          This happens every time it runs regardless of instance called, however, stangely, after a reboot it does not fail untill HS has ben running for about 4/5 hours.

                          Any ideas as I am stumpted.
                          sigpic
                          A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                          Comment


                            #14
                            Gogs,

                            When this happens again, change the image file names in the ini file temporarily to see if the problem goes away. It maybe that you are using the image and it is somehow locking it so that the file cannot be updated.

                            It's not the solution, but need to identify what is causing the error.
                            Jon

                            Comment


                              #15
                              Ok Jon, will do.

                              I have made a slight change to the way things trigger. I had some of the graphs triggering every 5 mins and others every 30, noticed in the log of the one that triggers every 5 mins
                              01/05/2012 23:48:34 ~!~Script~!~Script Jon00VDGraphing.vben("Main","8") is currently running, waiting for it complete before its run again
                              01/05/2012 23:58:34 ~!~Script~!~Script Jon00VDGraphing.vben("Main","8") is currently running, waiting for it complete before its run again
                              so have changed the events to all trigger together every 30 mins and the graph to image 10 mins after that using the wait command in the event.
                              sigpic
                              A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                              Comment

                              Working...
                              X