nathankellenicki / node-poweredup

A Javascript module to interface with LEGO Powered Up components.
https://nathankellenicki.github.io/node-poweredup/
MIT License
477 stars 59 forks source link

RSSI Always -60 #139

Open adamleemiller opened 2 years ago

adamleemiller commented 2 years ago

So, I have moved on from trying to use the module directly in Vue and instead, I have purchased a Raspberry Pi 4 where I will run a NodeJS backend to communicate with the hubs and then a UI (Vue + Quasar) that will interact with the API. I am in the process of doing some initial development and have noticed that the RSSI is always -60, no matter what. It appears to be hard coded in one of the files.

https://github.com/nathankellenicki/node-poweredup/blob/master/src/hubs/basehub.ts#L61

Am I reading this wrong or is this an issue that needs to be fixed?

Thank you.

aileo commented 2 years ago

Hello, The RSSI is initialized to -60 in BaseHub (which is the generic class) but it gets updated in LPF2Hub when the relevant property report is received. Those reports are "required" in the connect method of LPF2Hub

Note that updates to 0 are ignored, I do not know why.