-- phpMyAdmin SQL Dump
-- version 4.6.6deb4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 13, 2017 at 03:12 PM
-- Server version: 10.1.26-MariaDB-0+deb9u1
-- PHP Version: 5.6.30-0+deb8u1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `Solarfocus`
--

-- --------------------------------------------------------

--
-- Table structure for table `Data`
--

CREATE TABLE `Data` (
  `Time_Stamp` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `S1_O1` smallint(6) NOT NULL COMMENT 'State (ON-OFF) Solar pump Register 1+2 ',
  `S1_O2` smallint(6) NOT NULL COMMENT 'State (Register 1 or Register 2) Solar valve',
  `S2_O1` smallint(6) NOT NULL COMMENT 'State (ON-OFF) Solar pump Register 3',
  `S1_OUT1` smallint(6) NOT NULL COMMENT 'Pump speed SET value Registers 1+2',
  `S1_Speed` smallint(6) NOT NULL COMMENT 'Pump speed IS value Registers 1+2',
  `S1_I1` smallint(6) NOT NULL COMMENT 'Solar Collector Temp.',
  `S1_I3` smallint(6) NOT NULL COMMENT 'Solar delivery temp.',
  `S1_I4` smallint(6) NOT NULL COMMENT '1st buffer lower solar register temp.',
  `S1_I5` smallint(6) NOT NULL COMMENT 'Solar return temp.',
  `S1_I9` smallint(6) NOT NULL COMMENT '1st buffer upper solar register temp',
  `S2_OUT1` smallint(6) NOT NULL COMMENT 'Pump speed SET value Register 3',
  `S2_Speed` smallint(6) NOT NULL COMMENT 'Pump speed SET value Register 3',
  `S2_I9` smallint(6) NOT NULL COMMENT '2nd buffer solar register temp',
  `X34` smallint(6) NOT NULL COMMENT 'Smoke Temp.',
  `X30` smallint(6) NOT NULL,
  `X31` smallint(6) NOT NULL COMMENT 'Boiler (kessel) temp.',
  `X32` smallint(6) NOT NULL COMMENT 'Rücklauf temp.',
  `U_Heating_Trafo` smallint(6) NOT NULL COMMENT 'Tensione trasformatore riscaldamento',
  `I_Heating_Trafo` smallint(6) NOT NULL COMMENT 'Corrente trasformatore riscaldamento',
  `X35` smallint(6) NOT NULL COMMENT '2nd buffer low temperature',
  `X40` smallint(6) NOT NULL,
  `X38` smallint(6) NOT NULL COMMENT 'Heating circuit flow temp.',
  `X37` smallint(6) NOT NULL,
  `X36` smallint(6) NOT NULL COMMENT '1st buffer lower temp.',
  `X44` smallint(6) NOT NULL COMMENT '1st buffer middle temp.',
  `X39` smallint(6) NOT NULL COMMENT '1st buffer upper temp.',
  `X42` smallint(6) NOT NULL COMMENT 'Esternal temp.',
  `X37_1` smallint(6) NOT NULL,
  `U_Lambda` smallint(6) NOT NULL COMMENT 'Voltage in mV',
  `Fan_Speed` smallint(6) NOT NULL,
  `FW_Pump_SET_Speed` smallint(6) NOT NULL COMMENT 'Freash water heating exchange pump SET speed',
  `FW_OUT_T` smallint(6) NOT NULL COMMENT 'Fresh Water Output temp.',
  `FAN_Control_boiler` smallint(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

-- --------------------------------------------------------

--
-- Table structure for table `Raw_Data`
--

CREATE TABLE `Raw_Data` (
  `Time_Stamp` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Device` int(8) NOT NULL,
  `Master_Msg` tinyblob NOT NULL,
  `Slave_Msg` tinyblob NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
