Giter Site home page Giter Site logo

sma-rs485-inverters's Introduction

Purpose

The purpose of this project is to collect from SMA solar inverters using an RS485 connection and send the data to your cloud using Ardexa. Data from SMA solar inverters is read using a Linux device such as a Raspberry Pi, or an X86 intel powered computer.

How does it work

This application is written in C++, using the SMA provided C libraries to query SMA inverters connected via RS485. This application will run as a service, and query any number of connected inverters at regular intervals. Data will be written to log files on disk in a directory specified via the command line. Usage and command line parameters are as follows. Note that the applications should be run as root only since it has access to a device in the /dev directory.

Usage: sudo ardexa-sma -c conf file path -n number of devices [-l log directory] [-d] [-v] [-i] [-s number of seconds between readings]

-l (optional) <directory> name for the location of the directory in which the logs will be written. The default is `/opt/ardexa/sma/logs`
-c (mandatory) <file path> fullpath of the SMA config file. An explanation of the config file is below.
-d (optional) if specified, debug will be turned on. Default is off.
-i (optional) discovery. Print (and if debug is on, send to the console) a listing of all available objects and variables on all inverters.
-v (optional) prints the version and exits.
-s (optional) delay between readings. Default is 60 seconds. Ignored during discovery (-i option).
-n (mandatory) number of devices to find. Must be at least 1, and less than 40.

The only 2 mandatory items are the number of inverters (-n) and the configuration file -c. So an example of the usage is : sudo ardexa-sma -c /home/ardexa/yasdi.conf -n 1 So for example, to run a discovery: sudo ardexa-sma -c yasdi.conf -n 1 -i

RS485 to USB converter

The SMA (as most inverters) can use RS485 as a means to communicate data and settings RS485 is a signalling protocol that allows many devices to share the same physical pair of wires, in a master master/slave relationship See -> http://www.usb-serial-adapter.org/ for further information

When an RS485 to USB converter has been plugged in, on Linux systems the device will connect to something line /dev/ttyUSB0. To check:

sudo tail -f /var/log/syslog
...then plug in the converter

You should see a line like: usb 1-1.4: ch341-uart converter now attached to ttyUSB0 This means that the RS485 serial port can be accessed by the logical device /dev/ttyUSB0 Alternatively, try: dmesg | grep tty

Inverter to RS485 (DB9) Physical Connection

Reference for the wiring:

If your computer has an RS485 port, then the inverter can be connected directly to this port. The inverter is connected using 3 wires to the RS485 DB9 port on the computer. DO NOT connect the inverter RS485 to a RS232 port. They are not voltage compatible and damage will probably occur. For this to happen, you need a devices like these:

Each and every RS485 port that uses DB9 has a different pinout. So you have to read the actual manual for the physical RS485 port you are using. For example; if using the Advantech UNO 2362G, the following pins are used: Pin1 = D- , Pin 2 = D+ and Pin 5 = GND. All other pins are not connected, so do not connect any other pins. So to wire it all up:

  • Make sure the Advantech is turned off
  • D+ Pin from the SMA Inverter (should be Pin 2 on the RS485 inverter interface) to Pin 2 of the RS485 DB-9 (Female) on the Advantech UNO 2362G
  • GND Pin from the SMA Inverter (should be Pin 5 on the RS485 inverter interface) to Pin 5 of the RS485 DB-9 (Female) on the Advantech UNO 2362G
  • D- Pin from the SMA Inverter (should be Pin 7 on the RS485 inverter interface) to Pin 1 of the RS485 DB-9 (Female) on the Advantech UNO 2362G

Confirm the physical serial port by running the command dmesg | grep tty. As stated previously, it should return something like /dev/ttyS1 if using a serial com port, or something like /dev/ttyUSB0 if using a 485/USB serial converter.

Building SMA YASDI Library

