Philips Sensor > Luxaflex (lower with 10 cm if Lux = 10.000) possible?

I have a luxaflex duette shades powerview system and a Philips motion/light sensor. I would like to create a flow which automate the luxaflex in such a way that the sun is always blocked without closing down all the way.

I could accomplish this if i could make the luxaflex to lower itself by 10 cm each time the sensor is hit with direct sunlight. Unfortunately, i can only choose for a certain luxaflex preset.

Anyone with better ideas about this?

I don’t have the device myself but I looked throught the app and it looks like you can set a scene. How many scenes can you have in the solution? Can you name them like up1, up2, up3, down1, down2, down3 and so on? If so you can use two variables and change one each time your sensor indicate it’s hit by the sun and based on that variable set the next scene. And once max scene up or down is reached you flip the other variable to change direction given a set time or day or… whatever :slight_smile: .

Thanks Johan, but where can I find the variable to count the number of times the sensor has been hit with direct sunlight?

Settings - Logic

  • Create a number variable.
  • Create a Yes/No variable (Boolean).
    After this you can use the variables in the flow.

The counting part will have to be done in the flow, first time you reset the variable to 0, for each time after this you add 1 (logic card) and so on. Do tell if you would like to see examples.

This is a bit too advanced for me so I am very interested in an example.

OK. Will make a short guide with a few pictures. I’ll be back :wink:

Not sure what you want to do.

If you want to lower to a certain fixed position in case the sun hits the sensor and up again if not, create 2 scenes (one for up and one for the lowered position) and trigger them based on the sensor reading.

Let me know if that is what you want and if you need help setting that up.

If you want the shade to position to be dependent on the light intensity, so the more light, the lower it goes, it is a bit more complicated.

One way to do this now id to create many scenes (one for each shade position) and trigger them based on the measuremed light intensity via logic boolean variabled. Just like johan suggests. Another option is to use some homeyscript.

But the best way to get it now is to use HTTP cards (there is a homey app for that) and use the PowerView Hub API. Don’t know how technical you are. I could make a guide for it If more people are interested. If you can’t wait to try, send me a PM so I can guide you via Skype.

I am thinking about extending the existing Homey Luxaflex PowerView app so you can set the position with a variable.

I am also thinking about adding controls for up / down, stop and tilt up/down (or in case of top/down shades the upper bar position). Just like the PowerView pebble remote.
This might need 2 homey devices per shade, because homey only supports up / down stop as controls.
In also this opens the possibility to use any homey connected switch to operate the shades directly.

Maybe this is s good place to ask how many people would be interested in such an extension of the app…

1 Like

Thanks Johan, have you got any idea when you’re able to do this?

My idea is to let the sunscreen respond to the Philips motion/light sensor which is in the living room at a 30 cm distance from the sunscreen/window. Each time the sensor is hit with direct light, the screen lowers itself. This way the sun wont shine directly inside the living room. I am fairly technical but no programmer so I think a guide will work.

Great if Rogier can help! (I have not had time to make an example yet)

I think you are right @rogierhofboer, the posibility to control the Luxaflex using a variable would be great!

First you will need a PowerView Hub (v1 or v2) for that. PowerView uses a custom protocol on 2.4Ghz, but it’s not compatible with Wifi or Bluetooth, so its not something Homey can learn.

Then after adding the shade to the hub, create 2 scenes in the smartphone iOS / Android PowerView App for the shade (product). One all up and one in a lowered position you want it get to as the sun hits the sensor.

Then on the Homey install and setup the Homey PowerView app, and create two flows where you trigger the scenes. I don’t have the Philips sensor myself, so I can’t give an exact example.
But is something like this:
Flow 1:
When Light intensity has changed
And Logica Value is greater than: Light intensity value > [pick your value]
Then PowerView: Acivate Scene [Shade to half closed]

Flow 2:
When Light intensity has changed
And Logica Value is less than: Light intensity value < [ pick your value]
Then: PowerView: Activate scene [shade open]

You need to play with the values and closing and opening don’t need to be the same.
So above value “30” is closes, but only opens again if the value drops below “20”
Ofcourse you can add other cards to include for example the time of day.

BTW I’ve created a virtual device which makes it possible to dim a luxaflex powerview shade (0 is fully closed, 100% is fully open) and control it up / down / stop buttons (and I could add tilting the venetian blinds). It takes some time to create a guide on how to set this up, but let me know (or anyone else) is interested.

