Giter VIP home page Giter VIP logo

Comments (70)

Nicks57 avatar Nicks57 commented on September 3, 2024 1

Hi,

In the meantime, I started to work on it. The problem comes from the frame received by the HouseMonitoring function in KLF 200 which is used for example by Home Assistant to update Main Parameter (position) and Functional Parameter (FP3 : orientation). The notification frame received periodically from HouseMonitoring contains correct values for Main Parameter but total abberant values for Functional Parameters (FP1-FP7). In our case, we get for the slats orientation values that are either UNKNOWN, 26% or 73%.... I assume this is a bug in the Velux KLF 200 API and since there is no more support, we have to find another way.
Fortunately, after some testing, there is a command that delivers the correct Functional Parameter values: GW_STATUS_REQUEST_REQ.
I implemented this command in a local copy of Pyvlx this week-end and I'm still testing it. So far, I can get the correct orientation of the slats in Python debugger but finding a solution to call the GW_STATUS_REQUEST_REQ command within the HouseMonitoring seems to be tricky.
I will continue to work on it and when a solution is found, I will submit the code for acceptance by Julius2342.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024 1

Hi dumpfheimer,

I finished the code implementation. I had to put the GW_STATUS_REQUEST call in the Hearbeat loop because if call when receiving GW_NODE_STATE_POSITION_CHANGED_NTF (House monitoring frame), then the KLF200 send another GW_NODE_STATE_POSITION_CHANGED_NTF frame and we end in an infinite loop.

I tested it on my side in Home Assistant and it is working well. It would be great if you could also test it on your side. You will find the code in my repository Nicks/pyvlx (master branch).

Thank you!

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024 1

Ok, so at least you should not be affected in a negative way by the changes we want to make?

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

BTW I'm using pyvlx 0.2.16

from pyvlx.

bonito1 avatar bonito1 commented on September 3, 2024

Hello dumpfheimer,

could you explain how have you added the "tilt position" to HA exactly?
I have also venetian blinds with Somfy motors but I can not change the "tilt position" via HA. I can move them only up and down via HA.
Have you modified the the velux component?
Could you share your code to add the "tilt position" to a venetian blind?

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Hi!

You are right. HA currently does not support that. I have built it myself but have not yet tested it (especially the close tilt and open tilt correctness) and am not sure about the contribution guidelines so I did not dare to create a merge request YET.

Take a look at my changes here if you want to try it yourself:
dumpfheimer/core@1f5006d

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Hi!

I tried to investigate the values but I didn't really get smart from them. I wrote a script, that changes the orientation and reads back the response fp3 values. I put them in a CSV maybe somebody gets an idea of what could be going on.

values_1.txt
values_2.txt

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

For tilt position the HA integration has to be adjusted. pyvlx already support that since #33 . For testing you can use my HACS custom component where I already modified HA integration slightly, but not yet as a final solution to create a pull request to velux integration.

I didn't modified HASS yet, as the tilt function has two different options in terms of implementation, depending on the blinds. At somfy tahoma there was the possibility to configure blinds as either as (+90°/-90°) blinds or 0-100 %. The difference is in the code. Both covers requires a value between 0 and 100 for the tilt position, but the blinds with (+90°/-90°) are open at 50% and close at either 0% (=+90°) or 100% (=-90°) while the others are open at 0% and closed at 100% (inverted logic as in HA). In order to catch these different types of blinds, for each blind an additional configuration step is necessary to give the user the possibility to set the correct blind type. My exterior venetian blinds are from type (+90°/-90°), so I hard coded them to be open at 50 and close at 100. This is currently implemented at

async def open_orientation(self, wait_for_completion=True):
"""Open Blind slats orientation.
Blind slats with ±90° orientation are open at 50%
"""
await self.set_orientation(
orientation=Position(position_percent=50),
wait_for_completion=wait_for_completion,
)
async def close_orientation(self, wait_for_completion=True):
"""Close Blind slats."""
await self.set_orientation(
orientation=Position(position_percent=100),
wait_for_completion=wait_for_completion,
)

and called from HA via:

