vokkim / signalk-ruuvitag-plugin

Signal K plugin to provide RuuviTag data
MIT License
4 stars 8 forks source link

supporting other advertisement-based sensors #22

Closed mhaberler closed 1 year ago

mhaberler commented 2 years ago

Hi,

plugin works fine for me - no issues

however, I have several different sensors around which convey values by manufacturer data in the advertisement, among them the Mopeka Pro level sensor, and Tire Pressure Management sensors

currently I receive those sensors via a Python bleak-based plugin

however, it would be one less moving part if I could extend this plugin to test for, and handle, arbitrary sensors of this type what this would mean is: on BLE advertisement reception, check for Service UUID, sometimes patterns in the MAC address, and sometimes against contents of manufacturer data, then dispatching to the relevant code for the sensor in question

would you be willing to entertain such a patch, and possibly help me in getting this going?

best regards Michael

mhaberler commented 2 years ago

let me reword my question:

could variants of this plugin run within the same sk server instance? (for instance by listening to ads with different manufacturer id)

if so, I'd fork and adapt to the new sensor if not (for instance because only one listener can get a stream of advertisements), then one would need to hook into unhandled advertisements

sorry for the simpleminded question - I am low-fu on nodejs practices and coding

vokkim commented 1 year ago

Please fork and create a new plugin, aiming to keep this simple :)