rasProject_01 / weSweetHome  R. 116 2026-05-14
process control       /     RasPi software         by   weinert-automation
Loading...
Searching...
No Matches
growattHome.h File Reference

Types and values for the smart home's Growatt inverter handling (laboratory project). More...

#include "arch/config.h"
#include <stdint.h>
#include "weShareMem.h"

Data Structures

struct  modBvals_t
 Modbus readings and other process values. More...
struct  modSharMem_t
 Structure for shared memory. More...

Macros

#define ANZmodSLAVES
 Number of Modbus attached inverters (usually 1).
#define GROWerror
 JSON key for several inverter errors.
#define SHARED_MEM_DATA_SIZE
 Size of defined master slave communication data in shared memory.
#define SHARED_MEM_FILL_SIZE
 Size of extra fill array to have a standard shared memory size.

Detailed Description

Types and values for the smart home's Growatt inverter handling (laboratory project).

Revision history

This include file collects some configuration and naming common to
a) the Growatt inverter communication program
b) server side program(s) (CGI) for the web interfaces It is for Growatt inverters having Modbus serial communication via a RS232 [sic!] serial link, requiring a point to point connection for every such converter; see program growattLink.

All those programs, running on the system for process control and I/O, are written in C. The client side programming for the web HMI is in Javascript.

The server side programs communicate via shared memory and a set of three (ANZ_SEMAS) semaphores.

Macro Definition Documentation

◆ SHARED_MEM_DATA_SIZE

#define SHARED_MEM_DATA_SIZE

Size of defined master slave communication data in shared memory.

This macro calculates the size in bytes of the shared memory area, see valsSharMem_t. The size of the shared memory SHARED_MEMORY_SIZE should be chosen as a multiple of 256 (512) bytes. The extra bytes are usable as an array uint8_t fill[] of size SHARED_MEM_FILL_SIZE.