Announcement

Collapse
No announcement yet.

Need Help Scraping Device's (Rock's BBQ Stoker) Web Page using Node-RED

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

    Need Help Scraping Device's (Rock's BBQ Stoker) Web Page using Node-RED

    I wan't to first start off with everything I'm trying to do is brand new to me, so I'm wildly ill-equipped to walk down this road correctly.

    Main Goal: To pull the Probes Serial Number, Name and Temperature into HS devices

    Secondary Goal: To change Target Temperature from HS

    Progress: I'm able to get the the raw html data (See screen shots below)

    Problem: I don't know how to pull out just the data I need to put into HS.


    Flow So far
    Click image for larger version

Name:	2021-08-15_7-26-36.png
Views:	252
Size:	89.9 KB
ID:	1489422


    Click image for larger version

Name:	2021-08-15_8-03-57.png
Views:	188
Size:	273.9 KB
ID:	1489423


    The Devices Web Page
    Click image for larger version

Name:	2021-08-15_7-18-46.png
Views:	201
Size:	211.1 KB
ID:	1489424

    Raw HTML data (using Flow above) showing Key information needed. The class ser_num only returns the probes serial number.

    However the raw data present here always presents the class and serial number associated with the correct Probe Name and Temp.
    Click image for larger version

Name:	2021-08-15_7-22-29.png
Views:	198
Size:	335.2 KB
ID:	1489425
    RJ_Make On YouTube

    #2
    Could you copy your entire output of the HTML Node between CODE tags so I can try to get something together for you?
    Karl S
    HS4Pro on Windows 10
    1070 Devices
    56 Z-Wave Nodes
    104 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

    Comment


      #3
      Originally posted by ksum View Post
      Could you copy your entire output of the HTML Node between CODE tags so I can try to get something together for you?
      What are CODE tags?
      RJ_Make On YouTube

      Comment


        #4
        You can click the # symbol icon in the editor and then paste the information between the text provided or select text and then click the # icon. Or manually type it. Wee the image below. I added spaces below so it would show
        [ CODE]my text[/ CODE]
        will yield:
        Code:
        my text
        when the space in front of "Code" is removed.


        Click image for larger version