https://github.com/pawlizio/my_velux/blob/d52ffc7a8998f0e93aa5f5de2d99fd0c69c5d742/custom_components/my_velux/cover.py#L139-L145

However if you install custom component you can modify config\custom_components\my_velux\cover.py as follows to manually define the position_percent at which the cover is open/close

    async def async_open_cover_tilt(self, **kwargs):
        """Open cover tilt."""
        orientation = Position(position_percent=0)
        await self.node.set_orientation(orientation=orientation, wait_for_completion=False )

    async def async_close_cover_tilt(self, **kwargs):
        """Close cover tilt."""
        orientation = Position(position_percent=100)
        await self.node.set_orientation(orientation=orientation, wait_for_completion=False )

My HACS custom component: https://github.com/pawlizio/my_velux

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Hi!

I modified the Hass code as posted above: dumpfheimer/core@1f5006d

The problem is not setting the orientation - that works fine. The problem is that it seems like the blinds are not sending the correct orientation when sending a status update. Do you have any information on that topic?

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

You mean that you set them to 100 %, but they confirm their position at 28%?

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

But just for clarification, physically they are at 100%?

What is reported if you set them to another value like 25% or 30%?

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Yes, exactly. I intend to e.g. close the blinds with a 45° orientation. The blinds act exactly right and stay in the desired state. But the values reported back in fp3 are random other values that have nothing to do with the current orientation. Furthermore I wrote a script that set the orientation from 0-100 and displayed the responses in binary form. Ignoring the timestamp and checksum I was able to find exact the same responses from varying orientations which lets me believe the blinds do not send the orientation with the status update frame. Or it is hidden very well (within the timestamp for example. Those are not real timestamps)

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Any suggestions what I could try?

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

If you can't find any systematic within the feedback I only can suggest to ignore the feedback from the KLF with regards to orientation (fp3 value). In this case you would always have the latest status which you set via home assistant.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

I do have a Somfy connexoon AND the velux klf 200. The Somfy App does show the correct orientation. Should I be able to see the traffic between blind and connexoon on the klf200? Maybe I can identify a new frame.

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

And frames sent between connexoon and the blind?

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

No, I mean if you activate the debug mode you will see all available frames submitted by KLF. But you will not see the whole io-homecontrol communication, only the abstract which is provided by KLF200.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Okay, too bad. Thank you, though.
I guess I will try it anyways and hope the blind might send a broadcast message or something similar that contains a hint.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

How would I enable debug mode?

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

Enable logger for pyvlx at your configuration.yaml as follows:

logger:
  default: warning
  logs:
    pyvlx: debug

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Danke!

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Does anyone have a contact from somfy or velux whom I could ask about this?
I tried to contact them but never got a response.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

@pawlizio is my assumption correct, that you have venetian blinds too?
If so, is the second byte you receive as FP3 always 00?

I am trying to find a workaround for the random values of somfy blinds. My first try would be to ignore the value if the first byte is a position and the second byte is not 0x00

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

@dumpfheimer yes I have exterior venetian blinds. If I set the orientation in HA the KLF always confirm only F7FF, which is defined as target valux, but pyvlx ignore this, because only values between 0 and 100% are accepted. I also don't get values on HA if I change the orientation with my remotes. But I have no random values as feedback or at least I never observed them.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Hello,

I installed yesterday my new KLF200 with latest firmware as well as the Velux HA custom component from pawlizio. First, thanks a lot for the great contribution!
However, I'm facing the same problems as dumpfheimer with my venitian blind (Warema exterior venitian blinds with Somfy IO Home control module integrated). I can perfectly control the orientation of the blades with both my remote control (Somfy Situo 5) and HA. But as current_position, I randomly get either 28% or 75%.
Is there any update on this issue?

Thank you!

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Hi!

Nothing new on my side. I set this aside for now even though its annoying me. If more people are having this issue it might be better to ignore the FP3 from the venetian blinds all along and just cache the last set value. This of course should only happen if there are no users that actually get useful feedback on FP3, but I dont know how we could find out if such blinds exist.

