Announcement

Collapse
No announcement yet.

Read XML-File

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

    Read XML-File

    Hello,

    i want to use as an additional system "Homematic" to control my heating system and some lights. Homematic is a very popular home control system in Germany.

    A command like this

    <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:HyphenationZone>21</w:HyphenationZone> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Normale Tabelle"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]-->http://XX.YYY.XY.XY/config/xmlapi/statelist.cgi

    creates a file as you can see in the attachment.


    Now my question:

    How can I read some of this values, like the temperature, with a script and send this value to HomeSeer.

    Is there anybody who can help me?
    I hope so;-)

    Thank you for your support and excuse me for my bad english.


    Bye

    Darklord
    <statelist><device name="Heizung Kueche" ise_id="3034" unreach="false" sticky_unreach="false" config_pending="false"><channel name="Heizung Kueche:0" ise_id="3035"><datapoint name="BidCos-RF.HEQ0080017:0.UNREACH" type="UNREACH" ise_id="3048" value="false" valuetype="2" timestamp="1284116921"><datapoint name="BidCos-RF.HEQ0080017:0.STICKY_UNREACH" type="STICKY_UNREACH" ise_id="3044" value="false" valuetype="2" timestamp="1284116921"><datapoint name="BidCos-RF.HEQ0080017:0.CONFIG_PENDING" type="CONFIG_PENDING" ise_id="3036" value="false" valuetype="2" timestamp="1284116921"><channel name="He[/code]<statelist><device name=" heizung="" kueche="" ise_id="3034" unreach="false" sticky_unreach="false" config_pending="false"><channel name="Heizung Kueche:0" ise_id="3035"><datapoint name="BidCos-RF.HEQ0080017:0.UNREACH" type="UNREACH" ise_id="3048" value="false" valuetype="2" timestamp="1284116921"><datapoint name="BidCos-RF.HEQ0080017:0.STICKY_UNREACH" type="STICKY_UNREACH" ise_id="3044" value="false" valuetype="2" timestamp="1284116921"><datapoint name="BidCos-RF.HEQ0080017:0.CONFIG_PENDING" type="CONFIG_PENDING" ise_id="3036" value="false" valuetype="2" timestamp="1284116921"><channel name="Heizung Kueche.1: Messwerte" ise_id="3052"><datapoint name="BidCos-RF.HEQ0080017:1.TEMPERATURE" type="TEMPERATURE" ise_id="3054" value="22.200000" valuetype="4" timestamp="1284116907"><datapoint name="BidCos-RF.HEQ0080017:1.HUMIDITY" type="HUMIDITY" ise_id="3053" value="59" valuetype="16" timestamp="1284116907"><datapoint name="Temp Soll Kueche" type="" ise_id="1519" value="0.000000" valuetype="4" timestamp="1284116907"><datapoint name="Ventilstellung Kueche" type="" ise_id="1520" value="0.000000" valuetype="4" timestamp="1284116907"><datapoint name="Temp Min Kueche" type="" ise_id="2721" value="0.000000" valuetype="4" timestamp="1284116688"><datapoint name="Temp Max Kueche" type="" ise_id="1510" value="23.100000" valuetype="4" timestamp="1284116676"><datapoint name="Luftfeuchte Min Kueche" type="" ise_id="1513" value="0.000000" valuetype="4" timestamp="1284116688"><channel name="Heizung Kueche.2: Thermostat" ise_id="3055"><datapoint name="BidCos-RF.HEQ0080017:2.SETPOINT" type="SETPOINT" ise_id="3058" value="0.000000" valuetype="4" timestamp="1284116688"><datapoint name="BidCos-RF.HEQ0080017:2.ADJUSTING_COMMAND" type="ADJUSTING_COMMAND" ise_id="3056" value="0" valuetype="16" timestamp="1284116778"><device name="Heizung Kueche: Stellantrieb" ise_id="2999" unreach="false" sticky_unreach="false" config_pending="false"><channel name="Heizung Kueche: Stellantrieb:0" ise_id="3000"><datapoint name="BidCos-RF.HEQ0082355:0.UNREACH" type="UNREACH" ise_id="3013" value="false" valuetype="2" timestamp="1284116921"><datapoint name="BidCos-RF.HEQ0082355:0.STICKY_UNREACH" type="STICKY_UNREACH" ise_id="3009" value="false" valuetype="2" timestamp="1284116921"><datapoint name="BidCos-RF.HEQ0082355:0.CONFIG_PENDING" type="CONFIG_PENDING" ise_id="3001" value="false" valuetype="2" timestamp="1284116921"><channel name="Heizung Kueche.3: Stellantrieb" ise_id="3017"><device name="HM-CCU-1 System" ise_id="1389"><channel name="Zentralennetzteil" ise_id="1390"><datapoint name="System.System:1.U_SOURCE_FAIL" type="U_SOURCE_FAIL" ise_id="1401" value="false" valuetype="2" timestamp="1284116921"><datapoint name="System.System:1.LOWBAT" type="LOWBAT" ise_id="1393" value="false" valuetype="2" timestamp="1284116921"><datapoint name="System.System:1.U_USBD_OK" type="U_USBD_OK" ise_id="1405" value="true" valuetype="2" timestamp="1284116921"><device name="HM-RCV-50 BidCoS-RF" ise_id="1011"><channel name="HM-RCV-50 BidCoS-RF:0" ise_id="1012"><channel name="Anwesend" ise_id="1014"><datapoint name="BidCos-RF.BidCoS-RF:1.PRESS_LONG" type="PRESS_LONG" ise_id="1016" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:1.PRESS_SHORT" type="PRESS_SHORT" ise_id="1017" value="" valuetype="2" timestamp="0"><channel name="Schlafen" ise_id="1018"><datapoint name="BidCos-RF.BidCoS-RF:2.PRESS_LONG" type="PRESS_LONG" ise_id="1020" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:2.PRESS_SHORT" type="PRESS_SHORT" ise_id="1021" value="" valuetype="2" timestamp="0"><channel name="Heizperiode" ise_id="1022"><datapoint name="BidCos-RF.BidCoS-RF:3.PRESS_LONG" type="PRESS_LONG" ise_id="1024" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:3.PRESS_SHORT" type="PRESS_SHORT" ise_id="1025" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:4" ise_id="1026"><datapoint name="BidCos-RF.BidCoS-RF:4.PRESS_LONG" type="PRESS_LONG" ise_id="1028" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:4.PRESS_SHORT" type="PRESS_SHORT" ise_id="1029" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:5" ise_id="1030"><datapoint name="BidCos-RF.BidCoS-RF:5.PRESS_LONG" type="PRESS_LONG" ise_id="1032" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:5.PRESS_SHORT" type="PRESS_SHORT" ise_id="1033" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:6" ise_id="1034"><datapoint name="BidCos-RF.BidCoS-RF:6.PRESS_LONG" type="PRESS_LONG" ise_id="1036" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:6.PRESS_SHORT" type="PRESS_SHORT" ise_id="1037" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:7" ise_id="1038"><datapoint name="BidCos-RF.BidCoS-RF:7.PRESS_LONG" type="PRESS_LONG" ise_id="1040" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:7.PRESS_SHORT" type="PRESS_SHORT" ise_id="1041" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:8" ise_id="1042"><datapoint name="BidCos-RF.BidCoS-RF:8.PRESS_LONG" type="PRESS_LONG" ise_id="1044" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:8.PRESS_SHORT" type="PRESS_SHORT" ise_id="1045" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:9" ise_id="1046"><datapoint name="BidCos-RF.BidCoS-RF:9.PRESS_LONG" type="PRESS_LONG" ise_id="1048" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:9.PRESS_SHORT" type="PRESS_SHORT" ise_id="1049" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:10" ise_id="1050"><datapoint name="BidCos-RF.BidCoS-RF:10.PRESS_LONG" type="PRESS_LONG" ise_id="1052" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:10.PRESS_SHORT" type="PRESS_SHORT" ise_id="1053" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:11" ise_id="1054"><datapoint name="BidCos-RF.BidCoS-RF:11.PRESS_LONG" type="PRESS_LONG" ise_id="1056" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:11.PRESS_SHORT" type="PRESS_SHORT" ise_id="1057" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:12" ise_id="1058"><datapoint name="BidCos-RF.BidCoS-RF:12.PRESS_LONG" type="PRESS_LONG" ise_id="1060" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:12.PRESS_SHORT" type="PRESS_SHORT" ise_id="1061" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:13" ise_id="1062"><datapoint name="BidCos-RF.BidCoS-RF:13.PRESS_LONG" type="PRESS_LONG" ise_id="1064" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:13.PRESS_SHORT" type="PRESS_SHORT" ise_id="1065" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:14" ise_id="1066"><datapoint name="BidCos-RF.BidCoS-RF:14.PRESS_LONG" type="PRESS_LONG" ise_id="1068" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:14.PRESS_SHORT" type="PRESS_SHORT" ise_id="1069" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:15" ise_id="1070"><datapoint name="BidCos-RF.BidCoS-RF:15.PRESS_LONG" type="PRESS_LONG" ise_id="1072" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:15.PRESS_SHORT" type="PRESS_SHORT" ise_id="1073" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:16" ise_id="1074"><datapoint name="BidCos-RF.BidCoS-RF:16.PRESS_LONG" type="PRESS_LONG" ise_id="1076" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:16.PRESS_SHORT" type="PRESS_SHORT" ise_id="1077" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:17" ise_id="1078"><datapoint name="BidCos-RF.BidCoS-RF:17.PRESS_LONG" type="PRESS_LONG" ise_id="1080" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:17.PRESS_SHORT" type="PRESS_SHORT" ise_id="1081" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:18" ise_id="1082"><datapoint name="BidCos-RF.BidCoS-RF:18.PRESS_LONG" type="PRESS_LONG" ise_id="1084" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:18.PRESS_SHORT" type="PRESS_SHORT" ise_id="1085" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:19" ise_id="1086"><datapoint name="BidCos-RF.BidCoS-RF:19.PRESS_LONG" type="PRESS_LONG" ise_id="1088" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:19.PRESS_SHORT" type="PRESS_SHORT" ise_id="1089" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:20" ise_id="1090"><datapoint name="BidCos-RF.BidCoS-RF:20.PRESS_LONG" type="PRESS_LONG" ise_id="1092" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:20.PRESS_SHORT" type="PRESS_SHORT" ise_id="1093" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:21" ise_id="1094"><datapoint name="BidCos-RF.BidCoS-RF:21.PRESS_LONG" type="PRESS_LONG" ise_id="1096" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:21.PRESS_SHORT" type="PRESS_SHORT" ise_id="1097" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:22" ise_id="1098"><datapoint name="BidCos-RF.BidCoS-RF:22.PRESS_LONG" type="PRESS_LONG" ise_id="1100" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:22.PRESS_SHORT" type="PRESS_SHORT" ise_id="1101" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:23" ise_id="1102"><datapoint name="BidCos-RF.BidCoS-RF:23.PRESS_LONG" type="PRESS_LONG" ise_id="1104" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:23.PRESS_SHORT" type="PRESS_SHORT" ise_id="1105" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:24" ise_id="1106"><datapoint name="BidCos-RF.BidCoS-RF:24.PRESS_LONG" type="PRESS_LONG" ise_id="1108" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:24.PRESS_SHORT" type="PRESS_SHORT" ise_id="1109" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:25" ise_id="1110"><datapoint name="BidCos-RF.BidCoS-RF:25.PRESS_LONG" type="PRESS_LONG" ise_id="1112" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:25.PRESS_SHORT" type="PRESS_SHORT" ise_id="1113" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:26" ise_id="1114"><datapoint name="BidCos-RF.BidCoS-RF:26.PRESS_LONG" type="PRESS_LONG" ise_id="1116" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:26.PRESS_SHORT" type="PRESS_SHORT" ise_id="1117" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:27" ise_id="1118"><datapoint name="BidCos-RF.BidCoS-RF:27.PRESS_LONG" type="PRESS_LONG" ise_id="1120" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:27.PRESS_SHORT" type="PRESS_SHORT" ise_id="1121" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:28" ise_id="1122"><datapoint name="BidCos-RF.BidCoS-RF:28.PRESS_LONG" type="PRESS_LONG" ise_id="1124" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:28.PRESS_SHORT" type="PRESS_SHORT" ise_id="1125" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:29" ise_id="1126"><datapoint name="BidCos-RF.BidCoS-RF:29.PRESS_LONG" type="PRESS_LONG" ise_id="1128" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:29.PRESS_SHORT" type="PRESS_SHORT" ise_id="1129" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:30" ise_id="1130"><datapoint name="BidCos-RF.BidCoS-RF:30.PRESS_LONG" type="PRESS_LONG" ise_id="1132" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:30.PRESS_SHORT" type="PRESS_SHORT" ise_id="1133" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:31" ise_id="1134"><datapoint name="BidCos-RF.BidCoS-RF:31.PRESS_LONG" type="PRESS_LONG" ise_id="1136" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:31.PRESS_SHORT" type="PRESS_SHORT" ise_id="1137" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:32" ise_id="1138"><datapoint name="BidCos-RF.BidCoS-RF:32.PRESS_LONG" type="PRESS_LONG" ise_id="1140" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:32.PRESS_SHORT" type="PRESS_SHORT" ise_id="1141" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:33" ise_id="1142"><datapoint name="BidCos-RF.BidCoS-RF:33.PRESS_LONG" type="PRESS_LONG" ise_id="1144" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:33.PRESS_SHORT" type="PRESS_SHORT" ise_id="1145" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:34" ise_id="1146"><datapoint name="BidCos-RF.BidCoS-RF:34.PRESS_LONG" type="PRESS_LONG" ise_id="1148" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:34.PRESS_SHORT" type="PRESS_SHORT" ise_id="1149" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:35" ise_id="1150"><datapoint name="BidCos-RF.BidCoS-RF:35.PRESS_LONG" type="PRESS_LONG" ise_id="1152" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:35.PRESS_SHORT" type="PRESS_SHORT" ise_id="1153" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:36" ise_id="1154"><datapoint name="BidCos-RF.BidCoS-RF:36.PRESS_LONG" type="PRESS_LONG" ise_id="1156" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:36.PRESS_SHORT" type="PRESS_SHORT" ise_id="1157" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:37" ise_id="1158"><datapoint name="BidCos-RF.BidCoS-RF:37.PRESS_LONG" type="PRESS_LONG" ise_id="1160" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:37.PRESS_SHORT" type="PRESS_SHORT" ise_id="1161" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:38" ise_id="1162"><datapoint name="BidCos-RF.BidCoS-RF:38.PRESS_LONG" type="PRESS_LONG" ise_id="1164" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:38.PRESS_SHORT" type="PRESS_SHORT" ise_id="1165" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:39" ise_id="1166"><datapoint name="BidCos-RF.BidCoS-RF:39.PRESS_LONG" type="PRESS_LONG" ise_id="1168" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:39.PRESS_SHORT" type="PRESS_SHORT" ise_id="1169" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:40" ise_id="1170"><datapoint name="BidCos-RF.BidCoS-RF:40.PRESS_LONG" type="PRESS_LONG" ise_id="1172" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:40.PRESS_SHORT" type="PRESS_SHORT" ise_id="1173" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:41" ise_id="1174"><datapoint name="BidCos-RF.BidCoS-RF:41.PRESS_LONG" type="PRESS_LONG" ise_id="1176" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:41.PRESS_SHORT" type="PRESS_SHORT" ise_id="1177" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:42" ise_id="1178"><datapoint name="BidCos-RF.BidCoS-RF:42.PRESS_LONG" type="PRESS_LONG" ise_id="1180" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:42.PRESS_SHORT" type="PRESS_SHORT" ise_id="1181" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:43" ise_id="1182"><datapoint name="BidCos-RF.BidCoS-RF:43.PRESS_LONG" type="PRESS_LONG" ise_id="1184" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:43.PRESS_SHORT" type="PRESS_SHORT" ise_id="1185" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:44" ise_id="1186"><datapoint name="BidCos-RF.BidCoS-RF:44.PRESS_LONG" type="PRESS_LONG" ise_id="1188" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:44.PRESS_SHORT" type="PRESS_SHORT" ise_id="1189" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:45" ise_id="1190"><datapoint name="BidCos-RF.BidCoS-RF:45.PRESS_LONG" type="PRESS_LONG" ise_id="1192" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:45.PRESS_SHORT" type="PRESS_SHORT" ise_id="1193" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:46" ise_id="1194"><datapoint name="BidCos-RF.BidCoS-RF:46.PRESS_LONG" type="PRESS_LONG" ise_id="1196" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:46.PRESS_SHORT" type="PRESS_SHORT" ise_id="1197" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:47" ise_id="1198"><datapoint name="BidCos-RF.BidCoS-RF:47.PRESS_LONG" type="PRESS_LONG" ise_id="1200" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:47.PRESS_SHORT" type="PRESS_SHORT" ise_id="1201" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:48" ise_id="1202"><datapoint name="BidCos-RF.BidCoS-RF:48.PRESS_LONG" type="PRESS_LONG" ise_id="1204" value="" valuetype="2" timestamp="0"><datapoint name="BidCos-RF.BidCoS-RF:48.PRESS_SHORT" type="PRESS_SHORT" ise_id="1205" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:49" ise_id="1206"><datapoint name="BidCos-RF.BidCoS-RF:49.PRESS_LONG" type="PRESS_LONG" ise_id="1208" value="" valuetype="2" timestamp="0"> <datapoint name="BidCos-RF.BidCoS-RF:49.PRESS_SHORT" type="PRESS_SHORT" ise_id="1209" value="" valuetype="2" timestamp="0"><channel name="HM-RCV-50 BidCoS-RF:50" ise_id="1210"></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></datapoint></datapoint></channel></channel></device></datapoint></datapoint></datapoint></channel></device></channel></datapoint></datapoint></datapoint></channel></device></datapoint></datapoint></channel></datapoint></datapoint></datapoint></datapoint></datapoint></datapoint></datapoint></channel></datapoint></datapoint></datapoint></channel></channel></datapoint></datapoint></datapoint></channel></device></statelist>
    Attached Files

    #2
    Reading XML files is not hard at all using vb.net, the problem is perhaps how you want to display it and exactly which data you want.

    I'm sorry but my German is non existent, so I can't read what some of the data point names mean to decipher what exactly the XML file means...If you can post exactly which nodes/values you want then should be able to show an example script.

    If you know about scripting i'd suggest a look at the XmlDocument, XMLNodeList and XMLNode functions of the System.XML..

    Comment


      #3
      Hello mrhappy,

      thank you for your fast answer.

      I want to take for example the valve state of my heating system in the kitchen (Kueche).
      Take a look at this:

      .
      .
      .

      datapoint name="Ventilstellung Kueche" type="" ise_id="1520" value="0.000000" valuetype="4" timestamp="1284121619"/>
      and
      so
      on
      .
      .
      .

      The red colored value is one of this values I want to use it in HomeSeer.
      I need this values to create some charts or to use it in conditions.


      Bye


      Darklord

      Comment


        #4
        Ok...i've got I think what you are after, but you need to do the following;

        1) Open the settings.ini file in your config directory, look for the following entry;

        ScriptingReferences=
        If you have any other text in this field then you need to add a comma at the end and then the following;

        system.xml;system.xml.dll
        So if you have something like system.data;system.data.dll in the field it becomes, system.data;system.data.dll,system.xml;system.xml.dll . If you have nothing else present just use scriptingReferences=system.xml;system.xml.dll. You then need to restart HomeSeer.

        2) Create a status only device from the devices page, this will be where your value is shown. Choose a code that suits you.

        3) Save the following script as a .vb file

        Imports System.XML

        Sub Main(ByVal Data As String)

        Dim ValXML As New XmlDocument
        Dim ValXMLNodeList As XmlNodeList
        Dim ValXMLNode As XmlNode
        Dim FValue As Decimal

        ValXML.Load("C:\Homematic.xml")

        ValXMLNodeList = ValXML.SelectNodes("//datapoint[@name='Ventilstellung Kueche']")

        For Each ValXMLNode In ValXMLNodeList

        FValue = System.Math.Round(CDec(ValXMLNode.Attributes("value").Value) , 2)

        hs.setdevicevalue("X1", FValue * 100)
        hs.setdevicestring("X1", "Value Is: " & ValXMLNode.Attributes("value").Value)

        Next

        End Sub
        A few things to think about from the above (also please consider my scripting is by no means the best!)

        i) The line valXML.Load, as I don't have the ability to test your IP address here I can't load it from a URL. You can try this;

        ValXML.Load("http://XX.YYY.XY.XY/config/xmlapi/statelist.cgi")

        Whether it works from the link with the cgi file I don't know, if not may have to come up with another solution - possibly using some form of hs.geturl command.

        ii) Change "X1" to whatever device code you have created above in point 2)

        iii) HomeSeer does not store decimal values, so if the value is 0.000000 it has to be converted into an integer. I've rounded it to three decimal places using system.math.round and then multiplied it by 100. I'm not sure what values you are expecting in that field, you may need to edit this to store an accurate figure - the way its normally done is 12.50 has a device value (which you use on triggers/conditions) will be represented with a device value of 1250.

        If you run the above script at a recurring interval to suit you it should work.

        Thats obviously quite basic, adding more fields is quite easy but I would take a look at syntax called XPath, which is how you select parts of the XML document.

        Hope it works for you, any problems I can try and help...also others may be able to post better code, the above for me works but it might not be the best..

        Comment


          #5
          Hello mrhappy,

          thank you for your help.

          I've tried this script and followed Your instructions but it doesn't work.

          This errormessage will be displayed in HS:
          Code:
          16.09.2010 19:33:33  - Error - Script compile error: Der Typ "XmlDocument" ist nicht definiert.on line 18
          Any ideas?

          Bye

          Darklord

          Comment


            #6
            I think (based on a rough translation) that usually points to either the scripting reference incorrect or the Imports statement (imports system.xml) missing on the first line of the script.

            Can you open up your config.ini file, and paste the line scriptingreferences= here please?

            Thanks...

            Comment


              #7
              Hi,

              here the line:

              scriptingReferences=system.xml;system.xml.dll

              This line wasn't in the system.ini file so I've copied it from your post.

              Bye


              Michael

              Comment


                #8
                Hi,

                the valvestate value is specified in percent.

                Other values like "Temp Max Kueche" are specified as degrees (decimal).

                mrhappy: thanks for your support AGAIN


                Bye


                Michael

                Comment


                  #9
                  Ok...does the first part of the script work now? If so we can move on...

                  What sort of values do you wish to capture? Are you happy with 0-100% or do you want 0.01% - 100.00%?

                  Out of interest does the command load with the URL correctly?

                  Comment


                    #10
                    Hello,

                    the script doesen't work anymore.

                    The same failure as I posted above.

                    Code:
                    What sort of values do you wish to capture?
                    The most of the ones who are defined as "Heizung Kueche" like "Temp Min Kueche", "Temp Max Kueche", "Luftfeuchte Max Kueche" (Humidity Max Kitchen in %) and so on.

                    In near Future I want to use this values in charts to display trends...

                    Code:
                    Are you happy with 0-100% or do you want 0.01% - 100.00%?
                    Oh, I think 0-100% (step 0,5%) are exact enough

                    Code:
                    Out of interest does the command load with the URL correctly?
                    How can I find out?

                    The command http://XX.YYY.XY.XY/config/xmlapi/statelist.cgi
                    placed in a browser like Firefox works. Works it with HS? I don't know.



                    So long


                    Michael

                    Comment


                      #11
                      Ok no problems...i'll see if I can try and get it to work, i've picked up a bit about vb.net but would not say I am the best.

                      If you run;

                      Imports System.XML

                      Sub Main(ByVal Data As String)

                      Dim ValXML As New XmlDocument
                      Dim ValXMLNodeList As XmlNodeList
                      Dim ValXMLNode As XmlNode
                      Dim FValue As Decimal

                      ValXML.Load("http://XX.YYY.XY.XY/config/xmlapi/statelist.cgi")

                      ValXMLNodeList = ValXML.SelectNodes("//datapoint[@name='Ventilstellung Kueche']")

                      For Each ValXMLNode In ValXMLNodeList

                      FValue = System.Math.Round(CDec(ValXMLNode.Attributes("value").Value) , 2)

                      hs.setdevicevalue("X1", FValue * 100)
                      hs.setdevicestring("X1", "Value Is: " & ValXMLNode.Attributes("value").Value)

                      Next

                      End Sub
                      Obviously replacing the xx.yyy etc with your IP address.

                      If it does not work, what error shows up in the log file?

                      Comment


                        #12
                        Hello mrhappy,

                        I'm sorry but this script didn't work too.

                        The failure report:
                        17.09.2010 17:11:34 - Info - Event Trigger "Momematic"
                        17.09.2010 17:11:34 - Info - Running script in background: Neu Textdokument.vb
                        17.09.2010 17:11:34 - Error - Script compile error: Der Typ "XmlDocument" ist nicht definiert.on line 18
                        17.09.2010 17:11:34 - SCR - Option Strict OffImports System.XMLimports Schedulerimports SystemPublic Module scriptcode7#Region "Automatically generated code, do not modify"'Automatically generated code, do not modify'Event Sources Begin <System.ContextStaticAttribute()> Public WithEvents hs As Scheduler.hsapplication <System.ContextStaticAttribute()> Public WithEvents hsp As scheduler.hsp <System.ContextStaticAttribute()> Public WithEvents hssystem As scheduler.phone0'Event Sources End'End of automatically generated code#End RegionSub Main(ByVal Data As String)Dim ValXML As New XmlDocumentDim ValXMLNodeList As XmlNodeListDim ValXMLNode As XmlNodeDim FValue As DecimalValXML.Load("http://IP-Adresse/config/xmlapi/statelist.cgi")ValXMLNodeList = ValXML.SelectNodes("//datapoint[@name='Ventilstellung Kueche']")For Each ValXMLNode In ValXMLNodeListFValue = System.Math.Round(CDec(ValXMLNode.Attributes("value").Value) , 2)hs.setdevicevalue("X1", FValue * 100)hs.setdevicestring("X1", "Value Is: " & ValXMLNode.Attributes("value").Value)NextEnd Sub End Module

                        I hope this will help.


                        Bye


                        Michael

                        Comment


                          #13
                          OK...it may be that it can't download the file from that URL, never sure whether it would work or not...for some testing;

                          If you swap this line;

                          ValXML.Load("http://XX.YYY.XY.XY/config/xmlapi/statelist.cgi")

                          with

                          ValXML.Load("C:\Homematic.xml")

                          Then with the original XML file in your post save it to the c: drive with the same file name.

                          Run the script and see if the error still appears.

                          If the error goes then will have to find a way of downloading the file first, then loading it.

                          Comment


                            #14
                            Hi,

                            this report Hs creates:

                            17.09.2010 17:41:16 - Info - Event Trigger "Momematic"
                            17.09.2010 17:41:16 - Info - Running script in background: Neu Textdokument.vb
                            17.09.2010 17:41:17 - Error - Script compile error: Der Typ "XmlDocument" ist nicht definiert.on line 18
                            17.09.2010 17:41:17 - SCR - Option Strict OffImports System.XMLimports Schedulerimports SystemPublic Module scriptcode10#Region "Automatically generated code, do not modify"'Automatically generated code, do not modify'Event Sources Begin <System.ContextStaticAttribute()> Public WithEvents hs As Scheduler.hsapplication <System.ContextStaticAttribute()> Public WithEvents hsp As scheduler.hsp <System.ContextStaticAttribute()> Public WithEvents hssystem As scheduler.phone0'Event Sources End'End of automatically generated code#End RegionSub Main(ByVal Data As String)Dim ValXML As New XmlDocumentDim ValXMLNodeList As XmlNodeListDim ValXMLNode As XmlNodeDim FValue As DecimalValXML.Load("C:\Homematic.xml")ValXMLNodeList = ValXML.SelectNodes("//datapoint[@name='Ventilstellung Kueche']")For Each ValXMLNode In ValXMLNodeListFValue = System.Math.Round(CDec(ValXMLNode.Attributes("value").Value) , 2)hs.setdevicevalue("X1", FValue * 100)hs.setdevicestring("X1", "Value Is: " & ValXMLNode.Attributes("value").Value)NextEnd Sub End Module



                            So long


                            Michael

                            Comment


                              #15
                              I'm sorry i'm going to have to nearly admit defeat on this one, if the scriptingreferences= entry in the config .ini file is OK and the script works for me then i'm at a loss. Someone else may be able to post why.

                              Just to run back through;

                              1) Can you post the scriptingreferences= line from your ini file please?
                              2) Have you restarted HomeSeer
                              3) Do you definately have the line at the top of the script 'Imports System.XML'?

                              I think the problem is there somewhere.

                              Comment

                              Working...
                              X