Name:	HS1.png
Views:	173
Size:	214.5 KB
ID:	1489702
        Karl S
        HS4Pro on Windows 10
        1070 Devices
        56 Z-Wave Nodes
        104 Events
        HSTouch Clients: 3 Android, 1 iOS
        Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

        Comment


          #5
          Ah ok now I understand, Forum CODE tags here.. SMH, I should slowly back away from the keyboard at this point..

          Anyway, thanks your for help and patience..

          Here are a few of strings contained in the returned array.

          #0
          is just web form data.

          #1
          Code:
          <td class="ser_num"><b>Blower</b></td>
          <td><b>Available Blowers</b></td>
          #2
          Code:
          <td class="ser_num">CE0000002C02153A</td>
          <td><input size="16" maxlength="32" name="n2CE0000002C02153A" value="Blower_One"/></td>
          #3
          Code:
          <td colspan="2">
          <table border="2" cellpadding="5">
          <tbody><tr>
          <td class="ser_num"><b>Temp Sensor</b></td>
          <td><b>Description</b></td>
          <td><b>Temp</b></td>
          <td><b>Target</b></td>
          <td><b>Alarm</b></td>
          <td><b>Low Set</b></td>
          <td><b>High Set</b></td>
          <td><b>Blower</b></td>
          </tr>
          
          <tr><td colspan="7"><b>Control Sensors</b></td></tr>
          <tr>
          <td class="ser_num">3B000012BE26A930</td>
          <td><input size="16" maxlength="32" name="n13B000012BE26A930" value="Pit_Probe_1"/></td>
          <td>76.9</td>
          <td><input size="6" maxlength="6" name="ta3B000012BE26A930" value="50.0"/></td>
          <td><select name="al3B000012BE26A930" onchange="do_disable(0, 0)">
          </select>
          </td>
          <td><input size="6" maxlength="6" name="tl3B000012BE26A930" value="180.0"/></td>
          <td><input size="6" maxlength="6" name="th3B000012BE26A930" value="200.0"/></td>
          <td><select name="sw3B000012BE26A930">
          </select>
          </td>
          </tr>
          <tr><td colspan="7"><b>Alarm Sensors (None)</b></td></tr>
          <tr><td colspan="7"><b>Monitoring Sensors</b></td></tr>
          <tr>
          <td class="...
          #4
          Code:
          <td class="ser_num"><b>Temp Sensor</b></td>
          <td><b>Description</b></td>
          <td><b>Temp</b></td>
          <td><b>Target</b></td>
          <td><b>Alarm</b></td>
          <td><b>Low Set</b></td>
          <td><b>High Set</b></td>
          <td><b>Blower</b></td>
          #5
          Code:
          <td colspan="7"><b>Control Sensors</b></td>
          #6
          Code:
          <td class="ser_num">3B000012BE26A930</td>
          <td><input size="16" maxlength="32" name="n13B000012BE26A930" value="Pit_Probe_1"/></td>
          <td>76.7</td>
          <td><input size="6" maxlength="6" name="ta3B000012BE26A930" value="50.0"/></td>
          <td><select name="al3B000012BE26A930" onchange="do_disable(0, 0)">
          </select>
          </td>
          <td><input size="6" maxlength="6" name="tl3B000012BE26A930" value="180.0"/></td>
          <td><input size="6" maxlength="6" name="th3B000012BE26A930" value="200.0"/></td>
          <td><select name="sw3B000012BE26A930">
          </select>
          </td>
          #7
          Code:
          <td colspan="7"><b>Alarm Sensors (None)</b></td>
          #8
          Code:
          <td colspan="7"><b>Monitoring Sensors</b></td>
          #9
          Code:
          <td class="ser_num">8F000012B737A030</td>
          <td><input size="16" maxlength="32" name="n18F000012B737A030" value="Meat_Probe_1"/></td>
          <td>73.8</td>
          <td><input size="6" maxlength="6" name="ta8F000012B737A030" value="160.0"/></td>
          <td><select name="al8F000012B737A030" onchange="do_disable(0, 0)">
          </select>
          </td>
          <td><input size="6" maxlength="6" name="tl8F000012B737A030" value="32.0"/></td>
          <td><input size="6" maxlength="6" name="th8F000012B737A030" value="155.0"/></td>
          <td><select name="sw8F000012B737A030">
          </select>
          </td>
          #10
          Code:
          <td class="ser_num">51000012BF65E830</td>
          <td><input size="16" maxlength="32" name="n151000012BF65E830" value="Meat_Probe_2"/></td>
          <td>71.9</td>
          <td><input size="6" maxlength="6" name="ta51000012BF65E830" value="160.0"/></td>
          <td><select name="al51000012BF65E830" onchange="do_disable(1, 0)">
          </select>
          </td>
          <td><input size="6" maxlength="6" name="tl51000012BF65E830" value="32.0"/></td>
          <td><input size="6" maxlength="6" name="th51000012BF65E830" value="155.0"/></td>
          <td><select name="sw51000012BF65E830">
          </select>
          </td>
          #11 and #12 and just web form fields


          I worked on this quite a bit yesterday and this is what I've been able to come up with, BUT I don't like it as I loose Probe Name and Target Temp.

          It also uses tbody and the output setting of "only the text content of the elements"

          Here's what one of the arrays looks like.

          Code:
          
          
          Stoker Status
          Powered by Rock's Bar-B-Que
          Software by kaytat & K6JQ, Version
          
          11.0.2.1
          
          
          
          
          
          Blower
          Available Blowers
          
          
          CE0000002C02153A
          
          
          
          
          
          
          
          
          
          
          Temp Sensor
          Description
          Temp
          Target
          Alarm
          Low Set
          High Set
          Blower
          
          
          Control Sensors
          
          3B000012BE26A930
          
          77.4
          
          
          
          
          
          
          
          
          
          
          Alarm Sensors (None)
          Monitoring Sensors
          
          8F000012B737A030
          
          74.0
          
          
          
          
          
          
          
          
          
          
          
          51000012BF65E830
          
          71.4
          
          
          
          
          
          
          
          
          
          
          
          
          Temp Sensor
          Description
          Temp
          Target
          Alarm
          Low Set
          High Set
          Blower
          
          
          
          
          
          
          
          Show serial numbers

          The flow using the "String Function"
          Click image for larger version  Name:	2021-08-16_16-49-41.png Views:	0 Size:	173.5 KB ID:	1489707

          I having the string function decode the HTML Entities

          Click image for larger version  Name:	2021-08-16_17-14-18.png Views:	0 Size:	282.9 KB ID:	1489708
          RJ_Make On YouTube

          Comment


            #6
            Oh Nice!!!

            If the debug output circled below goes with the Monitoring Sensor, you are golden for extracting the information! msg.payload[5][1] should be the serial # and msg.payload[5][2] should be the temperature for that. I would have to test it out, and can tomorrow. Maybe this gets you closer?

            I would really like a copy of the complete message (not just msg.payload) from the tbody node. Double click that debug node and change the Output field to complete msg object then paste the output inside CODE tags, please. See the second image below for how you can copy the entre message.


            Click image for larger version

Name:	HS1.jpg
Views:	168
Size:	41.1 KB
ID:	1489712


            Click image for larger version

