Intergrating A Tv Bed Lift Mechanism

project_accessible

(Kyle ) #1

Hello All

INTRO:
Id just like to point out from word go that im not a great coder or electrician but i know enough basics to follow a thread and know where we can take this, im looking for support and ideas and even guidance from the community to fix an issue im personally looking to fix and know many others carry a great interest in also . . . so any input would be greatly appreciated.

THE ISSUE:
Getting SmartThings to operate my Tv Beds Lift Mechanism
(Currently been operated by an RF Up & Down remote control)

I have a Kaydian Maximus Tv Bed which comes with an RF remote control to lift and lower a television out of a foot-board of the bed, the RF remote send a momentary style signal to the tv beds brain unit which then know to send the lift motor to its UP state or with another button send it back down as pictured below:

i need to find a way to get a momentary signal to this remotes UP & DOWN buttons and have that show within my SmartThings app within a tile, weather that be one tile for up and one for down or one tile that when pressed sends it up and pressed again sends it down ive yet to see whats possible.

ATTEMPT 1 - USING HARMONY HOME & IR RECEIVER:

as you can see pictured below i had a play with the remote and took it to bits and realized i could do a work around for the LOGITECH ULTIMATE HARMONY HOME to control this using a Velleman 162 IR Receiver Dual Relay System . . . which works on and off as it wishes and isn’t to reliable.

all this does is send a one of two signals from my Harmony via IR to the Velleman receiver unit to momentary activate relay one or relay two which is wired to my RF remote to emulate a button press and finalize the last section of the process in sending the signal to the actual bed unit

THE PLAN TO IMPROVE:

i now want a way to replace the Velleman IR Receiver Dual Relay Unit with a ZIGBEE / ZWAVE Dual Relay module that will effectively eliminate the need for IR waves and unreliability and can be seen from within my SmartThings App . . . i had read and seen on the ST App that i could maybe use a " Linear FS20Z-1 " to do this, however would this mean coding my own SmartApp (a skill i don’t poses) or would it work plug and play with it been a known and integrated dual relay module for smartthings, it also opens the questions as to weather it can emulate a Momentary style button press as a pose to a standard ON / OFF button press.

Ideally i would like it to show as follows:

When Pressing tile in, it highlights green and read ON or UP and sends a momentary style button press to relay number 1 to close the circuit on my UP button on the RF remote.

When the tile pressed again, it will un-highlight back to grey and read OFF or DOWN and send a momentary style button press to relay number 2 to close the circuit on my DOWN button for the RF Remote.

as shown here:

can anybody help / advise / point me int he right direction, input or discuss the possibilities and ways of doing this . . . the easier the better however im willing to learn and create to make this work smoothly and correctly as then i can have other things around my room activate or change in regards to the tv beds state for instance " all lighting dims when tv lifts from the bed " or when tv bed using harmony turn on television and dim lighting and close blinds etc (blinds been reliant on the fact that COMFEE soon pull through with their smart retro fit solution, which should work with SmartThings according to them)

Thanks for your help guys, its much appreciated.

Kyle

REFERENCE MATERIAL FOR SIMILAR PROJECTS AND USEFUL LINKS:


Projector Screen Switch?
Projector Screen - Which ones will work?
(Dan) #2

@AutomateEverything

Kyle,

Do you know what RF frequency the current remote control uses? I added support to my Arduino ST_Anything project to support an RCSwitch which may be exactly what you’re looking for. Take a look at
Announcing the “ST_Anything” Arduino/ThingShield Project. Basically you buy a very inexpensive RF Receiver to capture the RF codes transmitted by the original remote. Then you use a corresponding RF Transmitter to send the RF command specific to the function you want. You also need the ST ThingShield to communicate with your hub.

Hope this helps. I think it is a much cleaner solution as the original remote does not need to be hacked at all. Turning the RCSwitch “On” simply sends the corresponding RF command, and the same happens for an “Off” command (with a different RF command of course.)

Here’s a link to a 433Mhz version of the transmitter/receiver pair. http://amzn.com/B00M2CUALS

Dan


(Kyle ) #3

@ogiewon You my friend . . . are a legend . . . i shall look into this right away.

What skill level would you say this would require to setup, is this where i need to find myself a friend who is a dab hand at coding or is it relatively easy to follow and work out :smile:

kyle


Monster TV lift
(Mike Maxwell) #4

Personally I would ditch the entire rf remote nonsense, and go after controlling the motors directly via a arduino thingShield and your relay board. In the end this could be less dinking around.
There are existing community arduino garage door sketches and smart apps that could be adapted for your lift.
Inspiration here:


(Kyle ) #5