The YASDI software (See: http://www.sma.de/en/products/monitoring-control/yasdi.html) allows communications with the SMA inverter via RS485. Download thre ZIP file and do the following to install the libraries and utlities. You may need to install all the build tools as follows

sudo apt-get update
sudo apt-get install -y build-essential git cmake

then install the YASDI software

cd
mkdir sma
cd sma
...from http://www.sma.de/en/products/monitoring-control/yasdi.html#Downloads
wget yasdi-1.8.1build9-src.zip
unzip yasdi-1.8.1build9-src.zip
edit the file ../yasdi/include/packet.h and change Line 38: from struct TDevice * Device ...to.... struct _TDevice * Device
cd projects/generic-cmake
mkdir build-gcc
cd build-gcc
cmake ..
make
sudo make install     
sudo ldconfig
cd
vi yasdi.conf
	[DriverModules]
	Driver0=yasdi_drv_serial

	[COM1]
	Device=/dev/ttyUSB0
	Media=RS485
	Baudrate=1200
	Protocol=SMANet

sudo yasdishell yasdi.conf ... just to test

In the 'yasdi.conf' file above, change the 'Device=...' to whatever the device name is, as per the instructions above.

Building the Ardexa software

  • Make sure the YASDI application is in the directory above ../sma/
cd
git clone https://github.com/ardexa/sma-rs485-inverters.git
cd sma-rs485-inverters
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

Installing as a Service

The Ardexa service will query one or all of the inverters. To query at regular intervals, and write a message to the log, a service is required. The following instructions detail how to install the application to run as a service. The attached ardexa-sma.service file is used to run the application as a service. Edit the line ExecStart=/usr/local/bin/ardexa-sma -c /home/ardexa/yasdi.conf -n 13 -s 300 to change the number of inverters that will be searched (the -n 13 parameter) and the time between readings (the -s 300 parameter).

sudo cp ardexa-sma.service /etc/systemd/system/
sudo systemctl enable ardexa-sma.service
sudo systemctl daemon-reload
sudo systemctl restart ardexa-sma.service

sma-rs485-inverters's People

Contributors

david-mohr avatar gxcora avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sma-rs485-inverters's Issues

Make errors: passed 3 args, but takes just 2

I've changed the packet.h file to include the _ before TDevice, and did all the other steps in the instructions, but getting the make errors below. So I deleted everything and started fresh, following the instructions again - but still getting these errors on the make step. Please see the log below.

In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /home/pi/sma-rs485-inverters/src/main.cpp:29:
/usr/include/c++/6/bits/stl_algobase.h:243:56: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^
/usr/include/c++/6/bits/stl_algobase.h:265:56: error: macro "max" passed 3 arguments, but takes just 2
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
                                                        ^
In file included from /usr/include/c++/6/bits/stl_algo.h:60:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /home/pi/sma-rs485-inverters/src/utils.hpp:29,
                 from /home/pi/sma-rs485-inverters/src/main.cpp:38:
/usr/include/c++/6/bits/algorithmfwd.h:362:41: error: macro "max" passed 3 arguments, but takes just 2
     max(const _Tp&, const _Tp&, _Compare);
                                         ^
/usr/include/c++/6/bits/algorithmfwd.h:375:41: error: macro "min" passed 3 arguments, but takes just 2
     min(const _Tp&, const _Tp&, _Compare);
                                         ^
/usr/include/c++/6/bits/algorithmfwd.h:403:30: error: macro "min" requires 2 arguments, but only 1 given
     min(initializer_list<_Tp>);
                              ^
/usr/include/c++/6/bits/algorithmfwd.h:413:30: error: macro "max" requires 2 arguments, but only 1 given
     max(initializer_list<_Tp>);
                              ^
In file included from /usr/include/c++/6/bits/uniform_int_dist.h:35:0,
                 from /usr/include/c++/6/bits/stl_algo.h:66,
                 from /usr/include/c++/6/algorithm:62,
                 from /home/pi/sma-rs485-inverters/src/utils.hpp:29,
                 from /home/pi/sma-rs485-inverters/src/main.cpp:38:
/usr/include/c++/6/limits:320:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
           ^
/usr/include/c++/6/limits:324:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
           ^
/usr/include/c++/6/limits:387:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return false; }
           ^
/usr/include/c++/6/limits:390:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return true; }
           ^
/usr/include/c++/6/limits:394:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:456:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
           ^
/usr/include/c++/6/limits:459:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
           ^
/usr/include/c++/6/limits:463:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:523:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
           ^
/usr/include/c++/6/limits:526:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
           ^
/usr/include/c++/6/limits:530:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:593:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/6/limits:596:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
           ^
/usr/include/c++/6/limits:600:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:666:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
           ^
/usr/include/c++/6/limits:669:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
           ^
