Announcement

Collapse
No announcement yet.

Jon00 DataScraper/JSON Parser Script For Homeseer 3 and Homeseer 4

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Jon00 DataScraper/JSON Parser Script For Homeseer 3 and Homeseer 4

    Hi jon ,

    i open this topic , its better than in jon00RSS


    Ok , i tested it , i also updated THe scraper plugin .... and did (Devicemode=2) it works got no image anymore... but 1 or 3 times than it will be triggering again ,

    If u have time and if u can add this feature on it :

    TriggerString=
    TriggerEvent=

    It will fix the problem.


    Kind regards and thanks for the help
    Last edited by jon00; June 3, 2019, 04:32 AM.
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

    #2
    I've sent you a new version to try.

    Here is a resume:

    This package enables scrape data/parse JSON from remote/local web pages and/or files on your network. The package uses regular expressions (regex) to pattern match and knowledge of this is preferable.

    The script is very powerful & highly configurable. It has the following features:

    » Allows you to create your own virtual devices containing text and data, scraped from web pages/text files including XML.
    » Optional JSON Parser built-in as an alternative to Regex.
    » Support for https/SSL and some web credentials.
    » Support for GET and POST.
    » Uses regular expressions with pattern matches as the scraping method
    » Extraction of multiple data metrics/strings is possible from a single web site.
    » Multiple devices can be created from the data obtained with a mix of your own text/images & scraped data.
    » Optional speak button on each virtual device.
    » Optional triggering of events if specific string(s) are found in the constructed device string.
    » Manipulation of data using Mathematical, Conversion and string expressions. These include:

    Click image for larger version  Name:	Capture.PNG Views:	174 Size:	362.3 KB ID:	1376245

    The supplied configuration demonstrates scraping data from wunderground.com to obtain the USA Pollen levels from a single web page grab and creating multiple grouped devices as shown below.

    As always, it can be downloaded from my site. Click on my banner below).

    (No Banner seen?- check your Forum Settings - User Settings, Account, Tick 'Show Signature')
    Click image for larger version  Name:	image_75944.png Views:	74 Size:	44.0 KB ID:	1279234
    Last edited by jon00; April 9, 2020, 02:58 AM.
    Jon

    Comment


      #3
      Perfect , the new version works like it should now ,

      It has indeed the same things as rss

      thanks for all the help and fixing + updating the script !!!


      Kind regards
      And have a nice weekend
      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




      HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

      Comment


        #4
        Thanks for the confirmation. V1.0.2 is now available for download.
        Jon

        Comment


          #5
          I need a littlebit info over how to use the grab file

          I opened my grab8 file and i see this code below

          PHP Code:
           <h2 class="forecastdag" ng-if="forecast.rain">
                          
          the next 3 hours no rain <span ng-if="noRain" style="color:rgb(109,174, 223);">(the next 3 hours no rain)</span>
                          <
          span ng-if="!noRain&&!forecast.rain.snow&&forecast.rain.sleet" style="color:rgb(109,174, 223);">(No likes)</span>
                          <
          span ng-if="!noRain&&forecast.rain.snow" style="color:rgb(109,174, 223);">(no likes)</span>
                      </
          h2
          i need this: (the next 3 hours no rain) how can i do that , i already try everything , i cant get it ....

          i have try this and without the : (?s)
          PHP Code:
          Pattern1=(?s)<h2 class="forecastdag" ng-if="forecast.rain">(.*?)<span ng-if="noRain" style="color:rgb(109,174, 223);">(the next 3 hours no rain
          Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
          Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




          HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

          Comment


            #6
            Try something simple like:

            PHP Code:
            Pattern1=(?s)if="forecast.rain">(.*?)<span 
            Jon

            Comment


              #7
              Hi jon

              thanks , now i know how it works , thanks for it

              everything is working now , i understand the grab code now


              Originally posted by jon00 View Post
              Try something simple like:

              PHP Code:
              Pattern1=(?s)if="forecast.rain">(.*?)<span 
              Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
              Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




              HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

              Comment


                #8
                jon there is a bug in the scripts , i dont know what script ,

                if i restart homeseer , your scripts are gonna trigger every second.... i set it up recurring every 10 minutes...

                i get all the time memory loss , u maybe know what to to ?

                ig i go and disable and enable again it works after restart ... but then i need to do that at all the 10 events

                or is it an homeseer issue ?
                Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                Comment


                  #9
                  It's a longstanding bug in HS3 which can be viewed here: http://bugzilla.homeseer.com/bugzill...ug.cgi?id=1710

                  Because of the bug, I wrote this.
                  Jon

                  Comment


                    #10
                    hi jon , thanks i will try

                    but yesterday everything work, but maybe it was because i never restarted ..


                    im checking the logs and try to fix it , i will report asap
                    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                    HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                    Comment


                      #11
                      It has nothing to do with the script.

                      There are just certain conditions when Homeseer's event engine keeps triggering events over and over again, despite the settings. Rich just cannot pinpoint the problem. If you read the bugzilla report, many people have experienced what you are seeing now.
                      Jon

                      Comment


                        #12
                        I got a fix and test it , i enabled cannot re-run for (enter the same time as the rec and it works)
                        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                        HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                        Comment


                          #13
                          i restarted homeseer and still working

                          i tested in 174

                          now i gonna test it on the last version of homeseer
                          Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                          Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                          HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                          Comment


                            #14
                            JON i fixed it , it works !!!!

                            its just a simple button haha
                            Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
                            Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




                            HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

                            Comment


                              #15
                              Don't speak too soon......
                              Jon

                              Comment

                              Working...
                              X