@Mike_Maxwell - thanks a lot for getting in touch, i love what you have done . . . its basically perfect to what i need except i need to tap into an existing setup that came with my bed.

As stated on the original post the only reason ive opted for the RF remote hack option at first is, i know if them buttons get a momentary signal they will tell the brain to send the tv lift up or down, and more importantly that knows exactly how far to send the motor up or down, it also knows when its got to the top or bottom etc.

for me to do it your way id presume id need a lot of coding knowledge to let an arduino board know just how far the tv should be lifted or dropped etc etc, im very novice in the hacking and coding department, im more of an ideas guys and make things look pretty (been a graphic designer) so im looking for the easiest options, however as stated above im happy to learn new skills with guidance as i do want the best results possible and to become a bit more hack savy.

the way yours works and appears in the app seems absolutely PERFECT to what i need . . . do you have more info on how you achieved this etc etc . . .

Thanks,

Kyle


(Mike Maxwell) #6

Lift mechanisms in general are not that sophisticated electro mechanically.
The limit controls are micro switches, sometimes these are already embedded within the lift motor.
The linear actuator (as the lift motor is called), is an internally threaded tube, a threaded rod fits into the tube, one end of which is connected to a DC motor, changing the direction of the motor extends/retracts the tube.
Generally the lift extends until the limit switch cuts power to the motor, reversing the motor then retracts the tube until the other switch cuts power.
Generally TV lifts only have two heights, down and up.
So at the basic level, running the motors is pretty straight forward since you don’t have to worry about stopping the motor since that’s already built in.
My setup is a little more complicated as it has three positions.

In any case if you can post the schematic for your TV lift, I can have a look and let you know if it’s feasible to bypass the RF controls.


(Kyle ) #7

@Mike_Maxwell - Hiya mike, thanks again for the quick response

Id thought about this before, but with the RF remote i can stop it mid way up, send it half way up then click down and it will go down, it doesn’t seem to work in a conventional fashion as it has gear wheels and a geared arm which it seems to rise up and down, hence why i feel the unit that controlled it all may hold the key to how far up and down it travels (however i may or most likely will be wrong)

this is the only paperwork and diagrams i can find for the bed online after months of looking . . . document three covers the motor and lift mechanism https://www.dropbox.com/sh/3s041q8h45kkcco/AAB0Fsj2Lvf-sevySuTXpcaOa

they also have this video and ones on linked channel, that is about it for documentation and support https://vimeo.com/92240432

the closest thing i can find online visually is:
http://www.standsandmounts.com/TVLiftCabinetResidentialGradeLift-Uplift2700R.aspx

I look forward to your following response

kyle


(Kyle ) #8

its not identical but very very similar to this:
https://vimeo.com/76802897


(Mike Maxwell) #9

No schematic, however it shows a wired remote, do you have this? If so you could open up that badboy and replace it with relay controls, this could also achieve the control you want.


(Kyle ) #10

@Mike_Maxwell - i do however here is another issue . . . the wired remote isn’t a momentary like the RF remote . . . it has to be held down for the duration of the rising or lowering . . . (its chucked under my bed for this reason - real pain in the arse) . . . now do you see why i opted to hack the remote and not the wired remote hahaha — its never simple aye.


(Dan) #11

Kyle,

As to the difficulty level, it really depends on your experience. I believe most of the “heavy lifting” is already done. I am happy to assist you in using my ST_Anything library and ST_Anything_RCSwitch.ino example sketch. What I really have a harder time helping with is the specifics of the RF Arduino code. I simply used the RCSwitch library when I was helping @keithcroshaw to try and integrate some RF devices into SmartThings. Keith supplied me with the RF codes he successfully “snooped” to put into my Arduino sketch. I believed he used a sample application to capture these RF code sequences using one of the inexpensive RF receivers for the Arduino. I designed the ST_RCSwitch library class to allow users to supply whatever RF code they want for the “on” command as well as for the “off” command. These codes are entered into the Arduino Sketch (.ino file) not in the library. I am trying to keep the library calls as generic and reusable as possible.

Here is the line of code which would have to be changed in the ST_Anything_RCSwitch.ino sketch based on your specific Up/On and Down/Off RF codes:

 static st::EX_RCSwitch executor1(F("rcswitch1"), PIN_RCSWITCH, 35754004, 26, 18976788, 26); 

And here is what each field in the above call means (from the header of the EX_RCSwitch.cpp file):

st::EX_RCSwitch() constructor requires the following arguments
 - String &name - REQUIRED - the name of the object - must match the Groovy ST_Anything DeviceType tile name
 - byte transmitterPin - REQUIRED - the Arduino Pinused as a digital output for the RCSwitch object's transmitter pin
 - unsigned long onCode - REQUIRED - the "on" code for RCSwitch send() command
 - unsigned int onLength - REQUIRED - the "on" code's length for RCSwitch send() command