There must be some kind of way to actually get the current position, because the somfy connexoon does load the right angle if you change it by eg a remote control. But I'm afraid that would be a huge trial and error mess. I wrote Velux and Somfy asking for help but neither even bothered to answer me.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Glad to test it if you check in your changes.

And thank you for figuring this out!

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

sorry, I must have missed an email.
I will test it as soon as possible, thank you!

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Okay, I'm not home, but everything seems to be working normally and I am not getting randomly jumping values for tilt when I change the tilt position. So this looks like an improvement already. When I'm back I will test changing the orientation with the remote and see what happens.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Thank you for the first feedback.
The tests with the remote were successful on my side. Orientation is updated every minute since the status is called from the heartbeat loop.

In the mean time I will finished the unit tests to be ready to make a pull request if the tests on your side are successful.

from pyvlx.

stephanseitz avatar stephanseitz commented on September 3, 2024

Hello Nicks57, thank you very much for the good work! I would also like to test the tilt function as I've been looking for a fix for a long time. I already use https://github.com/pawlizio/my_velux as a custom_component. How can I install your pyvlx library there? When could your solution get into the official version? Can I help you somewhere? ;)

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Sorry I completely lost this out of sight. I had some issues with the branch. If I remember correctly it stopped working after 30s which, I believe, is the heartbeat interval. But I cannot even say that the cause is in the branch itself because I have modified HA and especially VELUX component. Sorry for never getting back to you

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Hello!
@stephanseitz Thank you! To use my version of repository, you will need to change the "requirements" line in the manifest.json file in the custom component. Replace it with this:
"requirements": ["git+https://github.com/Nicks57/pyvlx.git@master#pyvlx==0.2.20"]

This means that HA should load my repository if there is no version 0.2.20 of pyvlx (actual version is 0.2.19).

