aelveborn / Wii-Scale

Turns your Wii Balance Board into a scale and presents your weight on a responsive website. Runs Linux and works on your Raspberry Pi.
http://aelveborn.github.io/Wii-Scale/
GNU General Public License v2.0
116 stars 27 forks source link

Node-red Integration #27

Open diabl0w opened 6 years ago

diabl0w commented 6 years ago

It would be amazing if you can add integration into node-red https://nodered.org/docs/creating-nodes/first-node .

I don't know much about python or node.js yet but this seems like it would not take much effort since it's already node.js , and it would add a lot of functionality to user's smarthome setups.

Also support for using pounds would be good for us U.S users.

mo-g commented 6 years ago

I'm trying to workout what inputs and outputs this would give, and what they'd be useful for.

Skipping HA and going straight to Ancilla (seriously, we need a less loaded word for that) I can see the Ancilla ordering less pasta and more kale when your weight starts to climb, but for a hormal current-technology home automation set-up, I can't really conceptualize it.

Can you give examples of what this would be useful for?

mo-g commented 6 years ago

@diabl0w I've been thinking about this since. There were a couple of 'alternative' things along similar lines that I thought of - a data access API that would let you integrate it into other health tracking applications - I'm not sure I'd call that a Smart Home integration, but perhaps it's what you had in mind? I guess NR would work for this, but personally I'd be more inclined towards 'established standards' - LDAP for users (the input data) and providing something simple like a RESTful API for the outward data. I did think of one 'smart home integration' thing that appealed to me though. It would be nice to have an integrate-able front end that could be easily embedded into other web apps. Obviously it's not going on your corporate website, but I've played around with building 'star-trek' style wall panels before, that controlled my apartment lighting, pulled weather data from the Met Office, had RSS feeds and tracked missed calls on a SIP system - of about 3% of which ever got implemented. Being able to embed and style the Wii-Scale frontend would have been great functionality in that app as well - conveniently place the balance board near one of the wall panels (or a Microsoft-style smart bathroom mirror), and you have a permanent install.

diabl0w commented 6 years ago

@mo-g yes, the general idea was that the user should be able to do "something" with the data. unfortunately I no longer use this application and instead modified a console based python script to send the data over "mqtt". that being said, whether it is mqtt, rest API, or another output such as node-red (which popped in my head because of node.js base code), I feel like most users may like to do somwthinf with the data like log it in their own spreadsheets or something similar. For example, my personal script sends the output to my mqtt server, and then I receive that data through mqtt on my phone which then displays the weight on my smart watch.

So, all I have to do is turn the scale on, step on it and a few seconds later my watch lights up with my weight. In addition to this, I also have the weight automatically uploaded to my Google fit account. The possibilities are more flexible when you have some sort of API

mo-g commented 6 years ago

An MQ approach would also make sense, but they're a little more awkward to work with than plain rest interfaces.

I actually like the sound of your implementation a lot - but it has the disadvantage of needing more specific interfaces and configuration to work - you finally found a good use for a smartwatch! :wink: but you need to be using a smartwatch for that to work. For me, this app had the advantage of being accessible from whatever device I'm using - and the only things that are really missing are an API and some automation on connection and disconnection - it would be nice to be able to just kick it and step on without needing to use an interface at all.

diabl0w commented 6 years ago

wanting to do more with the data is inherently going to cause more configuration. I agree in saying that the web interface is easily accessible on any device which is convient and extremely easy to use for any end user... however it's not the most efficient. I think it's pretty safe to assume that someone running an npm installation off of code from github should be tech savvy enough to use, for example a rest API. They can then do something more customizable with the data that would make their data more easily accessible rather than needing to manually navigate to a web page with a device in hand. The API can also make it easier to initiate a weight measurement (here using the smart watch example I would think maybe linking a smart watch button press to send Rest request to initiate measurement) . I think a better and more important approach though would be allowing a measurement to be initiated by hitting the front power button and mearly stepping on the scale the way it is implemented here: https://github.com/chaosbiber/wiiweigh/blob/master/README.md ... the most important part of making that script work is pairing the wiiboard correctly following the instructions at the bottom of the README.

All that being said, I am sure there is some kind of middle ground where data can be obtained by using both either REST or a WebUI

On Tue, Jun 19, 2018, 7:55 PM Gray Marchiori notifications@github.com wrote:

An MQ approach would also make sense, but they're a little more awkward to work with than plain rest interfaces.

I actually like the sound of your implementation a lot - but it has the disadvantage of needing more specific interfaces and configuration to work

  • you finally found a good use for a smartwatch! 😉 but you need to be using a smartwatch for that to work. For me, this app had the advantage of being accessible from whatever device I'm using - and the only things that are really missing are an API and some automation on connection and disconnection - it would be nice to be able to just kick it and step on without needing to use an interface at all.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aelveborn/Wii-Scale/issues/27#issuecomment-398581435, or mute the thread https://github.com/notifications/unsubscribe-auth/APYcMgA5M8zdi7ZuDx2vdM21TeRzeVpTks5t-Y-FgaJpZM4SlTgl .

bsimmo commented 5 years ago

Do you have your Google fit/smartwatch code you describe above anywhere?