Name:	HS1.png
Views:	164
Size:	15.1 KB
ID:	1489713
            Karl S
            HS4Pro on Windows 10
            1070 Devices
            56 Z-Wave Nodes
            104 Events
            HSTouch Clients: 3 Android, 1 iOS
            Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

            Comment


              #7


              Here you go. tbody>tr AND just tbody

              tbody>tr
              Code:
              {"_msgid":"67270aebc3936a5d","payload":["<td>\n<p>\n<font size=\"+2\"><b>Stoker Status</b></font><br/>\nPowered by <a href=\"http://www.rocksbarbque.com\">Rock&apos;s Bar-B-Que</a><br/>\nSoftware by kaytat &amp; K6JQ, Version\n\n11.0.2.1\n</p>\n<script type=\"text/javascript\">\n&lt;!--\ndocument.write(Date() + &quot;&lt;br&gt;&lt;b&gt;Temperatures in F&lt;\\/b&gt;&quot;);\n//--&gt;\n</script>\n</td>\n<td align=\"right\">\n<table border=\"2\" cellpadding=\"5\">\n<tbody><tr><td class=\"ser_num\"><b>Blower</b></td>\n<td><b>Available Blowers</b></td></tr>\n\n<tr>\n<td class=\"ser_num\">CE0000002C02153A</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n2CE0000002C02153A\" value=\"Blower_One\"/></td>\n</tr>\n\n</tbody></table>\n</td>","<td class=\"ser_num\"><b>Blower</b></td>\n<td><b>Available Blowers</b></td>","<td class=\"ser_num\">CE0000002C02153A</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n2CE0000002C02153A\" value=\"Blower_One\"/></td>","<td colspan=\"2\">\n<table border=\"2\" cellpadding=\"5\">\n<tbody><tr>\n<td class=\"ser_num\"><b>Temp Sensor</b></td>\n<td><b>Description</b></td>\n<td><b>Temp</b></td>\n<td><b>Target</b></td>\n<td><b>Alarm</b></td>\n<td><b>Low Set</b></td>\n<td><b>High Set</b></td>\n<td><b>Blower</b></td>\n</tr>\n\n<tr><td colspan=\"7\"><b>Control Sensors</b></td></tr>\n<tr>\n<td class=\"ser_num\">3B000012BE26A930</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n13B000012BE26A930\" value=\"Pit_Probe_1\"/></td>\n<td>75.7</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"ta3B000012BE26A930\" value=\"50.0\"/></td>\n<td><select name=\"al3B000012BE26A930\" onchange=\"do_disable(0, 0)\">\n</select>\n</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"tl3B000012BE26A930\" value=\"180.0\"/></td>\n<td><input size=\"6\" maxlength=\"6\" name=\"th3B000012BE26A930\" value=\"200.0\"/></td>\n<td><select name=\"sw3B000012BE26A930\">\n</select>\n</td>\n</tr>\n<tr><td colspan=\"7\"><b>Alarm Sensors (None)</b></td></tr>\n<tr><td colspan=\"7\"><b>Monitoring Sensors</b></td></tr>\n<tr>\n<td class=\"...","<td class=\"ser_num\"><b>Temp Sensor</b></td>\n<td><b>Description</b></td>\n<td><b>Temp</b></td>\n<td><b>Target</b></td>\n<td><b>Alarm</b></td>\n<td><b>Low Set</b></td>\n<td><b>High Set</b></td>\n<td><b>Blower</b></td>","<td colspan=\"7\"><b>Control Sensors</b></td>","<td class=\"ser_num\">3B000012BE26A930</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n13B000012BE26A930\" value=\"Pit_Probe_1\"/></td>\n<td>75.7</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"ta3B000012BE26A930\" value=\"50.0\"/></td>\n<td><select name=\"al3B000012BE26A930\" onchange=\"do_disable(0, 0)\">\n</select>\n</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"tl3B000012BE26A930\" value=\"180.0\"/></td>\n<td><input size=\"6\" maxlength=\"6\" name=\"th3B000012BE26A930\" value=\"200.0\"/></td>\n<td><select name=\"sw3B000012BE26A930\">\n</select>\n</td>","<td colspan=\"7\"><b>Alarm Sensors (None)</b></td>","<td colspan=\"7\"><b>Monitoring Sensors</b></td>","<td class=\"ser_num\">8F000012B737A030</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n18F000012B737A030\" value=\"Meat_Probe_1\"/></td>\n<td>72.5</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"ta8F000012B737A030\" value=\"160.0\"/></td>\n<td><select name=\"al8F000012B737A030\" onchange=\"do_disable(0, 0)\">\n</select>\n</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"tl8F000012B737A030\" value=\"32.0\"/></td>\n<td><input size=\"6\" maxlength=\"6\" name=\"th8F000012B737A030\" value=\"155.0\"/></td>\n<td><select name=\"sw8F000012B737A030\">\n</select>\n</td>","<td class=\"ser_num\">51000012BF65E830</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n151000012BF65E830\" value=\"Meat_Probe_2\"/></td>\n<td>72.9</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"ta51000012BF65E830\" value=\"160.0\"/></td>\n<td><select name=\"al51000012BF65E830\" onchange=\"do_disable(1, 0)\">\n</select>\n</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"tl51000012BF65E830\" value=\"32.0\"/></td>\n<td><input size=\"6\" maxlength=\"6\" name=\"th51000012BF65E830\" value=\"155.0\"/></td>\n<td><select name=\"sw51000012BF65E830\">\n</select>\n</td>","<td class=\"ser_num\"><b>Temp Sensor</b></td>\n<td><b>Description</b></td>\n<td><b>Temp</b></td>\n<td><b>Target</b></td>\n<td><b>Alarm</b></td>\n<td><b>Low Set</b></td>\n<td><b>High Set</b></td>\n<td><b>Blower</b></td>","<td colspan=\"2\">\n<br/>\n<input type=\"checkbox\" name=\"qq\"/>Show serial numbers<br/>\n<input type=\"submit\" value=\"Save Changes\"/>\n</td>"],"topic":"","statusCode":200,"headers":{"content-type":"text/html","date":"Tue, 17 Aug 2021 09:25:48 GMT","pragma":"no-cache","expires":"0","cache-control":"no-cache, no-store, must-revalidate","x-node-red-request-node":"83bde850"},"responseUrl":"REMOVED/index.html","redirectList":[],"retry":0}
              tbody
              Code:
              {"_msgid":"5bf89f2dec19f04c","payload":["<tr>\n<td>\n<p>\n<font size=\"+2\"><b>Stoker Status</b></font><br/>\nPowered by <a href=\"http://www.rocksbarbque.com\">Rock&apos;s Bar-B-Que</a><br/>\nSoftware by kaytat &amp; K6JQ, Version\n\n11.0.2.1\n</p>\n<script type=\"text/javascript\">\n&lt;!--\ndocument.write(Date() + &quot;&lt;br&gt;&lt;b&gt;Temperatures in F&lt;\\/b&gt;&quot;);\n//--&gt;\n</script>\n</td>\n<td align=\"right\">\n<table border=\"2\" cellpadding=\"5\">\n<tbody><tr><td class=\"ser_num\"><b>Blower</b></td>\n<td><b>Available Blowers</b></td></tr>\n\n<tr>\n<td class=\"ser_num\">CE0000002C02153A</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n2CE0000002C02153A\" value=\"Blower_One\"/></td>\n</tr>\n\n</tbody></table>\n</td>\n</tr>\n<tr>\n<td colspan=\"2\">\n<table border=\"2\" cellpadding=\"5\">\n<tbody><tr>\n<td class=\"ser_num\"><b>Temp Sensor</b></td>\n<td><b>Description</b></td>\n<td><b>Temp</b></td>\n<td><b>Target</b></td>\n<td><b>Alarm</b></td>\n<td><b>Low Set</b></td>\n<td><b>High Set</b></td>\n<td><b>Blower</b></td>\n</tr>\n\n<tr><td colspan=\"7\"><b>Control Sensors</b></td></tr...","<tr><td class=\"ser_num\"><b>Blower</b></td>\n<td><b>Available Blowers</b></td></tr>\n\n<tr>\n<td class=\"ser_num\">CE0000002C02153A</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n2CE0000002C02153A\" value=\"Blower_One\"/></td>\n</tr>","<tr>\n<td class=\"ser_num\"><b>Temp Sensor</b></td>\n<td><b>Description</b></td>\n<td><b>Temp</b></td>\n<td><b>Target</b></td>\n<td><b>Alarm</b></td>\n<td><b>Low Set</b></td>\n<td><b>High Set</b></td>\n<td><b>Blower</b></td>\n</tr>\n\n<tr><td colspan=\"7\"><b>Control Sensors</b></td></tr>\n<tr>\n<td class=\"ser_num\">3B000012BE26A930</td>\n<td><input size=\"16\" maxlength=\"32\" name=\"n13B000012BE26A930\" value=\"Pit_Probe_1\"/></td>\n<td>75.7</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"ta3B000012BE26A930\" value=\"50.0\"/></td>\n<td><select name=\"al3B000012BE26A930\" onchange=\"do_disable(0, 0)\">\n</select>\n</td>\n<td><input size=\"6\" maxlength=\"6\" name=\"tl3B000012BE26A930\" value=\"180.0\"/></td>\n<td><input size=\"6\" maxlength=\"6\" name=\"th3B000012BE26A930\" value=\"200.0\"/></td>\n<td><select name=\"sw3B000012BE26A930\">\n</select>\n</td>\n</tr>\n<tr><td colspan=\"7\"><b>Alarm Sensors (None)</b></td></tr>\n<tr><td colspan=\"7\"><b>Monitoring Sensors</b></td></tr>\n<tr>\n<td class=\"ser_num\">8F000012B737A030</td>\n<td><input size=\"16\" maxleng..."],"topic":"","statusCode":200,"headers":{"content-type":"text/html","date":"Tue, 17 Aug 2021 09:29:08 GMT","pragma":"no-cache","expires":"0","cache-control":"no-cache, no-store, must-revalidate","x-node-red-request-node":"6f4eeee0"},"responseUrl":"REMOVED","redirectList":[],"retry":0}
              RJ_Make On YouTube

              Comment


                #8
                Coming out of your Monitoring Sensors node you can access each item with msg.payload[1] for the Sensor Serial #, msg.payload[2] = the Temp for that sensor. This is probably the easiest way to split the flow and keep track of what each item contains.

                OR: Change your Edit HTML Node to look like this:
                Click image for larger version

