Open 111lisu opened 12 months ago
Looks like the UDP packets on port 6199 are not being received by docker container. When it receives a packet from the BeSmart device it will print something like:
[2023-12-04 18:18:33,639 udpserver.py->run():420] INFO: From ('10.42.1.1', 55333) 264 bytes : FA D4 FC 00 43 ...
You may need to use a packet sniffer (wireshark/tcpdump etc) to work out why the traffic is not getting redirected.
Thanks for the tip, I'll check the network route
Home Assistant URL: http://homeassistant.local:8123
Observer URL: http://homeassistant.local:4357
[core-ssh ~]$
[core-ssh ~]$ nc -v -u -z -w 3 192.168.182.72 6199
192.168.182.72 (192.168.182.72:6199) open
[core-ssh ~]$
lisu@lisu:~$ nslookup api.besmart-home.com 192.168.8.100
Server: 192.168.8.100
Address: 192.168.8.100#53
Non-authoritative answer:
Name: api.besmart-home.com
Address: 192.168.182.72
lisu@lisu:~$ nslookup www.cloudwarm.com 192.168.8.100
Server: 192.168.8.100
Address: 192.168.8.100#53
Non-authoritative answer:
Name: www.cloudwarm.com
Address: 192.168.182.72
Everything seems to be OK with the connection, I'll sniff it on the spot, maybe another port?
It took a while because the VPN server was working, but it connected.
# curl http://192.168.182.72/api/v1.0/devices
[597171176]
# curl http://192.168.182.72/api/v1.0/devices/597171176/rooms
[79556623, 35458646, 747586758, 3936447694]
# curl http://192.168.182.72/api/v1.0/devices/597171176/rooms/79556623
{"days": {"0": [17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, 34, 34, 34, 18, 17, 17, 17, 17, 17, 17, 17], "1": [17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, 34, 34, 34, 18, 17, 17, 17, 17, 17, 17, 17], "2": [17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, 34, 34, 34, 18, 17, 17, 17, 17, 17, 17, 17], "4": [17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, 34, 34, 34, 18, 17, 17, 17, 17, 17, 17, 17], "3": [17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, 34, 34, 34, 18, 17, 17, 17, 17, 17, 17, 17], "5": [17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, 34, 34, 34, 18, 17, 17, 17, 17, 17, 17, 17], "6": [17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 33, 34, 34, 34, 18, 17, 17, 17, 17, 17, 17, 17]}, "heating": 0, "temp": 206, "settemp": 30, "t3": 196, "t2": 180, "t1": 70, "maxsetp": 400, "minsetp": 400, "mode": 5, "tempcurve": 8, "heatingsetp": 5, "sensorinfluence": 5, "units": 0, "advance": 0, "boost": 0, "cmdissued": 0, "winter": 1, "lastseen": 1701946156, "fakeboost": 0}
Great.
Note: You can get some of the OpenTherm parameters from the devices/597171176 endpoint.
This is a cool server, thanks for your work. You will tell us how to do it on/off via curl?
# curl http://192.168.182.72/api/v1.0/devices/597171176/rooms/3936447694/t3 -H "Content-Type: application/json" -X PUT -d 195
{"message": "OK"}`
# curl http://192.168.182.72/api/v1.0/devices/597171176/rooms/3936447694/heating -H "Content-Type: application/json" -X PUT -d 1
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
# curl http://192.168.182.72/api/v1.0/devices/597171176/rooms/3936447694/heating -H "Content-Type: application/json" -X PUT -d 0
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
#
The heating
endpoint is readonly. You should just need to increase T3 0.5degC (assuming default hysteresis settings) above the current room temperature for the heating to start.
Note:
mode
endpoint, for example to change to PARTY:
curl http://192.168.182.72/api/v1.0/devices/597171176/rooms/3936447694/mode -H "Content-Type: application/json" -X PUT -d 3
advance
endpoint, for example:
curl http://192.168.182.72/api/v1.0/devices/597171176/rooms/3936447694/advance -H "Content-Type: application/json" -X PUT -d 1
curl http://192.168.182.72/api/v1.0/devices/597171176/rooms/3936447694/fakeboost -H "Content-Type: application/json" -X PUT -d 1
Thanks for the information, the driver can still be used via wireguard, etc.
Yesterday the controller disconnected. the red LED was on. My friend connected again. The idea controller connected again. However, it does not display the ID. Have you had this problem with your controller?
lastseen
from curl http://192.168.182.72/api/v1.0/devices/597171176
will tell you the last time the server received a message from the BeSmart device. It looks like the traffic is no longer reaching the server.
I have had to restart my BeSmart device a few times because it loses Wifi. However, it has been very reliable the last few months.
The connection UDP should be working fine. I don't know if the driver sends keepalive? We will try to connect it again several times.
[core-ssh ~]$ curl http://192.168.182.72/api/v1.0/devices/597171176/rooms
[]
After redirecting the api.besmart-home.com: connection to docker (docker run -it -e LONGITUDE=49.xxx -e LATITUDE=22.xxx -p 80:80 -p 6199:6199/udp besim:latest) and reconfiguring the BeSmart wifi, the configuration was successful.
However, no devices are visible
where to find some logic etc