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

Unable to understand the way to get data from a sunspec device #81

Open
phgachoud opened this issue Oct 30, 2019 · 0 comments
Open

Unable to understand the way to get data from a sunspec device #81

phgachoud opened this issue Oct 30, 2019 · 0 comments

Comments

@phgachoud
Copy link
Contributor

Hi,
Sorry but after reading many times the Interacting with a sunspec device, I'm still unable to understand how to read values from a device. I'm able to get data from common and inverter with

l_d.common.SN

In my case, I'm trying to get the informations from the power limitation of an SMA device (inverter manager). I have the following device models:

['common', 'model_11', 'model_12', 'inverter', 'nameplate', 'settings', 'status', 'controls', 'storage', 'volt_var', 'freq_watt_param', 'reactive_current', 'watt_pf', 'volt_watt',
'mppt', 'lvrt', 'hvrt', 'base_met', 'mini_met']

after using this code:

l_d = client.SunSpecClientDevice(client.TCP, l_modbus_slave_address, ipaddr=l_ip_address, timeout=l_timeout)
l_d.inverter.read() # retreives latest inverter model contents
l_d.common.read()
self.__logger.info("--> ************* device models *************: %s" % (l_d.models))   

after that, I get followings when I do a:

self.__logger.info("-->inverter ************* reactive_current *************: %s" % (l_d.reactive_current)) 

=> => =>
inverter ************* reactive_current *************:
reactive_current (128):

How can I read the data of the 128 block? or storage? I still don't understand :-(

Thx !!

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

1 participant