How to request Ebox wifi with modbus - modbus

I've never used modbus before.
I have an eBox-Wifi Epever connected to an MPPT charge controller TRIRON for solar power.
I was able to make it connect to my wifi and now has an accessible IP : 192.168.39.149
I just want to extract some data from it, battery Voltage, etc...
On http://192.168.39.149:80, i have a web interface for administration. (Which is not what i want.)
After an nmap, I see that there is port 8088 open. (Can use modbus there maybe ? no web interface on this port.)
I installed and used modbus_cli like that modbus -b 115200 -p 1 192.168.39.149:8088 3101 but I can't make it return anything...
https://files.i4wifi.cz/inc/_doc/attach/StoItem/7068/MODBUS-Protocol-v25.pdf
http://www.solar-elektro.cz/data/dokumenty/1733_modbus_protocol.pdf
https://github.com/favalex/modbus-cli
EDIT : I changed for baud 9600 and port 502. (Which are the defaults for modbus ?)

Try python modpoll tool with the following configuration, install modpoll via pip install modpoll if not installed.
Create a local config file, e.g. epever.csv, only added voltage/current/power values for testing.
device,mydevice,1,,,
poll,holding_register,12544,4,BE_LE,
ref,PV_array_input_voltage,12544,uint16,r,V,0.01
ref,PV_array_input_current,12545,uint16,r,A,0.01
ref,PV_array_input_power,12546,uint32,r,W,0.01
poll local device,
modpoll --tcp 192.168.39.149 --tcp-port 8088 --config epever.csv
The configuration assumes you keep the device ID = 1 (default), and use BE_LE endian, please adjust endian setting according to the platform running on.

I don't know if you need more than the graph for EPever Solar Station.
That is what I use and it works really good.
I connect STA mode Not AP.
I create a virtual COM9 port Baut Rate 115200, 192.168.0.7 :8088.
I create a new SSID:LSD Passw. 12345678 in the router assign a static IP 192.168.0.7
I used android app "PortTester" and I see IP 192.168.0.7 port 8088 is open fast and simple. Follow this video like I did...
https://www.youtube.com/watch?v=RrEumwFHfJ4
What I try to do is integrate it in Home Assistant.

I see something here, it since to be someone has connect...
https://community.home-assistant.io/t/epever-modbus-rs-485-config/214397/3
I don't know if this work?
modbus:
type: tcp
host: 10.240.1.4
port: 8088
name: epever4
timeout: 2
type: rtuovertcp
host: 10.240.1.4
port: 8088
name: epever4

Related

How can i access the terminal remotely of raspberry pi board 3 through Port 80

Is there any way that I can get my raspberry pi boards terminal on the browser of another system connected in same network ; if any open source application is available to get remote access through port 80 that will also get the job done . All other Ports are closed , only available port is port 80 . The board is running Debian Version stretch . But I am not considering using Reverse Tunneling .
This does not seem possible, port 80 is the default port for http. Which is probably being used by a process that is serving a web app for the server.
At most you will be able to interact via REST APIs and/or SOAP but neither can give you remote access/control of the device.

Issue getting my web server to work from external devices

I am attempting to set up an apache2 web server on my raspberry pi. I am able to connect to it by doing http://localhost:8080 (8080 because my router blocks port 80). Although when I do http://my.pub.lic.ip:8080 the connection times out. I set up port forwarding so that requests going to my router on port 8080 go to my raspberry pi on port 8080. This does not seem to work but I'm also not sure if the port forwarding is the cause or if it is something else. Any suggestions?
Is your web server configured to listen on the network interface besides localhost?
https://httpd.apache.org/docs/2.4/bind.html
For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:
Listen 80
Listen 8000
To make the server accept connections on port 80 for one interface, and port 8000 on another, use
Listen 192.0.2.1:80
Listen 192.0.2.5:8000
You can try using nmap by finding your router's public IP and on the raspberry pi type nmap my.pub.lic.ip This will show you what services are actually being published to the world. This gives more insight to the problem.
I got the web server up and running although for some reason it appears that my isp would only allow it to be hosted securely (as an https page)(I'm not sure if that's the right way to phrase it). To achieve this for free, I used cloudflare's ssl service. A tutorial to set it up for apache2 can be found here

apache2 web server works on localhost but can't go live

My website cannot go live!
The following is my web server setup.
1. Rogers modem – Hitron CODA-4582
2. Port Forwarding
Application Name Public Private Protocol Local IP Address
HTTP 80 – 80 800 – 800 TCP 192.168.0.201
HTTPS 443 – 443 883 – 883 TCP 192.168.0.201
3. Operating System - ubuntu 16.0.4
Apache2 Sever /etc/apache2.conf file.
I modified two things.
a. Uncommented the line ServerRoot “/etc/apache2”
b. Appended one line at the end of the file: ServerName my_rogers_IP_address.
I executed a command: sudo app info “Apache Full”
The output is
Profile: Apache Full
Title: Web Server (HTTP,HTTPS)
Description: Apache v2 is the next generation of the omnipresent Apache web
server.
Ports:
80,443/tcp
Then, I executed another command: sudo ufw allow in “Apache Full”
I thought I have done what I needed to do. So, I opened up the browser for testing. It only works for 127.0.0.1 or localhost. It won’t work if I enter http://my_rogers_IP_address.
Can someone give me a pointer?
Thank you in advance!
You need to point the apacheserver to a host that can actually host your website. Localhost is just a local loop between your computer's machine and the server. I would recommend using Heroku, or Cloud9, which is free. Additionally, you could buy a static IP for your site to use, however, this is not cost-effective. It is up to you whether you have the funds or just want to do this for fun.
I got my problem solved!!
It is my bad! Everything is fine except the private port setting.
The private port must be within the public port range.
Everything is working fine now. Hope this can help someone else.
Good day!

Dataplicity unable to access port

I am having a problem in accessing ports with my Pi. I am using dataplicity to access it online.
I can access my page with this URL.
https://my_id.dataplicity.io
Can't access when I use this
https://my_id.dataplicity.io:9090/
But I can access it in my local.
http://localhost:9090/
What could possibly be the problem here?
Thanks!
At the present time wormhole forwards HTTP traffic to port 80 on your device but forwarding to other ports is not something that can be achieved by default.
The port forwarding feature is coming as part of our PRO pricing plan in future.
As an interim workaround, it is possible to redirect port 80 on your Pi to another local port on your Pi using a reverse proxy (for example using nginx). Although wormhole itself will still communicate with port 80 on your device, nginx could listen on port 80 and forward this to another local port of your choosing. Here's a nice article that could get you started:
https://www.keycdn.com/support/nginx-reverse-proxy/

Server Connection with public IP

I have setup a simple HTTP java server running locally on port 8000. It simply prints a message "Hello world" when a request comes. When I try to ping it from the browser by running http://localhost:8000/test I get my message printed.
I want to get the same results from another computer that is not local. When I try to use my public IP lets say http:/43.xxx.xxx.xxx:8000/test (even from the same machine) I get an ERR_CONNECTION_REFUSED .
I probably suspect that has something to do with the firewall. Can anyone guide me a little more because I lack the experience?
Thanks in advance
You don't specify what host OS your server/firewall is running so I'll keep this generic...
Without knowing your application, it seems like the server is sending a reset (RST packet) when the first SYN packet shows up indicating that the port (on that interface [your external]) is closed. You can do a quick port scan from here (https://mxtoolbox.com/PortScan.aspx) if you don't have access to a remote machine to test with. Odds are, TCP/8000 will not be open.
If it is, in fact, closed, you'll have to look at the firewall that your host OS is running and find out how to allow TCP/8000 to your host. In a major firewall vendor, your rule would look similar to this:
Source: Any
Destination: Your Public IP Address
Service: TCP/8000
Action: Allow
Logging: Full
That being said, you mentioned this was a PC so look into "iptables" (if you're running *nix) or the Windows Firewall (if you're running Windows) on adding firewall rules (Unfortunately I just joined and can't ask questions/comments, yet).
If you really want to find out what packet is being sent, run a tcpdump on your external interface (let's say eth1) (assuming your remote IP is 1.2.3.4 and your home public IP is 4.5.6.7):
tcpdump -nn -vvv -e -s 0 -X -c 100 -i eth1 host 1.2.3.4 and host
4.5.6.7 and port 8000
Here you're looking for the SYN/SYN-ACK/ACK for a successful TCP negotiation or SYN/RST if there is a firewall rejecting (not dropping) the TCP stream to the port.
Once the port is open on the host OS firewall, take a look at the application to make sure it's configured properly. If this were a standard webserver, you could take a look at the configuration files for the "Allow from" directives to make sure that everyone can access the site. If this is a custom application that you've created, you'll have to check this yourself.
I finally solved my problem. I needed to open a forwarding port in my router that maps my local ip address to the public. My router is TP Link so this what I did:
http://www.tp-link.com/us/faq-72.html
Also in order for this to work every time and not to have to reconfigure this every time I reconected to the router (because I get a new local IP), I have created a static local ip for my server following this guide:
http://www.tp-link.com/us/faq-182.html
Thanks for all the replies.

Categories