Hallo,
ich versuche gerade meinem Wechselrichter (Solax) in IPS zu integrieren. Nachdem ich über viele Umweges an Daten komme, habe ich das Problem, das ist nur eine HTML Seite geliefert bekomme
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="/Content/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<style>
.ui-btn-active {
text-shadow: 0 1px 0 #A54133;
border: 1px solid #A55723;
background-color: #B6784F;
border: 1px solid #B6784F;
background-image: -webkit-gradient(linear,left top,left bottom,from(#D17E7E),to(#E0B965));
background-image: -webkit-linear-gradient(#D17E7E,#E0B965);
background-image: -moz-linear-gradient(#D17E7E,#E0B965);
background-image: -ms-linear-gradient(#D17E7E,#E0B965);
background-image: -o-linear-gradient(#D17E7E,#E0B965);
background-image: linear-gradient(#D17E7E,#E0B965);
}
</style>
<script>
$.mobile.defaultPageTransition = "none";
</script>
</head>
<body style="margin: 0; padding: 0;">
<style>
.dataValue
{
color: #0094ff;
font-weight: bold;
}
</style>
<div data-role="page" id="foo">
<div data-role="header" data-theme="c">
<a href="/m/user/index" data-icon="home" data-inline="true" rel="external" >Home</a>
<h1>Kraftwerk 2</h1>
<div data-role="navbar" data-theme="e">
<ul>
<li><a href="/m/User/overview/47776" rel="external" class="">Overview</a></li>
<li><a href="/m/User/chart/47776" rel="external" class="">Charts</a></li>
<li><a href="/m/User/status/47776" rel="external" class="ui-btn-active">Real-time Display</a></li>
<li><a href="/m/User/battery/47776" rel="external" class="">Batteries</a></li>
</ul>
</div>
</div>
<div data-role="content">
<table data-role="table" id="movie-table" data-mode="column" style="display: table;" class="ui-responsive table-stroke">
<tbody>
<tr>
<th colspan="4" align="center" style="text-align: center;">
<h2 style="margin: 5px;">Kraftwerk2</h2>
</th>
</tr>
<tr class="tr1">
<td>PV1 Current </td>
<td class="dataValue">1.4A</td>
</tr>
<tr>
<td>PV2 Current</td>
<td class="dataValue">1.3A</td>
</tr>
<tr class="tr2">
<td>PV1 Voltage</td>
<td class="dataValue">230.2V</td>
</tr>
<tr>
<td>PV2 Voltage</td>
<td class="dataValue">229.8V</td>
</tr>
<tr class="tr1">
<td>Output Current</td>
<td class="dataValue">8.9A</td>
</tr>
<tr>
<td>Network Voltage</td>
<td class="dataValue">236.0V</td>
</tr>
<tr class="tr2">
<td>PV1 Input Power</td>
<td class="dataValue">322W</td>
</tr>
<tr>
<td>PV2 Input Power</td>
<td class="dataValue">298W</td>
</tr>
<tr>
<td>Power Now</td>
<td class="dataValue">2064W</td>
</tr>
<tr class="tr2">
<td>Today's Energy</td>
<td class="dataValue">11.6kWh</td>
</tr>
<tr>
<td>Total Energy</td>
<td class="dataValue">3419.2kWh</td>
</tr>
<tr class="tr2">
<th colspan="4" align="center" style="text-align: center; color: gray;">Last Updated:2017/7/20 17:12:41</th>
</tr>
</tbody>
</table>
</div>
<div data-role="footer" data-theme="c" data-position="fixed" >
<h1>SolaX X-Monitoring System@2017</h1>
</div>
</div>
</body>
</html>
Mein Problem ist, dass ich keine gute Idee habe, wie ich an den Teil in der Mitte komme und ihn in Variablen packen kann, also z.B.
<tr class="tr1">
<td>PV1 Current </td>
<td class="dataValue">1.4A</td>
</tr>
In PV1 Current = Wert
Hat jemand hier eine elegante Idee?