Name:	HS1.png
Views:	166
Size:	19.4 KB
ID:	1489861

                This will then generate a msg.payload which is an array of all the table's text items, one entry for each table cell. It MAY look something like this:
                Click image for larger version

Name:	HS2.png
Views:	158
Size:	23.3 KB
ID:	1489862


                Now you will have one message with the entire table, where each table item is an array item. msg.payload[21] is a Temperature, in this case for Meat Probe 1. Note that I recreated PART of the website to be able to test this. Your results may be different using this last option.

                I am interested in how your flow is put together as there are some settings in the Edit String Node which are not shown. Could you Export the Flow and place it in a reply between Code tags?

                I know this only gets your primary goal. Does the unit have the ability to set the target temperature via a URL or other method?
                Karl S
                HS4Pro on Windows 10
                1070 Devices
                56 Z-Wave Nodes
                104 Events
                HSTouch Clients: 3 Android, 1 iOS
                Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                Comment


                  #9
                  My post got screwed up, anyway the probes can move around depending on usage setting. See pics

                  Code:
                  [{"id":"a7065ccc9d946145","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"c603be70ab9eddc9","type":"inject","z":"a7065ccc9d946145","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":120,"wires":[["7b251e4796b162cf"]]},{"id":"7b251e4796b162cf","type":"http request","z":"a7065ccc9d946145","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.1.21:7777/index.html","tls":"","persist":false,"proxy":"","authType":"","x":250,"y":120,"wires":[["e4b259af3ce23cd7"]]},{"id":"c6016d1188c370ca","type":"string","z":"a7065ccc9d946145","name":"Control Sensors","methods":[{"name":"decodeHTMLEntities","params":[]},{"name":"between","params":[{"type":"str","value":"Control Sensors"},{"type":"str","value":"Alarm Sensors"}]},{"name":"trim","params":[]},{"name":"collapseWhitespace","params":[]},{"name":"prepend","params":[{"type":"str","value":"Control_Sensors;"}]},{"name":"replaceAll","params":[{"type":"str","value":" "},{"type":"str","value":";"}]},{"name":"split","params":[{"type":"str","value":";"},{"type":"num","value":"30"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":940,"y":100,"wires":[["6759884e210d80b9"]]},{"id":"6759884e210d80b9","type":"debug","z":"a7065ccc9d946145","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1210,"y":120,"wires":[]},{"id":"e48b8d082f8407bd","type":"debug","z":"a7065ccc9d946145","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":370,"y":200,"wires":[]},{"id":"06b1cc04ca550144","type":"string","z":"a7065ccc9d946145","name":"Alarm Sensors","methods":[{"name":"decodeHTMLEntities","params":[]},{"name":"between","params":[{"type":"str","value":"Alarm Sensors"},{"type":"str","value":"Monitoring Sensors"}]},{"name":"trim","params":[]},{"name":"collapseWhitespace","params":[]},{"name":"prepend","params":[{"type":"str","value":"Alarm_Sensors;"}]},{"name":"replaceAll","params":[{"type":"str","value":" "},{"type":"str","value":";"}]},{"name":"split","params":[{"type":"str","value":";"},{"type":"num","value":"30"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":940,"y":140,"wires":[["6759884e210d80b9"]]},{"id":"af6fc81d08714f72","type":"string","z":"a7065ccc9d946145","name":"Monitoring Sensors","methods":[{"name":"decodeHTMLEntities","params":[]},{"name":"between","params":[{"type":"str","value":"Monitoring Sensors"},{"type":"str","value":"Temp Sensor"}]},{"name":"trim","params":[]},{"name":"collapseWhitespace","params":[]},{"name":"prepend","params":[{"type":"str","value":"Monitoring_Sensors;"}]},{"name":"replaceAll","params":[{"type":"str","value":" "},{"type":"str","value":";"}]},{"name":"split","params":[{"type":"str","value":";"},{"type":"num","value":"30"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":950,"y":180,"wires":[["6759884e210d80b9"]]},{"id":"eb354b89a24a3268","type":"string","z":"a7065ccc9d946145","name":"Available Blowers","methods":[{"name":"decodeHTMLEntities","params":[]},{"name":"between","params":[{"type":"str","value":"Available Blowers"},{"type":"str","value":"Temp Sensor"}]},{"name":"trim","params":[]},{"name":"collapseWhitespace","params":[]},{"name":"prepend","params":[{"type":"str","value":"Available_Blowers;"}]},{"name":"replaceAll","params":[{"type":"str","value":" "},{"type":"str","value":";"}]},{"name":"split","params":[{"type":"str","value":";"},{"type":"num","value":"30"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":950,"y":60,"wires":[["6759884e210d80b9"]]},{"id":"90a8d1bb1b8e2459","type":"switch","z":"a7065ccc9d946145","name":"Connection","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":610,"y":80,"wires":[["eb354b89a24a3268","c6016d1188c370ca","06b1cc04ca550144","af6fc81d08714f72"],["02a26843aa44ec63"]]},{"id":"02a26843aa44ec63","type":"debug","z":"a7065ccc9d946145","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":200,"wires":[]},{"id":"e4b259af3ce23cd7","type":"html","z":"a7065ccc9d946145","name":"","property":"payload","outproperty":"payload","tag":"tbody","ret":"text","as":"single","x":410,"y":120,"wires":[["90a8d1bb1b8e2459","e48b8d082f8407bd"]]}]
                  Attached Files
                  RJ_Make On YouTube

                  Comment


                    #10
                    Originally posted by ksum View Post

                    ...Does the unit have the ability to set the target temperature via a URL or other method?
                    You cannot set anything via url, you can only make changes on the web page (enter targets (temp high and low for fire) and hit the enter key on the keyboard or the "Save" button) or in the device itself.
                    RJ_Make On YouTube

                    Comment


                      #11
                      Got it!

                      So remove the Prepend item from the Edit String Node. That will change the payload array to contain 2 items for each sensor. The serial number and the temperature. Now use a Split node and change the Split Using Fixed length of to 2. This will now cause node red to send a message down the flow for each sensor. msg.payload will be an array of 2 items. The serial number and the temperature, 1 message for each. If you need to know later that this is for the Monitoring probe(s) you can use a Change node and set msg.probeType to Monitoring. No reason to keep it all in msg.poayload, and to get this information into HomeSeer we need to save the data to a different place so we can create a new msg.payload Object anyway.
                      Click image for larger version

Name:	HS1.png
Views:	203
Size:	23.3 KB
ID:	1489890



                      Here is this updated portion of the flow. You can Import it into yours and connect it to the Connection switch node. From here you would add the appropriate HomeSeer node. Maybe with a Switch node to send the flow off for each HomeSeer device based on the serial number?
                      Click image for larger version

Name:	HS2.png
Views:	155
Size:	8.7 KB
ID:	1489891

                      Code:
                      [
                      {
                      "id": "60bc057a56092730",
                      "type": "split",
                      "z": "a7065ccc9d946145",
                      "name": "",
                      "splt": "\\n",
                      "spltType": "str",
                      "arraySplt": "2",
                      "arraySpltType": "len",
                      "stream": false,
                      "addname": "",
                      "x": 470,
                      "y": 260,
                      "wires": [
                      [
                      "94b1e2bee3349be4"
                      ]
                      ]
                      },
                      {
                      "id": "09318c81e0c921ce",
                      "type": "debug",
                      "z": "a7065ccc9d946145",
                      "name": "",
                      "active": true,
                      "tosidebar": true,
                      "console": false,
                      "tostatus": false,
                      "complete": "true",
                      "targetType": "full",
                      "statusVal": "",
                      "statusType": "auto",
                      "x": 890,
                      "y": 260,
                      "wires": []
                      },
                      {
                      "id": "cd3ed2f3968815f1",
                      "type": "string",
                      "z": "a7065ccc9d946145",
                      "name": "Monitoring Sensors v2",
                      "methods": [
                      {
                      "name": "decodeHTMLEntities",
                      "params": []
                      },
                      {
                      "name": "between",
                      "params": [
                      {
                      "type": "str",
                      "value": "Monitoring Sensors"
                      },
                      {
                      "type": "str",
                      "value": "Temp Sensor"
                      }
                      ]
                      },
                      {
                      "name": "trim",
                      "params": []
                      },
                      {
                      "name": "collapseWhitespace",
                      "params": []
                      },
                      {
                      "name": "replaceAll",
                      "params": [
                      {
                      "type": "str",
                      "value": " "
                      },
                      {
                      "type": "str",
                      "value": ";"
                      }
                      ]
                      },
                      {
                      "name": "split",
                      "params": [
                      {
                      "type": "str",
                      "value": ";"
                      },
                      {
                      "type": "num",
                      "value": "30"
                      }
                      ]
                      }
                      ],
                      "prop": "payload",
                      "propout": "payload",
                      "object": "msg",
                      "objectout": "msg",
                      "x": 280,
                      "y": 260,
                      "wires": [
                      [
                      "60bc057a56092730"
                      ]
                      ]
                      },
                      {
                      "id": "94b1e2bee3349be4",
                      "type": "change",
                      "z": "a7065ccc9d946145",
                      "name": "Set up for HomeSeer",
                      "rules": [
                      {
                      "t": "move",
                      "p": "payload",
                      "pt": "msg",
                      "to": "sensorData",
                      "tot": "msg"
                      },
                      {
                      "t": "set",
                      "p": "payload.value",
                      "pt": "msg",
                      "to": "sensorData[1]",
                      "tot": "msg"
                      },
                      {
                      "t": "set",
                      "p": "payload.serialNum",
                      "pt": "msg",
                      "to": "sensorData[0]",
                      "tot": "msg"
                      },
                      {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "control",
                      "tot": "str"
                      }
                      ],
                      "action": "",
                      "property": "",
                      "from": "",
                      "to": "",
                      "reg": false,
                      "x": 680,
                      "y": 260,
                      "wires": [
                      [
                      "09318c81e0c921ce"
                      ]]
                      }
                      ]
                      Let me know if you need assistance on getting this to the HomeSeer devices. I would need information on them, though. Such as is there a 1:1 for the device and serial number, or parent/child items.
                      Karl S
                      HS4Pro on Windows 10
                      1070 Devices
                      56 Z-Wave Nodes
                      104 Events
                      HSTouch Clients: 3 Android, 1 iOS
                      Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                      Comment


                        #12
                        Thank You Very Much. I'll be back in town on Sunday and give it a try then.

                        Thanks Again
                        RJ_Make On YouTube

                        Comment


                          #13
                          I had a chance to play with this a bit and was able to get the Monitoring Sensors output to be an Object, which I find easy to deal with in other parts of flows. While some of the keys are a little obscure with what is here, there does appear to be some naming convention to them which could be used to change the key names. The web page form seems to to 2 letters then the serial number to define the various temperature settings. Tor instance ta8F000... appears to be the Target temperature. The Low Set Temp starts with tl and High Set starts with th and the sensor name starts with just n. These can be used to change the returned key names if desired.

                          Note that there is a chance this will need some teaks to work with the actual data as I recreated the table on a page and extracted from that. I believe, however, that it will work as is since we are inserting it at a point where it is at a common level inside the page.

                          This will generate a Key when one does not exist which starts with "index" and adds the array reference index from the original information. So in the image below, index2 represents the third cell in the row from the table, or the Temperature. When there is a Key provided and no value, this is preserved, as shown as well.

                          Here is the output for the two Monitoring Sensors. There is a message generate in the flow for each, so you can then set each on HomeSeer or do whatever else you need.
                          Click image for larger version

Name:	HS2.png
Views:	209
Size:	37.4 KB
ID:	1490456

                          The flow, starting with the Monitoring Sensor String Node looks like this. Connect this to the same output on your Connection change node which your current Monitoring Sensor string node is connected. It MIGHT (should) be possible to use part of this as a Subflow for each of the sensors, as outlined in the image below. The debug output above is from the debug node in the image:
                          Click image for larger version

Name:	HS1.png
Views:	150
Size:	220.4 KB
ID:	1490457

                          Here is the above portion of the flow to import into yours and test out.
                          Code:
                          [{"id":"58b75dba14d1f300","type":"string","z":"a7065ccc9d946145","name":"Monitoring Sensors v2","methods":[{"name":"between","params":[{"type":"str","value":"Monitoring Sensors"},{"type":"str","value":"Temp Sensor"}]},{"name":"stripTags","params":[{"type":"str","value":"b"}]},{"name":"trim","params":[]},{"name":"collapseWhitespace","params":[]},{"name":"prepend","params":[{"type":"str","value":"Monitoring_Sensors;"}]},{"name":"replaceAll","params":[{"type":"str","value":" <tr>"},{"type":"str","value":"<tr>;"}]},{"name":"split","params":[{"type":"str","value":";"},{"type":"num","value":"30"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":160,"y":320,"wires":[["6ee6cf5e51d63f31"]]},{"id":"c3d0608f33dd5b03","type":"debug","z":"a7065ccc9d946145","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":740,"wires":[]},{"id":"6ee6cf5e51d63f31","type":"change","z":"a7065ccc9d946145","name":"","rules":[{"t":"set","p":"sensorType","pt":"msg","to":"Monitoring","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":320,"wires":[["6037cf72ddc10c9f"]]},{"id":"ea4d706f1a4738a2","type":"comment","z":"a7065ccc9d946145","name":"Make this a Subflow used for each Sensor Type","info":"","x":720,"y":380,"wires":[]},{"id":"a7983178e1b65ba0","type":"group","z":"a7065ccc9d946145","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["6037cf72ddc10c9f","3531f9adae9fd351","03c95a5a638aba72","5851023530cb624a","7c57f46089078343","5f8626058841d886","78561e5e01d758e9","0b3ea233845f9f09","f86d4ec3a54fcfd3","ad1810633928e268","9a23dd25ee40c549","07f61cda01503cf6"],"x":34,"y":379,"w":1112,"h":322},{"id":"6037cf72ddc10c9f","type":"split","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"","splt":"","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":true,"addname":"","x":410,"y":440,"wires":[["03c95a5a638aba72"]]},{"id":"3531f9adae9fd351","type":"string","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":" value="},{"type":"str","value":":"}]},{"name":"strip","params":[{"type":"str","value":" "}]},{"name":"replaceAll","params":[{"type":"str","value":"</td><td>"},{"type":"str","value":";"}]},{"name":"stripTags","params":[{"type":"str","value":"tr"}]},{"name":"replaceAll","params":[{"type":"str","value":"class="},{"type":"str","value":">"}]},{"name":"replaceAll","params":[{"type":"str","value":"name="},{"type":"str","value":">name="}]},{"name":"replaceAll","params":[{"type":"str","value":"onchange="},{"type":"str","value":"<"}]},{"name":"replaceAll","params":[{"type":"str","value":"\"ser_num\">"},{"type":"str","value":"\"ser_num\":"}]},{"name":"stripTags","params":[{"type":"str","value":""}]},{"name":"strip","params":[{"type":"str","value":"name="}]},{"name":"strip","params":[{"type":"str","value":"/"}]},{"name":"strip","params":[{"type":"str","value":">"}]},{"name":"strip","params":[{"type":"str","value":"\""}]},{"name":"collapseWhitespace","params":[]},{"name":"split","params":[{"type":"str","value":";"},{"type":"num","value":"30"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":890,"y":420,"wires":[["5851023530cb624a"]]},{"id":"03c95a5a638aba72","type":"switch","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Only pass items containing name=","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"name=","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":640,"y":440,"wires":[["3531f9adae9fd351"],[]]},{"id":"5851023530cb624a","type":"split","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"","splt":"","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":true,"addname":"","x":1070,"y":440,"wires":[["7c57f46089078343"]]},{"id":"7c57f46089078343","type":"switch","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Does this item have a Key and Value Pair?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":":","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":230,"y":540,"wires":[["78561e5e01d758e9"],["5f8626058841d886"]],"outputLabels":["Contains a Colon","Otherwise"]},{"id":"5f8626058841d886","type":"switch","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Is msg.payload a Key or a Value?","property":"payload","propertyType":"msg","rules":[{"t":"regex","v":"^[+-]?(\\d*\\.)?\\d+$","vt":"str","case":false},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":260,"y":620,"wires":[["ad1810633928e268"],["9a23dd25ee40c549"]],"outputLabels":["Is Numeric","Otherwise"]},{"id":"78561e5e01d758e9","type":"string","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Make msg.payload an Array","methods":[{"name":"split","params":[{"type":"str","value":":"},{"type":"num","value":"10"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":560,"y":520,"wires":[["0b3ea233845f9f09"]]},{"id":"0b3ea233845f9f09","type":"change","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Change to Match a Split Object","rules":[{"t":"set","p":"parts.key","pt":"msg","to":"payload[0]","tot":"msg"},{"t":"move","p":"payload[1]","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":520,"wires":[["f86d4ec3a54fcfd3"]]},{"id":"f86d4ec3a54fcfd3","type":"change","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Set Part Type to Object","rules":[{"t":"set","p":"parts.type","pt":"msg","to":"object","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":600,"wires":[["07f61cda01503cf6"]]},{"id":"ad1810633928e268","type":"change","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Set Key for Value Only Items","rules":[{"t":"set","p":"parts.key","pt":"msg","to":"\"index\" & parts.index","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":600,"wires":[["f86d4ec3a54fcfd3"]]},{"id":"9a23dd25ee40c549","type":"change","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"Set Empty Vale for Key Only Items","rules":[{"t":"set","p":"parts.key","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":660,"wires":[["f86d4ec3a54fcfd3"]]},{"id":"07f61cda01503cf6","type":"join","z":"a7065ccc9d946145","g":"a7983178e1b65ba0","name":"","mode":"auto","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"5","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1070,"y":600,"wires":[["c3d0608f33dd5b03"]]}]
                          Karl S
                          HS4Pro on Windows 10
                          1070 Devices
                          56 Z-Wave Nodes
                          104 Events
                          HSTouch Clients: 3 Android, 1 iOS
                          Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                          Comment


                            #14
                            Holy Cow, that is amazing! I can't wait to try this out.

                            Thank You!
                            RJ_Make On YouTube

                            Comment


                              #15
                              Originally posted by ksum View Post
                              I had a chance to play with this a bit and was able to get the Monitoring Sensors output to be an Object, which I find easy to deal with in other parts of flows. While some of the keys are a little obscure with what is here, there does appear to be some naming convention to them which could be used to change the key names. The web page form seems to to 2 letters then the serial number to define the various temperature settings. Tor instance ta8F000... appears to be the Target temperature. The Low Set Temp starts with tl and High Set starts with th and the sensor name starts with just n. These can be used to change the returned key names if desired.

                              Note that there is a chance this will need some teaks to work with the actual data as I recreated the table on a page and extracted from that. I believe, however, that it will work as is since we are inserting it at a point where it is at a common level inside the page.

                              This will generate a Key when one does not exist which starts with "index" and adds the array reference index from the original information. So in the image below, index2 represents the third cell in the row from the table, or the Temperature. When there is a Key provided and no value, this is preserved, as shown as well.
                              Wow, appears to work perfectly. I've looked over your solution and for the life of me don't know how you came up with it. It's a thing of beauty. I suspect it's going to be a long time before I understand it all.

                              So how do I get this information in HomeSeer?

                              My goal was to create a Parent device with features.

                              Stoker Status
                              Enable / Disable --- some way to to start and stop both Node-Red from polling the stoker and HS evens from running
                              Polling Interval --- a value that can be set and used by a HS event and or Node-Red to poll the stoker
                              Connection Status "Connected" Or "Off Line" Or "Error" --- something to see inside HS of Node-Red communication status with the stoker


                              Stoker Probe --- Parent for each Probe
                              Serial Number --- This will need to be the parent as it's the only item that will not change
                              Probe Name
                              Probe Type
                              Current Temp
                              Target Temp
                              Low Set Temp
                              High Set Temp



                              And given what you have seen so far, is it possible to use Node-Red to change any of the web form temps. (most interested in target temp)?

                              Thank you for putting in the time to help me this far, it is very much appreciated.
                              RJ_Make On YouTube

                              Comment

                              Working...
                              X