//    This file is part of House Unplugged (HU).
//
//    Copyright (C) 2016-2019  SISYFOS and TEROC AB.
//
//    HU is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    HU is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with HU.  If not, see <http://www.gnu.org/licenses/>.
//
//    Note that HU depends on other software, with different licensing
//    conditions.
//
//    For more information, contact Sven Ruin, sven.ruin@teroc.se

"Hus Utan Sladd" is a concept house built by Sisyfos in 2016, which you 
can read about on husutansladd.se. It uses power electronics from 
Ferroamp combined with an ABB ACSM1 inverter (which is actually a motor 
drive with added filters and transformer, used as grid-fomning inverter 
for the internal AC power).

This project has demonstrated that a modern self-sufficient villa can be 
built at a reasonable cost. The main exception has been that the stirling 
CHP intended to cover the dark winters has so far not been in normal 
operation, so it has been necessary to connect to the grid during part of 
the year.

Therefore this version 1.1 of the software is published without some some 
parts, related to the stirling. Compared to version 1.0, version 1.1 has a 
few small updates in the PLC code (e.g. to avoid high indoor temperature 
during summer due to water heating with surplus energy) and in the ACSM1 
parameter documentation.

Compared to the software actually running in the house, the published 
"House Unplugged" Free Open Source Software has changed passwords and API 
Key for Emoncms. If you would use this software for a real project, we 
recommend that you enter your own passwords and API Key.

If this type of system is placed at another location, with good solar 
conditions all year or good wind conditions during the dark months, it 
would be much easier to achieve full autonomy (without CHP).

The main controler in the house is PLC1, which communicates with:
Electricity meter 1 (all AC)*, via Modbus TCP: 192.168.25.236
Drive 1 (inverter), via Modbus TCP: 192.168.25.237
Raspberry Pi (in mirror, with Emoncms): 192.168.25.238
Electricity meter 2 (stove/oven)*, via Modbus TCP: 192.168.25.239
Electricity meter 3 (shower)*, via Modbus TCP: 192.168.25.240
Electricity meter 4 (phase 1 dishwasher / 2 washing machine / 3 screen)*, 
via Modbus TCP: 192.168.25.241
Electricity meter 5 (electric vehicles)*, via Modbus TCP: 192.168.25.242
Electricity meter 6 (phase 1 AC pump recycled water / 2 sewer / 3 wind 
turbine)*, via Modbus TCP: 192.168.25.243
WISE-4010/LAN in the house itself, via Modbus TCP: 192.168.25.244
WISE-4010/LAN for stirling, via Modbus TCP: 192.168.25.245
WISE-4010/LAN in garage, via Modbus TCP: 192.168.25.246
EnergyHub, via Modbus TCP: 192.168.25.247
BeagelBone (in Ferroamp's equipment): 192.168.25.248
iPad that runs the Wago-WebVisu app as the main user interface.
Five Wago 789-620 current sensors, via Modbus RTU.
Two Qalcosonic FLOW 4 water meters, with pulse counting (but the pulse 
counting in the PLC could be improved or replaced e.g. with Modbus).
EnOcean sensors (see comments in code).
LED drivers via DALI (set up with Wago DALI Configurator software).
(LON is also prepared to be used).

* The electricity meters for AC are EMU Professional 3/75 TCP/IP.

All Wise-4010/LAN are used together with Seneca T201DC current sensors.

There are also Pt100 temperature sensors, presence detectors, contactors, 
etc connected directly to PLC inputs/outputs.
