[SOLVED] Deactivate Network Binding Device by Switch

Hi,

I control some devices with the help of the presence control, which I implemented via the network binding. But by the fact that the smartphones constantly change their state (online, offline), it is impossible to ensure that a presence is reliably detected.

That’s why I use a dash button, which I press when I leave the house. This detects the absence. The presence should then be automatically detected by the network binding.

Once the presence has been detected, the network binding for the corresponding device should be deactivated in order not to increase the battery consumption of the device. By pressing the Dashbutton, the network binding should be activated again.

I would also be satisfied if the refresh time could be set to a very high value.

I hope for good tip for a possible implementation.

Many thanks

I fail to understand the purpose of it. Is the battery consumption really that badly affected by a network ping?
You can always disable the relevant things via the REST api.

1 Like

Thanks a lot @vzorglub

Yes, I noticed a significantly higher power consumption with one android device. The iPhones were just fine. Besides, I am pretty annoyed by the constant changing of the states, although the devices are in the Wlan. And the deactivation by the REST api solves the problem for me.

That’s my easy solution:

sendHttpPutRequest("http://localhost:8080/rest/things/network%3Apingdevice%3ADEVICEID/enable", "application/json", "false")
1 Like