- unsigned long offCode - REQUIRED - the "off" code for RCSwitch send() command
- unsigned int offLength - REQUIRED - the "off" code's length for RCSwitch send() command
- bool startingState - OPTIONAL - the value desired for the initial state of the switch.  LOW = "off", HIGH = "on"

If you can get the TV motor moving using just an Arduino UNO R3 and the RF Transmitter, I can help you get it seamlessly incorporated into SmartThings (assuming you can get a hold of a ThingShield, as they’ve been out of stock for a while. More due in within a week or so, according to @mager )

Before you start buying components, the big question is whether or not your RF remote control can be emulated by one of the inexpensive RF Tx/Rx module pairs. You’ll first need to know what frequency your remote control operates at. I have seen 433Mhz as well as 315Mhz Rceiver/Transmitter pairs which can be had for under $10 on Amazon.com. Even cheaper on ebay if you have time to wait for delivery from China (usually about 10-14 days.)

If your remote control operates at a different RF frequency, I am not sure what your options are.

Note: If you can get the RF Transmitter attached to an Arduino working, I may have another incredibly inexpensive way for you to create the entire solution for under ~$30. You could tear apart a $15 Cree lightbulb to get its Zigbee board, buy a $5 Arduino Nano on Ebay, and a $5 RF Tx/Rx pair of modules from ebay.

Take a look at my example of a super inexpensive way of using the Cree Bulb’s Zigbee board to allow one-way ST Integration at:

Since you’re just sending data to the TV Motor Controller (i.e. simulating a remote control) there is really no reason for any two-way feedback back to the ST Cloud. The Cree Bulb Arduino code that I wrote would permit you to send up to 100 unique RF commands. By setting the DIM Level in the ST App, the Zigbee board sends a corresponding PWM signal to the Arduino, which in turn is deciphered into the dim level and executes corresponding code. You could assign DIm Level 1 to your UP command and Dim Level 2 to your down command.

Just another idea! More food for thought!

Also, you could use my Cree bulb hack/solution to fire a relay if desired, instead of sending RF signals. The Arduino would simply see the Dim Level change to “1” and then turn on a digital output (which is connected to a relay) for a pre-determined amount of time or until a digital input changes state (i.e. a limit switch.) When the Dim Level changed to a “2”, a different relay could be fired. If the Dim Level was set to “0” all motion could be stopped by turning off both relays.

You’ve got a fun project! Enjoy it!

Dan


(Kyle ) #12

@ogiewon - sounds ideal do these options . . .

You guys make this stuff sound so easy, im an ideas man and need to learn to be a code literate man also haha . . . i grasp what your saying but lack the skill to implement it . . . so the hunt goes out for a local code genius and together we can make some real magic happen as ive got many more great ideas up my sleeve as @mager knows :wink:

@ogiewon as for remote frequency look in the above dropbox link max asked about, and you will see three documents, once has information about programming the RF signal using pin switches . . . it can either be generic or modified, feel free to have a look and let me know your thoughts, if you think its achievable ill work through the shopping list and see what we can get going.

PS: does anyone know a " Leeds / Yorkshire / UK " based hack genius on here who may be interested in collaborations or paid work with me on these ace projects . . .


(Dan) #13

I did look through the PDF files in the dropbox, and did see the section you mentioned. However, I do not see anything specific about the remote control’s frequency. Here in the US there would be a FCC stamp/label somewhere on the remote control itself with some sort of FCC ID, I believe. This could then be used to look up more information about the remote since it is an RF device. Although - due to the very low power output, perhaps it would actually bypass the FCC? I am really not sure.

Perhaps somewhere in the remote control’s circuit board you could identify the RF transmitter chip? Maybe the chip has an ID on it we could use to look it up to see what RF frequency it uses?

I see that the remote has DIP switches on it. Not sure if that complicates matters or not. What we are trying build is basically a “learning RF remote control” using an Arduino. We want to teach the Arduino the UP and Down RF codes, so that we can replay them on demand.


(Mike Maxwell) #14

I believe there’s an ST EU developers web meeting in the works, that would be a great way to find a local hacker…


(Andrew Mager) #15

Come one, come all:


(Simon) #16

Hi there I’m new to the site and I’ve just had a new bed installed it’s a Julian Bowen optika tv bed I love the bed but the up and down button that was supplied with the bed won’t operate the tv lift mechanism I have to do it manually by pressing the button on the motor could anyone help and also is there an app available I can by pass the remote control provided and lift the mechanism from my phone many thanks