Problems with Presence detection Gigaset Beacon BLE

Python and python framework

Moderator: leecollings

Post Reply
Busmeikel
Posts: 23
Joined: Monday 19 December 2016 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Germany - Münsterland
Contact:

Problems with Presence detection Gigaset Beacon BLE

Post by Busmeikel »

Hi there,
got problems with my presence detection over BLE beacons.
Used the "Presence detection (Bluetooth 4.0 Low energy Beacon)" and the "check_beacon_presence.py"-Script.

Error is in the log:
2023-05-27 19:39:01,571 - root - CRITICAL - <Thread(Thread-2210, started 1967125600)> Request Failed HTTPConnectionPool(host='xxx.xxx
.xxx.xx', port=8080): Max retries exceeded with url: /json.htm?type=command&param=updateuservariable&idx=2&vname=Tag-Ulrike&vtype=2&
vvalue=HOME (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x75d32b90>: Failed to establish a new connec
tion: [Errno 101] Network is unreachable',)) - http://xxx.xxx.xxx.xx:8080/json.htm?typ ... x=2&vname=
Tag-Ulrike&vtype=2&vvalue=HOME

Can somebodey explain what to do? Don't understand this error.

Regards
Meikel
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by waltervl »

Are your security settings correct in menu Setup - Settings - security?
- Did you set Allow basic authorisation for Http?
- Did you put your network IP range in the trusted network setting?

If not you have to add your login user and password to the url in the script.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Busmeikel
Posts: 23
Joined: Monday 19 December 2016 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Germany - Münsterland
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by Busmeikel »

Hi Walter,
everything done:
- Allow basic authorisation for Http, YES
- Network IP range in the trusted network setting, YES
- Login user and password to the url in the script, YES

All with no success. In the former versions no problem.

Can anyone help me?

Meikel
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by waltervl »

Your script tries to set a uservariable.
What if you try it from your own system from a browser, copy paste this URL in a browser window (you have to modify SERVER-IP).

Code: Select all

 http://Server-IP:8080/json.htm?type=command&param=updateuservariable&idx=2&vname=Tag-Ulrike&vtype=2&vvalue=HOME
If you have allow basic authorisation set to On then you should not give your UserID and Password.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Busmeikel
Posts: 23
Joined: Monday 19 December 2016 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Germany - Münsterland
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by Busmeikel »

Hi,
that works fine manually, but the nuts or the script shall do this work.

What is wrong? It worked fine for years.

Thanx and regards
Meikel
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by waltervl »

Did you move to docker? As then you have to use the IP of the Domoticz docker container when run from within the container.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Busmeikel
Posts: 23
Joined: Monday 19 December 2016 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Germany - Münsterland
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by Busmeikel »

Hi, no Docker,
it runs on a Pi 3 with nothing else and worked until update to 2023.2.
Batteries in the Gigaset nuts are fresh...
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by waltervl »

Should be something in the security settings.
Is the IP of the server in the trusted network settings? No spaces between various IP adresses?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Busmeikel
Posts: 23
Joined: Monday 19 December 2016 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Germany - Münsterland
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by Busmeikel »

Yes, correct IP-address is in the trusted networks settings.
Busmeikel
Posts: 23
Joined: Monday 19 December 2016 8:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Germany - Münsterland
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by Busmeikel »

Something with the json.htm-thing as you can read into Security-section in the Wiki.
How can I change the Pythonscript to fit the needs????

Thanx
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problems with Presence detection Gigaset Beacon BLE

Post by waltervl »

If the url is working from your browser it should also work from the script. The only thing that can cause the script url to be blocked is the Domoticz security settings.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest