Giter VIP home page Giter VIP logo

databox24's Introduction

DATABOX24 - Polling SG700MD

databox24 is a simple 'c' application to read a communication port that is attached to the newenergytek.com DATA BOX that is connected via USB port to your linux machine it will communicate to the SG Series of micro inverters. 200,250,300,350,400,450,500,600,700,1000,1200 and 1400

I have only tested on model SG700MD - http://www.newenergytek.com/index.php/content-48

This is a very simple server gateway app to poll and send the data to a web server to be processed.

Device

[DATA BOX 24G] - New Engery Tek (no version number or model on the unit )

[note:] I did receive a response from the company, and they gave me a quick layout of the data. I have updated my code to reflect their definition of the data.

CMD - Get Status (15 bytes total)

	0x43		- Header (1 byte)
	0xC0		- CMD - 0xC0=Device status (1 byte)	
	0x1122 		- Databox ID (2 bytes)
	0x0000		- Area ID (2 bytes) What is passed in is returned
	0x11223344	- Inverter ID (4 bytes)
	0x11223344	- Value Parameter (4 byte) 0x00=Status, 0x01=Turn ON, 0x02=Turn OFF, 0x03=Reboot
	0xCD		- Check Digit

RCV - Receive Status (27 bytes total (15 CMD header + 12 bytes Status))

	0x43		- Header (1 byte)
	0xC0		- CMD - 0xC0=Device status (1 byte)
	0x1122 		- Databox ID (2 bytes)
	0x0000		- Area ID (2 bytes) Whatever is passed in is returned back
	0x11223344	- Inverter ID (4 bytes)
	0x11223344	- Total Power Generations (4 Byte Float) 
	0xCD		- Check Digit (1 byte)
	0x1122		- DC Voltage divide by 100 for 2 places after decimal point (2 bytes)
	0x1122		- DC Current divide by 100 for 2 places after decimal point (2 bytes)
	0x1122		- AC Voltage divide by 100 for 2 places after decimal point (2 bytes)
	0x1122		- AC Current divide by 100 for 2 places after decimal point (2 bytes)
	0x0000		- Reserved (2 bytes)
	0x00		- xx UNKNOWN (1 byte)
	0x11		- Temperature C° (1 byte)

Computer

I tested and run this application on an Intel NUC machine.

STEP #1 - Check and find the port that your linux machine assigned when plugging in the DATABOX wireless modem

run -> lsusb Look for bus and device

Bus 001 Device 012: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

also run -> sudo dmesg

To list the port number it assigns

stty -F /dev/ttyUSB0 9600 cs8 -cstopb -parenb

STEP #2 - Compile application

Pull the files to a directory and run make to compile the application.

make

Also supported is a clean make command

make clean

STEP #4 - Install/RUN

There is no install script, so I just run it where its compiled. You will want to edit and modify the ** databox24.ini ** file to match your setup

[DataBox24]
  Debug=Yes
  DebugLog=./databox24.log
  USBDev=/dev/ttyUSB0
  Inverters=41000001,41000002,41000003
  PollTimeMin=1

  PostWrite=Yes
  PostHost=https://yourwebserver/databox24.php
  
  CSVWrite=No
  CSVFile=./databox24.csv

License

Open Software License v. 3.0 (OSL-3.0)

databox24's People

Contributors

awysocki avatar

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.