/usr/include/c++/6/limits:673:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:735:11: error: macro "min" requires 2 arguments, but only 1 given
       min() noexcept { return __glibcxx_min (char16_t); }
           ^
/usr/include/c++/6/limits:738:11: error: macro "max" requires 2 arguments, but only 1 given
       max() noexcept { return __glibcxx_max (char16_t); }
           ^
/usr/include/c++/6/limits:741:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:796:11: error: macro "min" requires 2 arguments, but only 1 given
       min() noexcept { return __glibcxx_min (char32_t); }
           ^
/usr/include/c++/6/limits:799:11: error: macro "max" requires 2 arguments, but only 1 given
       max() noexcept { return __glibcxx_max (char32_t); }
           ^
/usr/include/c++/6/limits:802:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:858:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
           ^
/usr/include/c++/6/limits:861:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
           ^
/usr/include/c++/6/limits:865:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:925:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/6/limits:928:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
           ^
/usr/include/c++/6/limits:932:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:998:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
           ^
/usr/include/c++/6/limits:1001:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
           ^
/usr/include/c++/6/limits:1005:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:1065:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/6/limits:1068:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
           ^
/usr/include/c++/6/limits:1072:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:1137:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
           ^
/usr/include/c++/6/limits:1140:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
           ^
/usr/include/c++/6/limits:1144:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:1204:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/6/limits:1207:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
           ^
/usr/include/c++/6/limits:1211:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:1277:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
           ^
/usr/include/c++/6/limits:1280:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
           ^
/usr/include/c++/6/limits:1284:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:1347:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return 0; }
           ^
/usr/include/c++/6/limits:1350:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
           ^
/usr/include/c++/6/limits:1354:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^
/usr/include/c++/6/limits:1598:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
           ^
/usr/include/c++/6/limits:1601:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
           ^
/usr/include/c++/6/limits:1673:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
           ^
/usr/include/c++/6/limits:1676:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
           ^
/usr/include/c++/6/limits:1748:11: error: macro "min" requires 2 arguments, but only 1 given
       min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
           ^
/usr/include/c++/6/limits:1751:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
           ^
In file included from /usr/include/c++/6/bits/stl_algo.h:66:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /home/pi/sma-rs485-inverters/src/utils.hpp:29,
                 from /home/pi/sma-rs485-inverters/src/main.cpp:38:
/usr/include/c++/6/bits/uniform_int_dist.h:76:56: error: macro "max" requires 2 arguments, but only 1 given
      _IntType __b = std::numeric_limits<_IntType>::max())
                                                        ^
/usr/include/c++/6/bits/uniform_int_dist.h:105:57: error: macro "max" requires 2 arguments, but only 1 given
       _IntType __b = std::numeric_limits<_IntType>::max())
                                                         ^
/usr/include/c++/6/bits/uniform_int_dist.h:149:11: error: macro "min" requires 2 arguments, but only 1 given
       min() const
           ^
/usr/include/c++/6/bits/uniform_int_dist.h:156:11: error: macro "max" requires 2 arguments, but only 1 given
       max() const
           ^
/usr/include/c++/6/bits/uniform_int_dist.h:227:40: error: macro "min" requires 2 arguments, but only 1 given
  const __uctype __urngmin = __urng.min();
                                        ^
/usr/include/c++/6/bits/uniform_int_dist.h:228:40: error: macro "max" requires 2 arguments, but only 1 given
  const __uctype __urngmax = __urng.max();
                                        ^
/usr/include/c++/6/bits/uniform_int_dist.h:296:40: error: macro "min" requires 2 arguments, but only 1 given
  const __uctype __urngmin = __urng.min();
                                        ^
/usr/include/c++/6/bits/uniform_int_dist.h:297:40: error: macro "max" requires 2 arguments, but only 1 given
  const __uctype __urngmax = __urng.max();
                                        ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /home/pi/sma-rs485-inverters/src/utils.hpp:29,
                 from /home/pi/sma-rs485-inverters/src/main.cpp:38:
/usr/include/c++/6/bits/stl_algo.h:3447:34: error: macro "min" requires 2 arguments, but only 1 given
     min(initializer_list<_Tp> __l)
                                  ^
/usr/include/c++/6/bits/stl_algo.h:3459:34: error: macro "max" requires 2 arguments, but only 1 given
     max(initializer_list<_Tp> __l)
                                  ^
