Skip to content

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

Description

@phgachoud

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 !!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions