i would, the problem are my windows
they are hinged at the top and swing out… they can actually be flipped 180 so the outside comes inside for more easy cleaning, but the lower part of the window now pointing up is not at the same height but 10 cm above the hole in the wall so a curtain that i cant quickly remove will just be in the way
I see, so you need something thin enough to not interfere with the window when it’s flipped around. How much space do you have to work with on either side?
26 mm, but i also need to remove the blind when cleaning. when i do it can’t be there as it will be in the way. So as with the Jysk (if you have those stores near by) blinds all you do to remove them is to remove a “split” and you can lift the blinds off.
i want to have the same toolless way of removing them fast. so white cable to them but hidden by the blind itself when installed, and as i have crimp tool for dupont connectors i would add a male and female at each blind to i can disconnect them.
and for the first room i got power just above the window where the light is mounted
for power i plan to buy 12V and 5V wall adapters and take them out of their housing and mount them in the electronics box, but in a seperate compartment to keep 230V and 12+5V seperate
but i figured a way to get arround the voltage drop
either use thicker wire than what is on the stepper, ie replace the skinny ones and solder in thicker ones
or have each stepper driver with the stepper so the drop from 12V is very minimal, that would even make the number of wires to the blind less
windows are 115 by 114 cm so the amount of fabric on the blind will be limited
my design so far:
but i bet that the reed switch cant be that close to the stepper (magnets inside) but i hope it can
the less i have to experiment the better
this is the blind i will get https://jysk.dk/gardiner/rullegardiner/morklaegningsgardiner/rullegardin-bolga-180x170-moerklaeg-sort#product-video
the mount video shows more of the blind that the picture of it, i bland to cut the platic bit that is inside the bottom of the blind a bit shorter and glue the strongest magnet i can fit to it so it sits flush with the fabric
when the blind comes up it should get close to the reed tube, maybe it will a bit past what you call 0
if that do not work my backup plan is a normal endstop switch used in 3d printers. i that case i will not shorten the plastic bar at the bottom but let it be as wide as the window frame, in that way the bar will activate the switch
Nice, the reed switch can be close to the motor without any issues - I can vouch for that. Though I would recommend putting the reed switch as close as possible or even overlapping with the blind - to guarantee that it triggers.
I see you’re getting a pull chain type blind, you don’t want to use a motor on the chain instead of directly driving the blind?
i had thoughts of that, but that would require a 3rd mounting point for the stepper driving the chain
with the thing i found and modded it can be the same 4 screws and still be taken down in 1-2 mins when cleaning is needed
test printing (3d print) looks good, no slack between parts
btw… how critical is the choice of nodemcu module?
i found this one locally: https://ardustore.dk/produkt/nodemcu-wemos-esp8266-lua
it seems that words and pictures etc are mixed up a lot and its hard to figure out what is what
Hmm, the ones I have are the CP2102 usb chip, the one you linked is using the ch340g usb chip. It looks like the 8266 is the same though, so it shouldn’t be an issue.
will get them tomorrow
since i dont have them build yet, how will they show up in HA ?
I programmed mine through usb using Linux and esphome.
I did pratically the same but didn’t arrive to set and move to a specific position in HA. Any suggestion ? Thanks
esphome:
name: store_puit_de_lumiere
platform: ESP8266
board: d1_mini
on_boot:
priority: -100
then:
- stepper.report_position:
id: my_stepper
position: !lambda "return id(current_position);"
- stepper.report_position:
id: my_stepper2
position: !lambda "return id(current_position);"
- stepper.set_target:
id: my_stepper
target: !lambda "return id(current_position);"
- stepper.set_target:
id: my_stepper2
target: !lambda "return id(current_position);"
- stepper.set_speed:
id: my_stepper
speed: 500 steps/s
- stepper.set_speed:
id: my_stepper2
speed: 500 steps/s
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: IDLE
position: !lambda 'return (float(float(id(my_stepper).current_position) / float(id(open_position))));'
- output.turn_on: builtin_led
esp8266_restore_from_flash: true
globals:
- id: open_position
type: int
initial_value: '11000'
- id: middle_position
type: int
initial_value: '5250'
- id: current_position
type: int
initial_value: '11000'
restore_value: true
output:
- platform: gpio
pin: GPIO2
id: builtin_led
wifi:
ssid: "xxxxxxx"
password: "xxxxxxxx"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Store Puit De Lumiere"
password: "xxxxxxx"
web_server:
port: 80
stepper:
- platform: a4988
id: my_stepper
sleep_pin: D4
step_pin: D2
dir_pin: D1
max_speed: 500 steps/s
acceleration: 500
deceleration: 500
- platform: a4988
id: my_stepper2
sleep_pin: D7
step_pin: D5
dir_pin:
number: D6
inverted: True
max_speed: 500 steps/s
acceleration: 500
deceleration: 500
status_led:
pin: D1
cover:
- platform: template
device_class: shade
name: "Store Puit De Lumiere"
id: store_puit_de_lumiere
open_action:
- stepper.set_speed:
id: my_stepper
speed: 500 steps/s
- stepper.set_speed:
id: my_stepper2
speed: 500 steps/s
- stepper.set_target:
id: my_stepper
target: !lambda "return id(open_position);"
- stepper.set_target:
id: my_stepper2
target: !lambda "return id(open_position);"
- while:
condition:
lambda: |-
return id(store_puit_de_lumiere).position != 1;
then:
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: !lambda |-
return COVER_OPERATION_OPENING;
position: !lambda 'return (float(float(id(my_stepper).current_position) / float(id(open_position))));'
- delay: 2000 ms
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: IDLE
position: !lambda 'return 1;'
- globals.set:
id: current_position
value: !lambda 'return id(open_position);'
- output.turn_on: builtin_led
close_action:
- stepper.set_speed:
id: my_stepper
speed: 500 steps/s
- stepper.set_speed:
id: my_stepper2
speed: 500 steps/s
- stepper.set_target:
id: my_stepper
target: 0
- stepper.set_target:
id: my_stepper2
target: 0
- while:
condition:
lambda: |-
return id(store_puit_de_lumiere).position != 0;
then:
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: !lambda |-
return COVER_OPERATION_CLOSING;
position: !lambda 'return (float(float(id(my_stepper).current_position) / float(id(open_position))));'
- delay: 2000 ms
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: IDLE
position: !lambda 'return 0;'
- globals.set:
id: current_position
value: !lambda 'return 0;'
- output.turn_on: builtin_led
########
position_action:
- stepper.set_speed:
id: my_stepper
speed: 500 steps/s
- stepper.set_speed:
id: my_stepper2
speed: 500 steps/s
- stepper.set_target:
id: my_stepper
target: !lambda "return id(open_position);"
- stepper.set_target:
id: my_stepper2
target: !lambda "return id(open_position);"
- while:
condition:
lambda: |-
return id(store_puit_de_lumiere).position != 1;
then:
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: !lambda |-
return COVER_OPERATION_OPENING;
position: !lambda 'return (float(float(id(my_stepper).current_position) / float(id(open_position))));'
- delay: 2000 ms
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: IDLE
position: !lambda 'return 1;'
- globals.set:
id: current_position
value: !lambda 'return id(open_position);'
- output.turn_on: builtin_led
#######
stop_action:
- stepper.set_target:
id: my_stepper
target: !lambda return id(my_stepper).current_position;
- stepper.set_target:
id: my_stepper2
target: !lambda return id(my_stepper).current_position;
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: IDLE
position: !lambda 'return (float(float(id(my_stepper).current_position) / float(id(open_position))));'
- globals.set:
id: current_position
value: !lambda 'return id(my_stepper).current_position;'
- output.turn_on: builtin_led
has_position: true
api:
services:
- service: control_stepper
variables:
target: int
then:
- stepper.set_target:
id: my_stepper
target: !lambda 'return target;'
- globals.set:
id: current_position
value: !lambda 'return target;'
- output.turn_on: builtin_led
- service: set_speed
variables:
speed: int
then:
- stepper.set_speed:
id: my_stepper
speed: !lambda 'return speed;'
- service: middle
then:
- stepper.set_speed:
id: my_stepper
speed: !lambda |-
if (id(middle_position) >= id(my_stepper).current_position) {
return 500;
} else {
return 500;
}
- stepper.set_target:
id: my_stepper
target: !lambda 'return id(middle_position);'
- while:
condition:
lambda: |-
return id(my_stepper).current_position != id(middle_position);
then:
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: !lambda |-
if(id(middle_position) >= id(my_stepper).current_position) {
return COVER_OPERATION_OPENING;
} else {
return COVER_OPERATION_CLOSING;
}
position: !lambda 'return (float(float(id(my_stepper).current_position) / float(id(open_position))));'
- delay: 2000 ms
- cover.template.publish:
id: store_puit_de_lumiere
current_operation: IDLE
position: !lambda 'return (float(float(id(my_stepper).current_position) / float(id(open_position))));'
- globals.set:
id: current_position
value: !lambda 'return id(middle_position);'
- output.turn_on: builtin_led
sensor:
# - platform: template
# name: "My Blind Position"
# id: current_position
- platform: dht
model: DHT22
pin: D0
temperature:
name: "Skylight Temperature"
humidity:
name: "Skylight Humidity"
update_interval: 1min
#switch:
# - platform: gpio
# name: "Heating Relay"
# pin:
# number: D6
# inverted: yes
# restore_mode: ALWAYS_OFF
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
ota:
password: "xxxx"
i did not ask how you programmed it by how it shows up in HA
It won’t show up unless programmed once initially. And even then, there’s a module that needs to be enabled in HA.
of course it needs to be programmed to show up, that is done with esphome
what is the module that needs to be enabled?
yes and i created one blind there,
i click edit an insert your code, but its not saved
even if i clear that and insert your code again and go back the code is gone
if i edit the file via file editor the code stays
but when i click validate i get this error
INFO Reading configuration /config/esphome/Gardin Kontor.yaml…
ERROR Error while reading config: Invalid YAML syntax:
Error reading file /config/esphome/secrets.yaml: [Errno 2] No such file or directory: ‘/config/esphome/secrets.yaml’
i created an empty file with that name and now it no longer complains about it… but did i do that coorect?
what should mqtt details be?
the code i use is the one you posted 20 nov