If some of you are really interested and don’t want to wait if and when I am going to update the app… Let me know, I’ll put together a how-to, tonight ;)`
But I don’t think this functionality is needed for the OP.

Here’s how I use my hue sensor to switch on the lights.

  1. be aware of the position of your hue sensor. If the light on the sensor is influences by the position of the shades you might have shades going up and down a lot
  2. I build in an offset for the lights to go off to prevent that (see below)
  3. you could also cosider to build in a timeout period after moving the shades) ( clouds in front of the sun)

My flow to switch the lights on.
I set a better logic veriable “keuken is donker” that is compared to the measured value:

And to switch the lights off
Using the same variable but with a +4 offset

Be aware!! You will be checking for bright light, I am checking for getting dark, so use smaller then iso greater than (I used)

Thanks! Yes the offset is what I meant the values for open / close (on off) don’t need to be the same. I forgot to explain the reason why you might want that… :blush:

Also no sure if OP (michiel) is on Homey 1.5 or 2.x
I took leap of faith and am on 2.x now. But what I am doing should work on 1.5, I think even better because using tags combined with other data as value is a pain in the ass on 2.x you cannot edit the field freely only delete / add on the end and the edit field is way to small (try putting in some longer json string for example…)

Thanks for the explanation, it is not exactly what i am trying to built. I think i need to make multiple powerview scènes, for every 10 cm a different scène. Then i need to tell homey to close the sunscreen with 10 cm each time the sensor is hit with direct sunlight (>10.000 lux). This way the sensor (and living room) is always in the shade. If my explanation is not clearly enough, I can draw the situation.

@michielvzz It is not clear to me what you want to accomplish or maybe better put, why you would want it to work this way. Please also see my PM.

OK I did indeed not read it that way.
There are multiple ways you can do this. You need to pick what you like best, heres one:
1st create a better logic value “direct sun” that is assigned with the value 10.0000 (you can easily change this value while finetuning your lux setting later)
2nd you need to create a better logic value “shade scene” to keep track of the position of you shades (starts with zero)

I would create multiple “powerviewscene” flows:
“Powerview scene 1”
WHEN “this flow is started”
AND “shade scene” = 1
THEN set to powerview scene 1
“Powerview scene 2”
Copy the flow above anf fill with 2
“Powerview scene 3” etc

Create one trigger flow with you hue (like my screenshots)
WHEN brightness has changed
AND “direct sun” is smaller then
Betterlogic mathjs set value {shade scene = shade scene +1}
start this flow “powerview scene 1”
Start this flow “powerview Scene 2”
…so just add all your flows
You might need to put a 1sec delay on the “start this flow” just to make sure the value is set 1st (homey kicks off all the actions in THEN at the same time…)

So a direct sunlight will trigger all the flows, the value in the AND determines which of the flows will actually get to the THEN

And a last flow “shades up” that set the “shade scene” variable back to zero

Enjoy the building!

I’ve created a tutorial on how to control PowerView shades directly via the hub API.

So you can set the position directly, without the need to create a bunch of scenes.

If I understand correctly you want to lower the shade with another 10 cm every time the sensor is hit with more than 10.000 lux.

While I still don’t get why this would “work” for you (please explain, I am genuinely interested and curious), it is possible now by decreasing the shade position with a certain fixed amount every time you measure > 10.000 lux .

So it starts at the top (position1 = 65535) and moves down with a bit further every time enough light is detected, until the shade is fully closed (position1 = 0).

Be sure to include an “and” to check if decreasing will not make position1 less than 0.

Let me know if you need any help after this with setting up your flows.

I hope this will be available in an update without all these steps. That would be great!

Did not read the tutorial (as I do not have these luxaflex)
But it does make the flow much simpler:
Instead of shade scene create a value shade position and set it to top 65535

Create one trigger flow with you hue (like my screenshots)
WHEN brightness has changed
AND “direct sun” is smaller then
Betterlogic mathjs set value {shade position = shade position -10}
(No clue if 10 is OK)
And in the same then (with a 1ssec delay to make sure the value is set) sent this new value to the luxaflex

PS When building the flow make sure to add papertrails (or another app) to make debugging easier