-
Platform information:
- Hardware: CPUArchitecture/RAM/storage
Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 5.10.63-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.1
Uptime = 0 day(s). 0:9:18
CPU Usage = 2.26% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
CPU Load = 1m: 0.31, 5m: 0.42, 15m: 0.33
Memory = Free: 2.99GB (79%), Used: 0.80GB (21%), Total: 3.79GB
Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB
Root = Free: 20.19GB (72%), Used: 7.59GB (28%), Total: 28.99GB
Updates = 0 apt updates available.
Sessions = 1 session(s)
Processes = 134 running processes of 32768 maximum processes - openHAB version: openHAB 3.2.0 - Release Build
- Hardware: CPUArchitecture/RAM/storage
-
Issue of the topic: after restart of openhab or raspberry, some Xiaomi things go offline with the message “Not reachable”. By disable and enable of thing its go online back and work without issues.
In the decent app is this thing permanently accessble. Any Idea, how I can fix this issue?
Many thanks in advance, BR Sergo -
If logs where generated please post these here using code fences:
Sergo, I found a solution for our problem.
This rule checks one critical sensor every 15 minutes whether it is offline. If yes, it enables all deconz based sensors in my system.
rule "EnableAquaraDevices"
// learned from https://community.openhab.org/t/unsupported-http-media-type-after-upgrade-to-3-2/130673
// ..../enable", ...'true' --> enable device
// ..../enable", ...'false' --> disable device
when
Time cron "0 */15 * ? * *" // every 15 minutes, see https://www.freeformatter.com/cron-expression-generator-quartz.html
then
val StatusAquara = getThingStatusInfo("deconz:presencesensor:00212E027726:00158d000xxxxx6c010406").getStatus()
if (StatusAquara.toString != "ONLINE"){
sendHttpPutRequest("http://username:password@192.168.0.163:8080/rest/things/deconz:presencesensor:00212E027726:00158d000xxxxx6c010406/enable", "text/plain", 'true')
....
Thread::sleep(1500)
}
end
Hi Peter, It’s nice to know that I’m not alone with this problem
It cannot be due to the NTP client, as this has been active for years. It would help me if the ‘reconnect’ could be automated somehow (rules ore other possibilities), but haven’t been able to find a way till now
this seems to me to be due to a technical error in openhab, as things can be accessed at any time in the deconz APP…
Sergo, please find a solution in my first posting.
many thanks 'Peter,
somehow it doesn’t want to work by me:
2022-06-20 00:20:54.023 [WARN ] [ore.io.rest.auth.internal.AuthFilter] - Unauthorized API request: Basic authentication with username/password is not allowed
2022-06-20 00:20:54.029 [ERROR] [enhab.core.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
In http://192.168.0.163:8080/settings/services/org.openhab.restauth
you need to enable basic authentication.
That is already enabled
So you need to enter proper username and password for your openhab instance:
sendHttpPutRequest("http://username:password@192.168.0.163:8080/rest/things/deconz:presencesensor:00212E027726:00158d000xxxxx6c010406/enable", "text/plain", 'true')
Hi Peter,
many thanks for screenshot! in my case Basic autthentification was disabled on base of hidden advanced settings…
Now its look fine, the things will be reconnected successfully.
BR, Sergo