# Project - take control over XML based electrical system (Nordic-Systems)

**URL:** https://discourse.nodered.org/t/project-take-control-over-xml-based-electrical-system-nordic-systems/55619
**Category:** Developing Nodes
**Tags:** http-request, function-node
**Created:** [23 December 2021 15:53 UTC](https://discourse.nodered.org/t/project-take-control-over-xml-based-electrical-system-nordic-systems/55619 "2021-12-23T15:53:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Markusbj](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@Markusbj](https://discourse.nodered.org/u/Markusbj)
#### Post date: [23 December 2021 15:53 UTC](https://discourse.nodered.org/t/project-take-control-over-xml-based-electrical-system-nordic-systems/55619/1 "2021-12-23T15:53:55Z")

</div>

**Goal:**  
Centralize technique via Node-red and HomeAssistant and control ports/switches in electrical central over HTTP XML integration via Node-Red. (Nordic-systems)

**background**  
I built my house 7 years ago. I chose an smart alternative electrical system that resemble KNX but is controlled with weak current wire switches and relays in the central. The system can be programmed via a simple app, such as toggle, scenario and schedules. In this project, I want to control the electrical system via Node-red and HomeAssistant. The electrical systems do not have an API or other protocol. By i have looking at the traffic between the app and the central as well as opening the APK file, I know that HTTP GET commands are in use. ?command=xxxxxxxxx or ?getupdate=1

**I need your help:**  
To start with, I need help to retrieve string/information/objects/array from XML (contains information about the system, inputs, outputs, and status). The string will be used for collect/read “msg.preload” ON/OFF message to read if a “port” is ON/OFF in a NODE\_RED. Next step is to create at command for control the port and send via “http request”… Or if its better to use MQTT as a bridge?

1. how can I collect/separate information from XML via NODE-RED, string including object, array an value?
2. how can I create a switch via NODE-RED that read status from XML-string if ON/OFF
3. how can i create a switch and send HTTP GET from object information from XML?

lock at the pictures for the string and the XML.

 ![Node-red1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b897dafef9e912fb38840aadfe78f50bf34c52fc.jpeg)

 ![Screenshot_20211223-160010_Packet Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/7/6739ca97cb136d60f837b0c84963ec439e054817.jpeg)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 February 2022 15:54 UTC](https://discourse.nodered.org/t/project-take-control-over-xml-based-electrical-system-nordic-systems/55619/2 "2022-02-21T15:54:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
