Code Monkey home page Code Monkey logo

jandrassy / isgmodbustcpsg Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 242 KB

DIY "SG Ready" adapter for Stiebel Eltron ISGweb. This Arduino sketch reads the state of digital input input pin of Arduino and sets the state over Modbus TCP to SG Ready INPUT1 register of ISGweb. It has overdeveloped monitoring and control.

License: GNU Affero General Public License v3.0

C++ 72.56% HTML 3.51% JavaScript 19.57% CSS 4.35%
arduino-sketch modbus-tcp stiebel-eltron

isgmodbustcpsg's Introduction

IsgModbusTcpSG

This Arduino sketch is for DIY "SG Ready" adapter for Stiebel Eltron ISGweb. The ISGweb device is Internet Service Gateway for Stiebel Eltron heat pumps. The ISGweb doesn't have physical SG Ready input pins, but SG Ready inputs can be be controlled over Modbus TCP. This sketch reads a state of digital input pin of Arduino and sets the state over Modbus TCP to SG Ready INPUT1 register of ISGweb.

I coded this sketch for a fellow Fronius Symo Hybrid owner from German Photovoltaikforum. The collaboration started with this forum thread (in German, but with pictures). Here is the basic version of the sketch.

The basic function of the sketch is very simple, but in the spirit of "If it's worth doing, it's worth overdoing", I reused everything I could from my Regulator project. So the final sketch has monitoring over Serial Monitor, Telnet and web page, it logs the state in csv files and it has a status LED and a beeper.

Hardware

The sketch was developed first on classic Arduino Nano with enc28j60 ethernet shield. To add SD card for logging and static web files we had to move to Nano Every which has 48 kB of flash (16 kB more then classic Nano) and 6 kB SRAM (3 times more then classic Nano.) The enc28j60 shield is compatible with Nano Every, but it turned out not be compatible with additional SPI device (SD card) so it needed a modification.

The only MCU specific code is the Watchdog setup for the ATmega4809 of Nano Every. The rest of the code should be portable to other Arduino model and other networking shield or module with proper Arduino networking library.

Source code

To use the sketch, copy the folder IsgModbusTcpSGfrom this GitHub repository into your sketch folder of Arduino IDE.

System

  • IsgModbusTcpSG.ino - global variables, setup() and loop(), handling network and MODBUS, main functions
  • SymoRTC.ino - reads time over MODBUS from DataManager of Symo photovoltaics inverter.
  • Events.ino - data saved to EEPROM and logged to SD file for monitoring

Front panel

  • Beeper.ino - handles a buzzer. In loop handles the alarm sound if the system is in alarm state.
  • StatusLed.ino - shows state with plain LED

Monitoring

  • Terminal.ino - logging to Serial Monitor or to Telnet client and reading simple commands
  • CsvLog.ino - logging state changes to csv files
  • WebServer.ino - JSON data for the web pages and serving of static web page files and csv files from SD card

Web interface

The data subfolder contains static files of the web page. The static web pages use data in json format requested from the WebServer implemented in WebServer.ino.

WebServer.ino can serve the pages from SD card, but this static web pages can be started from a folder on a computer to show the data from Arduino. Only set the IP address of Arduino in script.js.

isgmodbustcpsg's People

Contributors

jandrassy avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

isgmodbustcpsg's Issues

Is it possible to use this and host a series of float data (like a slave that has data in its holding registers for a master to read)?

I am quite new to this and am trying to understand modbus. I understand how you have implemented to match the modbus protocol. But, i am wondering is there a way to host the data for other master devices to read from my esp32 module and encj28j60 module?

I also found out that UIP library supports esp32. So, that shouldnt be a problem. I am just wondering if there is a way to have data that can be read by external master devices

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.