trevorlauder / bn-adjustable-bed Goto Github PK
View Code? Open in Web Editor NEWBN Adjustable Bed Mock API and Socket Interface
License: MIT License
BN Adjustable Bed Mock API and Socket Interface
License: MIT License
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:
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.