My advice is that you and your husband sit down together and have a long talk about respect and how to discipline your stepdaughter. I have a 12-year-old stepdaughter, and my husband and I have had MANY, MANY talks about her. She is very disrespectful at times to me and her father. But my husband and I have agreed that if I discipline her or say something to her that he doesn't agree with, he will not say anything to "correct" me in front of her. He will take me to the side later on (just the two of us) and talk to me about what he didn't like that I said or did and then we will come to a compromise on how to handle the situation better in the future. The same goes for him. If I don't like something he says or does, I talk to him about it later on without my stepdaughter around. I don't know if your husband does this or not, but, if he "corrects" you in front of your stepdaughter about how you need to just leave her alone or how you shouldn't discipline her, etc., then (in your stepdaughter's eyes) that takes away your authority as a parent and as an authority figure. She will think that she only has to "listen" to her father when he disciplines her, or she will try to play you and your husband against each other. Even though my authority has been well-known for some time now, my stepdaughter still tries to play my husband and me against each other. I guess all kids try to do that at one point or another. But you and your husband definitely need to be on the same page together. You need to know that you have his support in helping to raise his daughter. I think that will help a lot.
As far as her treating you like a second-class citizen in your own home, I totally understand that part of it. My stepdaughter goes from totally hating me to totally loving me. When she is loving, she is a very loving child and would do anything for you. But when she is hateful, she is very hateful and looks at me like she could stab me in the heart. We have great times, but we also have awful times. I have learned with my stepdaughter that she really needs someone to listen to her. She is at that age where she has tons of different things going through her mind at one time. And she has a ton of issues (ADHD, ODD, Borderline Personality Disorder, plus her mother has TONS of issues herself). For the last several months now, she has been wanting to talk to me or her dad a lot. And I have noticed that everytime after we have one of our mother-daughter discussions, she is a lot more responsive towards me and is a lot more respectful of me.
I think you should try to talk to your stepdaughter and basically let her know that you love her and want what's best for her. Tell her that if she ever, ever needs to talk to you about something, you are here for her and that you will listen without prejudice and without giving her advice or getting mad. But also let her know that you understand that she is 17 years old and needs her space. Tell her that you will give her her space but that she needs to respect you also by giving you some respect as her stepmother. And then just leave the lines open. Unless she blatantly disrespects you or causes any trouble, I would try to just leave her alone and let her come around to you. She is 17 years old so she is almost grown. You can't really make her love you, but you can make her either give you the respect you deserve as her stepmother or not say anything to you at all. Just think, if she decides to just leave you alone, at least she will be out on her own before long. And, once she gets older and has a family of her own, I bet she will come back to you and tell you that she was sorry and she knows that you love her and was trying to do what was best for her.
I hope this doesn't sound like a bunch of ramble. I hope you understand what I am trying to say. I understand how hard it must be to raise a child first off that is not your own and second off that you didn't have a part in raising until she was 12. I have always heard that the first 6 years of a child's life are the building blocks for their personality. It is really hard to come into a child's life when they are 12 years old and try to step into the stepmother/mother role. Believe me I know! My stepdaughter was just barely 7 years old when my husband got custody of her. It has been a long, hard road to travel.
I hope my advice helps you.
K. F.