Skip to content

Writing Value for EMS_EP_RESERVE #68

Open

Description

@hismastersvoice

I tried to write the value for Emergency-Power-Reserve via RSCP to my E3DC
Reading the value works fine.

But if I try to write, I always get NULL back and the value don't change.
Can anybody help me please? Thanks in advance.

I have found that this value is % of the installed batterie capacity, and it is given als float32 eg 25.00 etc.

def set_epr(self, ep_reserve=None, keepAlive=False):

    res = self.sendRequest(
        (
            "EMS_REQ_EP_RESERVE",
            "Container",
            [
                ("EMS_EP_RESERVE", "Float32", ep_reserve),
            ],
        ),
        keepAlive=keepAlive,
    )

Activity

  1. Selaron commented on Oct 16, 2022

    @Selaron

    After several attempts I did it like that and it worked, setting EP Reserve to 1650 Wh:

    from e3dc import E3DC
    
    ...
    
    retval = e3dc.rscp.sendRequest(
            (
                "SE_REQ_SET_EP_RESERVE",
                "Container",
                [
                    ("SE_PARAM_INDEX", "Uint32", 0),
                    ("SE_PARAM_EP_RESERVE", "Float32", 0.0),
                    ("SE_PARAM_EP_RESERVE_W", "Float32", 1650.0),
                ],
            )
        );
    
    

    Idea borrowed from here: https://github.com/nischram/E3dcGui/blob/1ed3dc163287f7227b303e22d4ff20c650143ad0/Rscp/RscpSet.cpp#L105

  2. hismastersvoice commented on Oct 20, 2022

    @hismastersvoice
    Author

    You are my hero ;)
    Work well.

    Thanks.

  3. Selaron commented on Oct 21, 2022

    @Selaron

    Only thing is that for some reason the new value does not update on the touch screen UI, but it actually works.

  4. hismastersvoice commented on Oct 21, 2022

    @hismastersvoice
    Author

    @Selaron

    I can confirm this.
    The display stays with the old value.

    Also reading the set value was a bit difficult.
    You only get a % value, but this % is calculated by installed capacity and state of health of the batteries.

    For me it work perfectly now.

  5. Selaron commented on Oct 21, 2022

    @Selaron

    Using this you can get the Wh reserve setting:

    retval = e3dc.rscp.sendRequest(
                    ("SE_REQ_EP_RESERVE", "None", None),
        )[2][2][2];
    
    

    The [2][2][2] extracts the value out of the tuple.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions