Hi all,
I hope this is the correct section to place this,
I have a project which I am hoping someone can help me with, I have two electric car jacks which I have installed into my camper to raise and lower the couch to make a double bed.
These work well for this purpose, they are 1.5 tom jacks anf fit my needs perfectly
IMG202201191520161920×1440 295 KB
IMG202201191529471920×1440 244 KB
IMG202201191529431920×1440 229 KB
These jacks have a hand held control, this control has two relays and a seperate up and down button, there is also two reed switches built into this to stop the jacks at the end of the travel.
What I have done is used a NodeMCU V3 and a 4 way solid state relay, I have fixed a wire to each of the toggle switches on the jack PCB and plugged this into one of the relays to activate the switch then set a delay for 120s to allow the unit to complet the travel to the fully extended position.
I have used one relay per switch.
The code I have used is below:
esphome:
name: make-bed
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "removed"
wifi:
ssid: removed
password: removed
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "removedt"
password: "removed"
captive_portal:
output:
- platform: gpio
id: 'IN1'
pin: D7
- platform: gpio
id: 'IN2'
pin: D6
- platform: gpio
id: 'IN3'
pin: D5
- platform: gpio
id: 'IN4'
pin: D1
binary_sensor:
- platform: gpio
pin: D4
name: "Raise Bed Toggle Switch"
on_press:
then:
- switch.toggle: make_bed
- platform: gpio
pin: D3
name: "Lower Bed Toggle Switch"
on_press:
then:
- switch.toggle: lower_bed
switch:
- platform: output
name: "IN_1"
output: 'IN1'
inverted: true
id: INS1
- platform: output
name: "IN_2"
output: 'IN2'
inverted: true
id: INS2
- platform: output
output: 'IN3'
name: "IN_3"
inverted: true
id: INS3
- platform: output
output: 'IN4'
name: "IN_4"
inverted: true
id: INS4
- platform: template
name: "Make Bed"
id: make_bed
turn_on_action:
- then:
- switch.turn_on: INS1
- switch.turn_on: INS2
- delay: 120s
- switch.turn_off: INS1
- switch.turn_off: INS2
- switch.template.publish:
id: make_bed
state: OFF
- platform: template
name: "Lower Bed"
id: lower_bed
turn_on_action:
- then:
- switch.turn_on: INS3
- switch.turn_on: INS4
- delay: 120s
- switch.turn_off: INS3
- switch.turn_off: INS4
- switch.template.publish:
id: make_bed
state: OFF
What I have found is that I toggle one of the sets of relays and nothing happens, I use one of the Binary switches and nothing.
I removed the relays and wired a single toggle switch to both the raise switchs and lower switches of the controls ( so one toggle switch to the two control switches ) and this caused both units to raise but the limit switch failed and the lower toggle switch would not wok.
Hoping someone can help me with how to get this to work, I am trying to have both jacks raise via home assist or a binory switch and have the switch turn off after two minutes.
As far as I can fathom, I have a issue with the switchs on the main jack controllers, these are a 4 prong PCB push button switch and I have soldered a wire onto two of the legs to bridge the switch between the two pins that only conect when you push the button and wired these wires into the relays.
Any help or guidance would be much appreciated.
Cheers in advance
Dave
I hope this is the correct section to place this,
I have a project which I am hoping someone can help me with, I have two electric car jacks which I have installed into my camper to raise and lower the couch to make a double bed.
These work well for this purpose, they are 1.5 tom jacks anf fit my needs perfectly
IMG202201191520161920×1440 295 KB
IMG202201191529471920×1440 244 KB
IMG202201191529431920×1440 229 KB
These jacks have a hand held control, this control has two relays and a seperate up and down button, there is also two reed switches built into this to stop the jacks at the end of the travel.
What I have done is used a NodeMCU V3 and a 4 way solid state relay, I have fixed a wire to each of the toggle switches on the jack PCB and plugged this into one of the relays to activate the switch then set a delay for 120s to allow the unit to complet the travel to the fully extended position.
I have used one relay per switch.
The code I have used is below:
esphome:
name: make-bed
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "removed"
wifi:
ssid: removed
password: removed
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "removedt"
password: "removed"
captive_portal:
output:
- platform: gpio
id: 'IN1'
pin: D7
- platform: gpio
id: 'IN2'
pin: D6
- platform: gpio
id: 'IN3'
pin: D5
- platform: gpio
id: 'IN4'
pin: D1
binary_sensor:
- platform: gpio
pin: D4
name: "Raise Bed Toggle Switch"
on_press:
then:
- switch.toggle: make_bed
- platform: gpio
pin: D3
name: "Lower Bed Toggle Switch"
on_press:
then:
- switch.toggle: lower_bed
switch:
- platform: output
name: "IN_1"
output: 'IN1'
inverted: true
id: INS1
- platform: output
name: "IN_2"
output: 'IN2'
inverted: true
id: INS2
- platform: output
output: 'IN3'
name: "IN_3"
inverted: true
id: INS3
- platform: output
output: 'IN4'
name: "IN_4"
inverted: true
id: INS4
- platform: template
name: "Make Bed"
id: make_bed
turn_on_action:
- then:
- switch.turn_on: INS1
- switch.turn_on: INS2
- delay: 120s
- switch.turn_off: INS1
- switch.turn_off: INS2
- switch.template.publish:
id: make_bed
state: OFF
- platform: template
name: "Lower Bed"
id: lower_bed
turn_on_action:
- then:
- switch.turn_on: INS3
- switch.turn_on: INS4
- delay: 120s
- switch.turn_off: INS3
- switch.turn_off: INS4
- switch.template.publish:
id: make_bed
state: OFF
What I have found is that I toggle one of the sets of relays and nothing happens, I use one of the Binary switches and nothing.
I removed the relays and wired a single toggle switch to both the raise switchs and lower switches of the controls ( so one toggle switch to the two control switches ) and this caused both units to raise but the limit switch failed and the lower toggle switch would not wok.
Hoping someone can help me with how to get this to work, I am trying to have both jacks raise via home assist or a binory switch and have the switch turn off after two minutes.
As far as I can fathom, I have a issue with the switchs on the main jack controllers, these are a 4 prong PCB push button switch and I have soldered a wire onto two of the legs to bridge the switch between the two pins that only conect when you push the button and wired these wires into the relays.
Any help or guidance would be much appreciated.
Cheers in advance
Dave