Giter Club home page Giter Club logo

bn-adjustable-bed's People

Contributors

dependabot[bot] avatar pre-commit-ci[bot] avatar trevorlauder avatar

bn-adjustable-bed's Issues

Requesting help with reengineering your program to work with a Member's Mark bed

Hello Trevor,

I've recently bought an adjustable bed base branded as Member's Mark (Sam's Club store brand) which I suspect is a rebranded version of the Blissful Nights bed you have. I was trying to figure out if it had a local API that I could use with the Home Assistant app and while Googling I was surprised to find that you had already completed a program that is mostly compatible and functional with my bed. I'm having a few issues so I thought I would reach out with some questions if you have time.

So far I have the four docker containers running and I can view the pages for the Mobile App API and the Bed Controller API. I already had my bed connected to my wifi and the AWS server so as soon as I hijacked the DNS queries to api2.xlink.cn and cm2.xlink.cn to point to my local server I could immediately see the bed calling out for a socket connection. But it continuously closes and reopens the connection and makes another request which brings me to my first question:

  1. How did you go about intercepting the communications between the bed, mobile app, and AWS server? In your bed_socket.yml file you make note of an authorize_code being sent from the bed but I'm not seeing that request using tcpdump. Though I'm not very experienced with using tcpdump so I could be using the wrong options to get the info I need. From your file I gather that your BN bed is sending out auth code 230000001a03245e6bb40010(.*)00003c, whereas my MM bed is sending code 230000001a03442806db00103165303362656332383861656638343600003c which is slightly different so I'm guessing the response 28000000020000 may also be different? While using tcpdump I also see CONNECT requests from the bed to cm2.xlink.cn:80 which get a 400 Bad Request response because they're hitting a non-existent address on my webserver. I'm not sure what to make of that because only port 23778 is open for the socket container that cm2.xlink.cn is forwarded to.

The odd thing is that even though the socket connection isn't stable, if I send curl commands to the bed sometimes it will respond correctly and move and sometimes I get a "Socket Closed While Trying to Send" response. So the bed and Bed Controller API are communicating somehow.

  1. How did you bypass authentication for the mobile app? It seems the Member's Mark app communicates securely on port 443, which I would expect the Ronin app to use as well if it tries to reach out to AWS servers. When I try a gibberish username/password or the one I created that was working correctly the MM app just says "log in failure" and stays on the login screen. I don't really intend to use the mobile app so this is more of a curiosity than a problem I want to solve.

  2. Lastly, if a stable socket connection could be made, would your program be capable of controlling two beds? I have a split king which is really just two twin XL beds bolted together so they each have a wifi module. If not, I'm assuming I can run I two instances with different IP's and figure out how to change one of the socket port numbers somehow.

Thanks for your help (if you don't have time I completely understand). Let me know if you need any more information.
Brett

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.