-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Battery Attribute #11
Comments
Maybe, I don't know. Don't have any battery powered devices myself. |
@daconrad0 hi, is your unit the s161? the s160 doesn't have a battery? |
Yes
Dennis Conrad
… On Nov 2, 2020, at 5:45 PM, kintaroju ***@***.***> wrote:
@daconrad0 hi, is your unit the s161? the s160 doesn't have a battery?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@daconrad0 question for you, does your s161 report the change in state from dry to wet at all? I've configured my device correctly in the configuration.yaml under binary_sensor and it sees the device, but when I get a cup of water and let it beep for 20-30 seconds, I don't see a change in state in the UI entity, does yours show a change in state in the UI entity? |
@postlund since @daconrad0 indicated that the s161 works with your integration, what would it take for us to help you get the data to poll battery states from the s161? |
@kintaroju We need to find the action used to extract that information. Start by running this command and pasting the result:
Replace and with the information for your device. |
@postlund, i am using hassos to run home assistant, and took me a while to get into the docker session, below is the error I got, when i installed python3: when i tried to install python i had an error installing it. |
@kintaroju Try:
And run again, should work. |
@postlund I get the following error messages below. I know that I can ping the device in question: |
@kintaroju Verify that the IP address is correct. I would expect not since you get a timeout. |
@postlund I've validated the IP, and I've check the AP to ensure that the MAC matches the IP, and I've did a test ping from HassOS to the device and it's all correct. I've even double checked the PIN on the back of the device and what I inputted is correct. I've even reassigned the IP and that didn't help either. Do you have any other ideas to help troubleshoot the issue? BTW i am testing this first on my s160 first before attempting this on the s161 to make sure I have the process down pat. |
Humm, that's strange. Maybe you can try to find an MDNS/zeroconf client and look for the HNAP service? I think it's called |
@postlund thanks for that tidbit about mdns being the culprit. i managed to get the s160 on the same vlan/subnet as the home assistant server and it managed to query the device. I will test the s161 shortly after i move the device. I believe there is something up with opnsense and the mdns-repeater service as it's just a simple option to select 2 interfaces and mdns is "supposed" to work, which doesn't seem to be the case. If you can provide some tips on what I could be missing here that would be appreciated. For the moment for my workaround I've had to create a new SSID to allow the devices to connect to the main network because the silly devices don't support "fast roaming" 802.11r on my ubiquiti APs. |
@postlund I've placed the s161 on the main network at home, and now i get the following error message: |
@kintaroju MDNS isn't really needed as I haven't implemented support for discovery. What I'm interested in is what port is announced for the HNAP service. HNAP is just SOAP over HTTP and normally served over port 80 (unencrypted). The MDNS could reveal if it's another port. So have a look at the service and let me know what it says. |
@postlund for the s161 how abouts would I look for the required port to look for the required data, as this is getting into territory that I haven't done lol. If you have docs or tips I'm all ears. |
@kintaroju TBH I'm not sure what the best tools are, but it will depend on the platform you run on. I usually use iNet Pro on iOS, works pretty well. So I guess we should start by determine which OSes you have at hand? |
@postlund I can spin up whatever OS as I have an ESXi host. For your iNet tool I managed to scan the device and managed to get the bonjour service is based on "device control protocol". When i used Windows, and used the "advanced port scanner" it didn't see any opened ports. |
@postlund i think you'll have a laugh, but I figured out why communication between my vlans and the s160 could never talk, my opnsense router had a IPS rule to block dlink dhnap due to it's nature of being fairly insecure lol. so essentially all port 80 traffic from the IoT device and HA was being blocked. One other thing just have to say, thanks for all your help narrowing down communication issue as it was an eye opener. |
@postlund for the s161 let me know when you want to try to debug the issue, as the unit is not pingable and also goes into power saving mode which causes the unit to disconnect from the network. |
@daconrad0 just checking if you checked your s161 if it does report any change in state to home assistant at all? |
I'm not into Home Assistant, but am very interested in monitoring my D-Link DCH-S160 Water Sensors via a Raspberry Pi. Eventually, I'd like to replace all of the functionality provided by D-Link's apps (i.e., send e-mail and push notifications), as they'll eventually stop supporting these devices entirely, as they do with all of their products. As a result, I've tried executing your dlink.py script on its own as follows:
As you can see from the output below, it does generate a response from the Water Sensor, but also produces several errors:
I've found that adding "await" to the second to last line of your script, solves the problem. The line should read as follows:
I'm very new to python and am running your script in a very different environment than intended, so I get that this may not be appropriate to your application. Just wanted to share, in case someone else was trying to get it to run on its own. And, thanks for doing the heavy lifting on the HNAP/SOAP portion. I've been trying for weeks to get it to work in a bash script. |
Is it possible to get the battery state so I can change the batteries as needed. I currently only see the following:
The text was updated successfully, but these errors were encountered: