Comments (21)
Thanks for getting in touch! I had a look at the documentation of your meter, and while there are many integrations with existing tools, and even a web based API, I can't actually find a modbus document anywhere. Have you found anything that lists all the available registers?
It might be worthwhile just using the web API (via wifi I suspect) as a data source. In case you would like to try this, all we really need is the JSON output of http://meter-ip/monitorjson
.
from solaredge_meterproxy.
Thanks for the answer! I'll have a look for modbus documentation and let you know if I find it! Anyway the json putput is:
{"method":"uploadsn","mac":"B0F89329E511","version":"2.75.69","server":"em","SN":"DF4DBF22","Datas":[[237.4,3.00,634,11248.760,8031.330,49.93,0.89],[229.7,6.33,1417,8473.460,8373.760,49.93,0.97],[236.4,6.66,-1565,8832.250,8865.660,49.93,0.99]]}
The data details are (the negative power means there is export to the grid):
L1:
voltage 0 | 237.4 V
current 1 | 3 A
power 2 | 634 W
importenergy 3 | 11248.76 kWh
exportgrid 4 | 8031.33 kWh
frequency 5 | 49.93 Hz
pf: 6 | 0.89
L2 (the rest is same)
0 | 229.7
1 | 6.33
2 | 1417
3 | 8473.46
4 | 8373.76
5 | 49.93
6 | 0.97
L3 (the rest is same)
0 | 236.4
1 | 6.66
2 | -1565
3 | 8832.25
4 | 8865.66
5 | 49.93
6 | 0.99
from solaredge_meterproxy.
Thanks for getting in touch! I had a look at the documentation of your meter, and while there are many integrations with existing tools, and even a web based API, I can't actually find a modbus document anywhere. Have you found anything that lists all the available registers?
It might be worthwhile just using the web API (via wifi I suspect) as a data source. In case you would like to try this, all we really need is the JSON output of
http://meter-ip/monitorjson
.
I have got the modbus documentation with registers from the factory, but they ask me "do not post on the internet". So can I have your email address to send you?
Thanks
from solaredge_meterproxy.
Thanks for getting in touch! I had a look at the documentation of your meter, and while there are many integrations with existing tools, and even a web based API, I can't actually find a modbus document anywhere. Have you found anything that lists all the available registers?
It might be worthwhile just using the web API (via wifi I suspect) as a data source. In case you would like to try this, all we really need is the JSON output ofhttp://meter-ip/monitorjson
.I have got the modbus documentation with registers from the factory, but they ask me "do not post on the internet". So can I have your email address to send you?
Thanks
That's an odd request from the manufacturer. The documentation will be used to add the meter to the sdm_modbus
project where -- in addition to the register values in the code -- the documentation will be uploaded for reference. If you do not feel comfortable with that then I suggest you do not post the documentation here and we try to get the web based API working. Otherwise, please attach it to this issue.
from solaredge_meterproxy.
That's true. It is a very good thing if we can use the web api as well, because it makes much more easy to use this meter. But of course with modbus it can be more precise (over the web api we have 6sec refresh rate)...
You can find the protocol info below.
from solaredge_meterproxy.
A working json meter would be great. I'd then contribute a similar mete to the project - my python skills are good enough for that, but not for adding the first json based meter
from solaredge_meterproxy.
That's true. It is a very good thing if we can use the web api as well, because it makes much more easy to use this meter. But of course with modbus it can be more precise (over the web api we have 6sec refresh rate)... You can find the protocol info below.
Thanks for the document.
Would you please grab the latest master from sdm_modbus and try the following, substituting YOUR_SERIAL_DEVICE
for /dev/tty...
whatever:
import sdm_modbus
import json
meter = sdm_modbus.WEM3080T(device="YOUR_SERIAL_DEVICE")
print(json.dumps(meter.read_all(scaling=True), indent=4))
from solaredge_meterproxy.
I tried... My device is ttyUSB0
[74526.782724] usbcore: registered new interface driver ch341
[74526.782744] usbserial: USB Serial support registered for ch341-uart
[74526.782772] ch341 7-1:1.0: ch341-uart converter detected
[74526.799616] usb 7-1: ch341-uart converter now attached to ttyUSB0
I made a test.py with the following content:
#!/usr/bin/env python3
import sdm_modbus
import json
meter = sdm_modbus.WEM3080T(device="/dev/ttyUSB0")
print(json.dumps(meter.read_all(scaling=True), indent=4))
First I installed the sdm_modbus with pip
$ ./test.py
Traceback (most recent call last):
File "./test.py", line 6, in
meter = sdm_modbus.WEM3080T(device="/dev/ttyUSB0")
AttributeError: module 'sdm_modbus' has no attribute 'WEM3080T'
So It looks pip have old version. So I grab the master and the files from src/sdm_modbus moved to the ~/.local/lib/python3.6/site-packages/sdm_modbus (the old was here, so of course removed before).
After that test.py running, but no result:
$ ./test.py
{}
Of course the device have 20666 permission... What's wrong? :(
from solaredge_meterproxy.
After that test.py running, but no result:
$ ./test.py {}
Of course the device have 20666 permission... What's wrong? :(
That's not actually a completely horrible result. The default baud rate of sdm_modbus
is 38400 baud. Your meter probably works on a different baud rate, but as the modbus documentation is so very very short there's no telling what it is. You will need to experiment with different baud rates until you get some result. Do this by adjusting the script so:
#!/usr/bin/env python3
import sdm_modbus
import json
baudrate = 1200
meter = sdm_modbus.WEM3080T(device="/dev/ttyUSB0", baud=baudrate)
print(json.dumps(meter.read_all(scaling=True), indent=4))
Try baudrate
of 1200, 2400, 9600, or 115200.
from solaredge_meterproxy.
I tried it, but with the same result :(
I thought I try with another laptop, but on this running ubuntu 14.04 with python 3.4. I have an error whet I try to run:
Traceback (most recent call last):
File "./test.py", line 3, in
import sdm_modbus
File "/usr/local/lib/python3.4/dist-packages/sdm_modbus/init.py", line 1, in
from sdm_modbus.meter import *
File "/usr/local/lib/python3.4/dist-packages/sdm_modbus/meter.py", line 130
return f"{self.model}({self.device}, {self.mode}: stopbits={self.stopbits}, parity={self.parity}, baud={self.baud}, timeout={self.timeout}, retries={self.retries}, unit={hex(self.unit)})"
^
SyntaxError: invalid syntax
Is this because of the older python version? Which version do I need?
Today I going to try with another adapter and with another cable. Are there any other way how can I debug?
It is very complicated to use/integrate the json output? Because that should be much more easy to use the people in some cases...
Thanks
from solaredge_meterproxy.
I have no luck :( . Now I tried with a one meter long cable, of course with every baud rate, but the same is the result :( . Let me know how can I debug to find where is the problem?!
Thanks
from solaredge_meterproxy.
I have no luck :( . Now I tried with a one meter long cable, of course with every baud rate, but the same is the result :( . Let me know how can I debug to find where is the problem?!
Thanks
The empty {} is a good result, it means the script executes properly, there's just no communication with the meter. This may be due to a number of things. The most likely are the baud rate and the id
the meter is listening on. Because there's no documentation this is just guessing, but you could try adding unit
to the following line and trying values other than the default of 1. Due to the lack of documentation this could be any number between 1 en 254:
meter = sdm_modbus.WEM3080T(device="/dev/ttyUSB0", baud=baudrate, unit=2)
from solaredge_meterproxy.
Are there any way to make this automate? I mean a program which can try any id or baud to find the device?
from solaredge_meterproxy.
I have got this from the manufacturer:
the RS485 is 9600/8/N/1.
The software will work like a Modbus master, polling the data from the energy meter.
Hope it will help...
from solaredge_meterproxy.
I have got this from the manufacturer: the RS485 is 9600/8/N/1.
The software will work like a Modbus master, polling the data from the energy meter.
Hope it will help...
Those values match what you would have tried already using the suggestions I posted. Have you had any luck talking to the meter via any other software?
from solaredge_meterproxy.
I have got this from the manufacturer: the RS485 is 9600/8/N/1.
The software will work like a Modbus master, polling the data from the energy meter.
Hope it will help...Those values match what you would have tried already using the suggestions I posted. Have you had any luck talking to the meter via any other software?
I have to look for an other tool to test it... Can you give me any suggestion?
from solaredge_meterproxy.
Reading from json is not working?
from solaredge_meterproxy.
Another good thing. Now we are able to use modbus tcp to read data from WEM3080T. You can watch here:
https://www.youtube.com/watch?v=aumNgMPp1sA
and here: https://www.iammeter.com/newsshow/news-modbus-tcp-energy-meter
So the question is, can we use this as a source to make this meter work with SE inverter?
Thanks
from solaredge_meterproxy.
Are there any news regarding this meter?
from solaredge_meterproxy.
I asked you to try connecting to the meter using any other modbus software to confirm the meter is accessible. Have you done this? I won't be able to debug the problem unless you can verify that the meter is actually working over modbus.
from solaredge_meterproxy.
Well, unfortunately I had no success with modbus rtu (tried with modbus mechanic), maybe my usb-rs485 adapter is fault. The new is on the way, so I will see when it is here. But, as I wrote, now we can communicate with the meter in modbus tcp. and that one is working with modbus mechanic. So that's why I ask maybe we can use this meter with modbus tcp communication?!
Thanks
from solaredge_meterproxy.
Related Issues (19)
- KeyError 'meter1' HOT 16
- Integrate DSMR smart meter HOT 1
- SDM630 and missing values HOT 3
- Question: feed values from API to inverter? HOT 5
- "DEBUG: Frame check failed, ignoring!!" on SE6K and SDM630 V2 HOT 8
- What / where to feed the kWh imported and exported HOT 11
- Timeout error HOT 35
- ModuleNotFoundError: No module named 'pymodbus.server.sync' HOT 2
- Starting script as a service HOT 2
- Struggling to get values from mqtt HOT 6
- how to setup
- semp-tcp.py issue HOT 1
- Question: run the script on RPI in background HOT 10
- semp-tcp.py integer error for port number HOT 80
- QUESTION: MQTT integration HOT 1
- Difference in exported power HOT 10
- No values reported HOT 32
- No success with StorEdge SE7K-RWS48BNN4 and SDM630MCT-RC + 3pcsESCT-RC100 HOT 26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solaredge_meterproxy.