I am working with a Velux custom component that is a copy of the HA core component (https://github.com/home-assistant/core/tree/dev/homeassistant/components/velux). I cannot garantee that it will work with the custom component of pawlizio but at far as I can see, it should.

The solution may go to the official version if we have multiple successfull tests for different people and if the solution is accepted. As I explained above, there is a bug in the Velux KLF200 API that delivers wrong values for FPX parameters when using the House Monitoring function. The solution to put the status update in the Heartbeat loop is not 100% "clean" since it is only a work around and may not be accepted from Julius2342.

You can help by testing on your side and give us the feedback. It will also be interesting to know which kind of actuator you have (I have Somfy Exterior Venetian blind Type 17).

@dumpfheimer Thank you for your feedback. On my side, I use the code without any change (I'm quite busy renovating a house :-) ) since the end of August and it is working even with HA running for weeks without restart. But it could be an isolated working case on my side so it is definitely good if other people can test it.

from pyvlx.

stephanseitz avatar stephanseitz commented on September 3, 2024

Hello nicks57, Hello dumpfheimer, thank you very much for your quick answers! I've just installed and tested the version. It works great! Much more usable than before. If I change the position manually with a hand-held transmitter, it takes a while until it is up-to-date in Homeassistant, but this is still better than with the tahoma api (official and unofficial). I have the Somfy J406 io PROTECT motors (24 pieces) in use (it says on the nameplate, can also send you a photo of the nameplate by pm).

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Thank you for you feedback. I still need to write some unit tests, which may take some times. Then I could try to make a pull request. In the meantime, maybe we could have a chance for other people to test this solution.

While your are talking about Tahoma, I have another question that has been on my mind for a while and you can probably help me. When I use the remote control (Somfy Situo 5) and close the venetian blinds completely, the orientation of the blinds is set to 100% (closed, no light). When I open the venetian blinds completely, the orientation of the blinds is set 50% so that there are fully "wrapped" and not overlap the top of the window. If I close or open the venetian with HA, I don't have this effect. Especially when opening fully, the orientation is then 100% (or 0%) and the venetian is not fully "wrapped".
So my question is, do you have a Tahoma with the Somfy app, and if so, what is the behavior when you close or open the venetian completely? Maybe we can improve something here.

Thank you!

from pyvlx.

stephanseitz avatar stephanseitz commented on September 3, 2024

I have a Tahoma Box and mainly used the Somfy app due to the previous problems with the API. Today I compared both ways and moved the blinds up and down several times. I couldn't see any real difference in behavior. The end position (open as well as closed) is the same for both ways. Even when the blinds are fully open, they disappear in the same place in the box. Either my motors are configured differently or unfortunately I did not understand your question. Maybe you can send me photos with notes too? Thanks very much

from pyvlx.

Julius2342 avatar Julius2342 commented on September 3, 2024

Should we keep an "orientation" flag within the abstraction?

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

@Nicks57

While your are talking about Tahoma, I have another question that has been on my mind for a while and you can probably help me. When I use the remote control (Somfy Situo 5) and close the venetian blinds completely, the orientation of the blinds is set to 100% (closed, no light). When I open the venetian blinds completely, the orientation of the blinds is set 50% so that there are fully "wrapped" and not overlap the top of the window. If I close or open the venetian with HA, I don't have this effect. Especially when opening fully, the orientation is then 100% (or 0%) and the venetian is not fully "wrapped". So my question is, do you have a Tahoma with the Somfy app, and if so, what is the behavior when you close or open the venetian completely? Maybe we can improve something here.

Within Tahoma portal you can adjust your blinds to the following illustrated options:
image

When I extended pyvlx for blind tilt functionality, I didn't consider those options and just hard coded open orientation at 50% and close at 100%:

async def open_orientation(self, wait_for_completion=True):
"""Open Blind slats orientation.
Blind slats with ±90° orientation are open at 50%
"""
await self.set_orientation(
orientation=Position(position_percent=50),
wait_for_completion=wait_for_completion,
)
async def close_orientation(self, wait_for_completion=True):
"""Close Blind slats."""
await self.set_orientation(
orientation=Position(position_percent=100),
wait_for_completion=wait_for_completion,
)

Those was OK for me, but maybe this should be made configureable to HA.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Hi!
I installed it again and this is the error I am getting:
2021-10-26 08:52:25 DEBUG (MainThread) [pyvlx] SEND: <FrameStatusRequestRequest session_id="7" node_ids="[7]" status_type="StatusType.REQUEST_CURRENT_POSITION" fpi1="254" fpi2="0"/> 2021-10-26 08:52:25 DEBUG (MainThread) [pyvlx] REC: <FrameStatusRequestConfirmation session_id="7" status="StatusRequestStatus.ACCEPTED"/> 2021-10-26 08:52:25 ERROR (MainThread) [homeassistant] Error doing job: application protocol failed to receive SSL data Traceback (most recent call last): File "/usr/lib/python3.9/asyncio/sslproto.py", line 545, in data_received self._app_protocol.data_received(chunk) File "/srv/homeassistant/lib/python3.9/site-packages/pyvlx/connection.py", line 52, in data_received frame = frame_from_raw(raw) File "/srv/homeassistant/lib/python3.9/site-packages/pyvlx/api/frame_creation.py", line 51, in frame_from_raw frame.from_payload(payload) File "/srv/homeassistant/lib/python3.9/site-packages/pyvlx/api/frames/frame_status_request.py", line 168, in from_payload self.parameter_data.update({NodeParameter(payload[i]): Parameter(payload[i+1:i+3])}) File "/srv/homeassistant/lib/python3.9/site-packages/pyvlx/parameter.py", line 21, in __init__ self.raw = self.from_raw(raw) File "/srv/homeassistant/lib/python3.9/site-packages/pyvlx/parameter.py", line 67, in from_raw raise PyVLXException("parameter::raw_exceed_limit", raw=raw) pyvlx.exception.PyVLXException: <PyVLXException description="parameter::raw_exceed_limit" raw="b'\xd8\x00'"/>

it causes the connection to drop, so it is constantly reconnecting.
If I find a quick fix I'll be back. ;-)

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

I will try making a branch that returns self.from_int(Position.UNKNOWN_VALUE) instead of throwing an exception

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Hi Guys,

Thank you for your replies. They partially answer my question. I'll be a bit clearer and take the scenario of the open venetian blind. When I send an open command to the venitian blind (not the slats, the whole blind) with the remote control, actually pressing the up button, the ventian blind opens fully and sets the slats orientation to 100% (not 50% as I mentionned in my previous post, is was a typo). This leads to having the venetian fully wrapped in its housing (or casing, don't now the correct english word, I mean the allumium cover where the whole mechanism/actuator is placed). If I use Home Assistant and send an open command, the venitan blind will open to position 100% but the slats orientation is set to other values than 100% (in my case I have two venitian blinds, on one the slats orientation is set to 50%, on the other 7%...).

Here some pictures to illustrate:
Venitan Blind opened with remote control (orientation automatically set to 100%)
image

Venitan Blind opened with HA (orientation "automatically" set to 50%)
image

My question was how does the tahoma behave in the same scenario, i.e. if the open command is send, is the orientation also set to 100% like with the remote control.

In this case, it might make sense to update the pyvlx code to send a GW_COMMAND_SEND_REQ with the Main and FP3 Parameters to set the position and orientation to correct values when the open command is send. For now, only the main parameter is sent.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Hi!
It is different with my blinds:
When position is 0 I need to have the orientation at 100% for the slats to be fully enclosed in the box, and therefore invisible. If the position is 50% I see them from inside.

Other topic: I tested returning UNKNOWN instead of throwing an excecption and it seems to work!
https://github.com/dumpfheimer/pyvlx/tree/position_parameter_fixes

I'm not sure this is the best approach, thogh.
Maybe it would be better to add error handling (catching the exception) further up the stack?

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

According to the velux api documents there is a "default" value: 0xD300 maybe we can send that, when position is 0 and the blind itself will decied what is best?
Page 102 in
https://velcdn.azureedge.net/-/media/com/api/klf200/technical%20specification%20for%20klf%20200%20api-ver3-16.pdf

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

Ok, now I got it and yes this need to be adjusted. The blinds are completely closed if position and orientation is 100%. In pyvlx the current orientation will be transmitted as target orientation if the position is changed. What should be considered in case the target position is set to 100% that also the target orientation should be set to 100% in order to completely close the blinds. This is something I have in mind for a long time, but don't find the time for the implementation.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

@dumpfheimer Same thing in my case, HA set the orientation to 50% and I can see partially the venitian blind from inside. On my side, position 0% is fully closed and 100% is fully open but maybe it depends on the venitian blind or the settings in the custom component.
The problem is that your response frame has a parameter vaue of Hex D800 which is above the MAX Parameter defined in parameter.py. Could be interesting to debug and view the whole frame i.e. which parameter it is in the array.
@pawlizio Thanks for the feedback. I might try to implement it in my fork if I find some time. It shouldn't be too complicated.

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

In HA is 100% fully open, but 100% in HA is 0 in pyvlx and reverse versa. That's always confusing.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Yes very confusing. I was always talking about HA UI :-)

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

@Nicks57 it looks like D800 is working for me (D300 is not) would you be willing to test if it retracts all the way with your blind?

https://github.com/dumpfheimer/pyvlx/tree/position_parameter_fixes

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

@dumpfheimer I have no access to the code for now, but why not using the hex value corresponding to 100% orientation in HA UI (i.e. C8 00 or 00 00 which correspond to MAX or MIN parameter)? Then we do not need the DEFAULT parameter.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

I would be fine with that but I thought your blind would be positioned in a way that it shows out of the box 🤔

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

It is exactly like your blind i.e. the blind shows out of the box if orientation is different from 100% which is the case when I open the venetian blind because pyvlx use always target orientation as FP3 parameter when setting position. So I think target orientation should be C8 00 or 00 00 when position is 0.
To go further, if we would like to make it perfect, every time that the position is changed, pyvlx should read the current orientation and set it as target orientation. For now target orientation is the last orientation set by HA but if one change the orientation in the meantime with the remote control, the target orientation is not updated.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Ah i misunderstood that... nevermind, I'll just send 0 =)

every time that the position is changed, pyvlx should read the current orientation and set it as target orientation

What are you trying to accomplish with that? Seems like a lot of overhead for very little benefit to me.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

I agree, not many advantages. This would perfect the harmony between the HA and external control (e.g. remote control).

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Do you mean that HA would overwrite the position set by the remote control?

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

I have to do some tests tonight but let's take an example to illustrate what I understand pyvlx does:

  1. You open Home Assistant and set blind position to 10% and then slats orientation to 20%
  2. Few minutes later, you take the remote control and change the slats orientation to 40%
  3. Few minutes later, you open Home Assistant and set blind position to 20%
    -> The blind set the position to 20% and set the orientation to 20% and not 40% because target_orientation has not been updated since step 1.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

2 things should prevent that:

  1. The heartbeat polls the state so after a few seconds the value should become visible in HA
  2. In my branch I only send the changed value and set the other value to "ignore". So even if the orientation or position was changed in the few seconds between pressing the remote and HA polling the changes the value would not be changed.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

I just tested it and the behavior is like my thoughts (see previous post). The thing is that target_orientation is only updated when you change the orientation in HA, not when you change the orientation with the remote. But it is used in set_position. It will make more sense to use current orientation.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Are you sure you used this branch? https://github.com/dumpfheimer/pyvlx/tree/position_parameter_fixes

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Sorry, I didn't see that you made some changes this afternoon. I tested it again and it works like a charm!

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Sorry, should have mentioned that.
Thanks for testing! Good to hear it's working 🙌

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

I'm really confused. I tested my blinds with pyvlx==0.2.19 just now and without any modification they are completely inserted into their storage box when opened the blinds completely, even if the orientation was 50% before.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Interesting. Are you able to change the orientation when position is 0?

from pyvlx.

pawlizio avatar pawlizio commented on September 3, 2024

@dumpfheimer No, it's not possible when they are inside the box.

from pyvlx.

stephanseitz avatar stephanseitz commented on September 3, 2024

I've been using this modification for more than 20 days now. it still works perfectly and I couldn't find any side effects, mega! Will this PR make it into an official release? What is still to be done?

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Hi!

I too have been using it for quite some time now without any issues.
I still have 2 concerns:

  1. We should make sure the changes do not affect anybody negatively
  2. There was a change in the close orientation position, which benefits the users that have -90/+90 blinds but causes my blind to close only 50% when I press "close"

First of all I dislike this because it is simply not what I need but also this is a change that might affect many other people in an unexpected undesirable way. I have spent dozens of seconds thinking about how to solve this issue but did not come up with a solution yet.

I would propose to take this change out of the PR anyways and make a separate one for that change. That would make me feel much more confident about the PR.

from pyvlx.

Nicks57 avatar Nicks57 commented on September 3, 2024

Hi

@dumpfheimer : can you give more details on point 2? Is that a change I implemented? Can't remember....

Regarding this issue, the idea that come to my mind is to adapt the close fonction (and I assume the open fonction) to behave properly in the both cases based on a parameter value. This parameter could be set manually by the user in the configuration.yml file or automatically from the model of the actuator (readable in KLF200). I thing stephanseitz and myself have Somfy Exterior Venetian blind Type 17 and you should have another one.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

It seems like I have confused something. The change is in the master branch and has been since 2 years - unless I am blamimg the wrong line of code: https://github.com/Julius2342/pyvlx/blame/9a6d1d8988157e546e6f25bb78ccd2bfffa24f7d/pyvlx/opening_device.py#L268

Not sure why this never was an issue for me. But that definately makes things easier if I am more of an exception than the rule.
Also, this more likely affects the "open" function than "close". Hope I'm not missing anything.

BTW, are you okay with me having created the PR #109 ?
I don't want to make you feel like I am stealing your work.

Also, I would be very interested in how you found out what the issue was and how to work around it.

from pyvlx.

dumpfheimer avatar dumpfheimer commented on September 3, 2024

Ah, one more thing. The changes in the Parameter class.
I was receiving strange values from my blind and was able to fix it by not throwing an exception but rather return UNKNOWN for those values. This is a pretty central change that should probably be reviewed by someone more knowledgeable.

I will revert that change and make a seperate PR for that, so we can move on with the blind orientation fix.

from pyvlx.

stephanseitz avatar stephanseitz commented on September 3, 2024

ah cool, thank you very much!

from pyvlx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.