Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect via the eBox Wifi device? #14

Open
int2018 opened this issue Mar 24, 2018 · 5 comments
Open

How to connect via the eBox Wifi device? #14

int2018 opened this issue Mar 24, 2018 · 5 comments

Comments

@int2018
Copy link

int2018 commented Mar 24, 2018

Hallo,

EPEVER has a little device (eBox-Wifi-01) which connects to the RJ45 port of the tracer. After that you can use an Android App to read/set values.
Here: http://www.epsolarpv.com/en/index.php/Product/pro_content/id/731/am_id/139
And it is possible to configure the device (at least the 'older' ones) as an access point in your WLAN (in this mode the App doesn't work due to hard coded IP).

The device shares the data in a way that looks like a RS485/modbus interface (I have no clue) and on windows you can setup a "virtual" COM port and connect to the device. The standard EPEVER monitoring software can connect via the virtual com port and read all data. So, the eBox has an IP port which seems to offer a "serial" conncetion (via IP) which help to read the values that come from the tracer.

But my question is how to use my raspberry instead of the monitorig software.
Since it is possible to with this github project to communicate like this:
raspberry->usb-to-rs485->tracer,
it should not too much effort to communicate like this:
raspberry->eBox(IP)/rs485port->tracer

I hope you understand what I am saying...

And thanks for a hint!

@int2018
Copy link
Author

int2018 commented Mar 24, 2018

Ok, I got further, I mange to install a virtual serial port on my raspberry (with socat) which actually talks to the eBox via Wifi. So far it works, I tested the example_...php. But there is an message that the CRC data is not as expected and then there is no decoding and no vaules. For testing I disabled the CRC check and I do get vaules from tracer. This has to be checked a litte more.

BUT: When I test the example_web.php under raspberry apache2 there is no data and the error.log says that the port cannot be opened It seems there is some access error for apache to the port.

Any hints on this?

@int2018
Copy link
Author

int2018 commented Mar 24, 2018

Ok, I have the example_web.php working under apache2 on my raspberry.
You have to watch out that the apache daemon can access the virtual serial port. This can be achieved if you "create" port under the www-data user. This is a bit tricky because you cannot just su the command. Anyway, this worked for me (change the IP address for your device):
sudo su - www-data -s /bin/bash -c 'socat pty,link=/home/pi/dev/ttyV0 tcp:192.168.1.14:8088&'

My test folder was created here /home/pi/dev but you can do it under the /var/www
Make sure the folder can be accessed by the www-data user: sudo chown www-data:www-data ...

And the name of your serial port needs to be in the example_web.php

I still have the CRC error but it works without CRC check. Should I use "raw" in the socat command?

Anyway, have fun!!

@int2018
Copy link
Author

int2018 commented Mar 24, 2018

Looks like this (no solar power at night...):

grafik

This was referenced Apr 5, 2018
@02humza
Copy link

02humza commented Apr 14, 2018

int2018 it was a treat reading your comments here and all the links you posted in addition to what you 're doing I intend to make a prediction system baised on weather forecasts and panels data :)

@dtabone
Copy link

dtabone commented May 11, 2021

Thank you - worked for me. Am also using monit to make sure the socat process remains always active

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants