-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tr064] Add Wifi Signal Strength & Wifi Speed channels to LAN Subdevice #10959
Conversation
Signed-off-by: Tobias Löbermann <tobiloeb@gmail.com>
Can you use system.signal-strength channel? See link below and other bindings which are now implementing this to abstract the strength. https://www.openhab.org/docs/developer/bindings/thing-xml.html#system-state-channel-types |
@Skinah Thanks for your suggestion. If I got it right, the system.signal-strength channel describes the signal-strength of its thing. In my case the signal strength is not the signal strength of the subdevice (LANDevice) itself. The LANDevice (subdevice) includes all Lan & Wifi information and configuration from the AccessPoint (bridge). And it can give you information (e.g. signal strength and speed) for a given MAC address connected to the AccessPoint as well. I think the system.signal-strength wouldn't fit in this scenario, right? |
Yes I believe |
I have read the documentation for the system channels, but didn't get everything from the concept and how to implement it in my case. For my usecase (and hopefully for some more people) it would be nice and enough to let it as is. 👍 :) |
If there's a comprehension problem, don't hesitate to ask! It feels wrong to make a decision if there's some uncertainty. |
Yeah I got your point. For me there are two things: Thanks :) |
In most cases you don't need high resolution for signal strengths. And in most cases you don't have the accuracy, too. That's why most wifi icons have five states or less. Yes, it's hard to map the original signal strength to the 0-4 scale, but if you don't do it, you leave it up to the user. I think you have better insights to do that, than the normal user. To change it to |
If you need an example to follow, look at the opensprinkler binding as I made the change a week or two ago and it is merged. |
Thanks for the explanation, I will take a look at your changes and adjust the channel type. Your points sounds good to me and make sense. I will set this PR to WIP and go on when I am ready. |
Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
@fwolter Here is my update: I have tested my changes and its woring fine. Is it right that the type is still "Number:Dimensionless"? Openhab is not showing the signalStrength Icon automatically? |
Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -119,6 +119,11 @@ The call-types are the same as provided by the FritzBox, i.e. `1` (inbound), `2` | |||
| `wifi5GHzEnable` | `Switch` | | Enable/Disable the 5.0 GHz WiFi device. | | |||
| `wifiGuestEnable` | `Switch` | | Enable/Disable the guest WiFi. | | |||
| `macOnline` | `Switch` | x | Online status of the device with the given MAC | | |||
| `macIP` | `String` | x | IP of the device with the given MAC | | |||
| `macSignalStrength1` | `Number:Dimensionless` | x | Wifi Signal Strength of the device with the given MAC. This is set in case the Device is connected to 2.4Ghz | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the system channel type is of type Number
, this needs to be Number
, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right, I missed to update the readme documentation. The type for the channels is already of type Number.
Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ce (openhab#10959) * Add channels to tr064 Signed-off-by: Tobias Löbermann <tobiloeb@gmail.com> * Set typeId for macSignalStrength channels Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * adjust README with correct channel names. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Add JavaDoc and separate post processors. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Use UNDEF as default for signal-strength Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Update README.md documentation Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
…ce (openhab#10959) * Add channels to tr064 Signed-off-by: Tobias Löbermann <tobiloeb@gmail.com> * Set typeId for macSignalStrength channels Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * adjust README with correct channel names. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Add JavaDoc and separate post processors. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Use UNDEF as default for signal-strength Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Update README.md documentation Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
…ce (openhab#10959) * Add channels to tr064 Signed-off-by: Tobias Löbermann <tobiloeb@gmail.com> * Set typeId for macSignalStrength channels Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * adjust README with correct channel names. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Add JavaDoc and separate post processors. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Use UNDEF as default for signal-strength Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Update README.md documentation Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> Signed-off-by: Dave J Schoepel <dave@theschoepels.com>
…ce (openhab#10959) * Add channels to tr064 Signed-off-by: Tobias Löbermann <tobiloeb@gmail.com> * Set typeId for macSignalStrength channels Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * adjust README with correct channel names. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Add JavaDoc and separate post processors. Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Use UNDEF as default for signal-strength Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com> * Update README.md documentation Signed-off-by: Tobias Loebermann <tobiloeb@gmail.com>
This PR adds three addional channels to the tr064 binding.
First: The IP Address of all given MAC Address (entered in MacOnline list configuration)
Second: The Wifi Signal Strength of all given MAC Address (entered in MacOnline list configuration)
Third: The Wifi Speed of all given MAC Address (3ntered in MacOnline list configuration)
The main goal of this additional channels is to determine the position of a device inside the house. The Wifi Signal Strength or Wifi Speed can be used to check where a device is currently located.
The WLAN Configuration of tr064 api offers multiple configurations ( 1,2,3 ) depending of the access points 2.4Ghz 5Ghz. So there are two channels for Signal Strength and Wifi Speed. One for the 2.4Ghz and one for the 5Ghz access point. See documentation here: https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/wlanconfigSCPD.pdf
I can't upload the .jar file with my changes. Where can I upload it? Otherwise just build the tr064 bundle and copy it to the addons folder in openhab. After restart the changes should appear.
If you have any further questions, let me know. 😃