You need to use the correct channel names in your things config. sensor_magnet1 needs to be sensor_magnet, or if you are using the Aquara version it’s sensor_magnet_aq2 …
Check the docs:
I’m not using manual thing configuration so can’t help with that.
Autodiscovered gateway and sensors look like this, maybe you can adapt those to your manual things config:
xiaomi home bridge does not appear in the inbox. if you manually add the xiaomi home bridge only then the sensors start to appear in the inbox, without xiaomi gateway. but after a while they become offline.
sudo nmap -sU -p9898 localhost
Starting Nmap 6.47 ( http://nmap.org ) at 2018-08-06 11:05 MSK
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00011s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT STATE SERVICE
9898/udp closed unknown
Nmap done: 1 IP address (1 host up) scanned in 0.54 seconds
I had same issue, actually the system was working and I change modem/router than I got “no token received …” error, the problem is about modem/router. And also I set Access Point my rpi3b+ but it did not work. The cheap access points and routers does not capable with openhab and xiaomi home smart things.
In my case the error “No token received from the gateway yet. Unable to encrypt the access key.” appeared after moving the OpenHab server to another part of my network. After some investigation it seems that the Xiaomi Gateway cannot be reached when ‘IGMP Snooping’ is turned on on your routers/switches. After turning this off everything worked fine again.