In file included from /home/pi/sma-rs485-inverters/../sma/include/osswitch.h:9:0,
                 from /home/pi/sma-rs485-inverters/../sma/include/os.h:36,
                 from /home/pi/sma-rs485-inverters/../sma/include/lists.h:24,
                 from /home/pi/sma-rs485-inverters/../sma/core/timer.h:25,
                 from /home/pi/sma-rs485-inverters/../sma/libs/libyasdi.h:45,
                 from /home/pi/sma-rs485-inverters/src/main.cpp:21:
/usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected unqualified-id before ‘const’
     min(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’
/usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected ‘)’ before ‘const’
/usr/include/c++/6/bits/stl_algobase.h:195:5: error: expected initializer before ‘const’
/usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected unqualified-id before ‘const’
     max(const _Tp& __a, const _Tp& __b)
     ^
/usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’
/usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected ‘)’ before ‘const’
/usr/include/c++/6/bits/stl_algobase.h:219:5: error: expected initializer before ‘const’
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /home/pi/sma-rs485-inverters/src/main.cpp:29:
/usr/include/c++/6/bits/stl_algobase.h:243:5: error: ‘std::min’ declared as an ‘inline’ variable
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected primary-expression before ‘if’
       if (__comp(__b, __a))
       ^~
/usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘}’ before ‘if’
/usr/include/c++/6/bits/stl_algobase.h:246:7: error: expected ‘;’ before ‘if’
/usr/include/c++/6/bits/stl_algobase.h:248:7: error: expected unqualified-id before ‘return’
       return __a;
       ^~~~~~
/usr/include/c++/6/bits/stl_algobase.h:265:5: error: ‘max’ declared as an ‘inline’ variable
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected primary-expression before ‘if’
       if (__comp(__a, __b))
       ^~
/usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘}’ before ‘if’
/usr/include/c++/6/bits/stl_algobase.h:268:7: error: expected ‘;’ before ‘if’
/usr/include/c++/6/bits/stl_algobase.h:270:7: error: expected unqualified-id before ‘return’
       return __a;
       ^~~~~~
/usr/include/c++/6/bits/stl_algobase.h:271:5: error: expected declaration before ‘}’ token
     }
     ^
CMakeFiles/ardexa-sma.dir/build.make:62: recipe for target 'CMakeFiles/ardexa-sma.dir/src/main.o' failed
make[2]: *** [CMakeFiles/ardexa-sma.dir/src/main.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ardexa-sma.dir/all' failed
make[1]: *** [CMakeFiles/ardexa-sma.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

trying to install: `make` fails

Hi @gxcora ,
I'm trying to follow the installation instruction from the README, but it fails on make. This is what I get:

[ 25%] Building CXX object CMakeFiles/ardexa-sma.dir/src/main.o
In file included from /home/yaakov/sma-rs485-inverters/../sma/core/netpacket.h:41:0,
                 from /home/yaakov/sma-rs485-inverters/../sma/core/smadata_layer.h:26,
                 from /home/yaakov/sma-rs485-inverters/../sma/libs/libyasdi.h:47,
                 from /home/yaakov/sma-rs485-inverters/src/main.cpp:21:
/home/yaakov/sma-rs485-inverters/../sma/include/device.h:64:25: error: conflicting declaration 'typedef struct _TDevice TDevice'
 typedef struct _TDevice TDevice;
                         ^
In file included from /home/yaakov/sma-rs485-inverters/../sma/core/smadata_layer.h:25:0,
                 from /home/yaakov/sma-rs485-inverters/../sma/libs/libyasdi.h:47,
                 from /home/yaakov/sma-rs485-inverters/src/main.cpp:21:
/home/yaakov/sma-rs485-inverters/../sma/include/packet.h:38:9: note: previous declaration as 'struct TDevice'
  struct TDevice * Device; /* Zeiger auf das Device, von dem das Paket empfangen
         ^
CMakeFiles/ardexa-sma.dir/build.make:62: recipe for target 'CMakeFiles/ardexa-sma.dir/src/main.o' failed
make[2]: *** [CMakeFiles/ardexa-sma.dir/src/main.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ardexa-sma.dir/all' failed
make[1]: *** [CMakeFiles/ardexa-sma.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Can you help please ?

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.