Closed martin072 closed 4 years ago
I think the access point is not pushing any updates via the XMPP connection. The web server should work but will not reflect any state changes.
Have you already tried this
If you do not receive any updates from the System Access Point or are unable to set any datapoints log into the System Access Point interface [with the API user] and log out again. This must be done sometimes after a reboot of the System Access Point to enable websocket notifications .
Yes tried that, logging in did not solve the issue. sudo ip link set wlan0 down, and a restart of the api however did the trick... could there be some issue if the raspberry has 2 ip-address on the same network?
I don’t think so. I’m not sure how node selects the outgoing IP address but make sure to use ethernet if possible as the wifi connection might be unreliable. However I don’t think that this is the cause of it. It should at least disconnect and indicate it in the log if the connection is lost and we send keep alive messages every 10 sec, so I think it’s a problem with the SysAp.
Ok, nevertheless, disabling the wifi adapter fixed it.. weird..
👍 I have it running on an Odroid N2 SBC since 2 months and didn't notice any issues. Seems to be related to an unstable connection (Wi-Fi). Feel free to reopen this issue if it happens again on the ethernet connection.
Really bothered to say this but for some reason it’s seems to have stopped working At all now. Restarting the api Service, logging in to free@home makes no difference. There is no data on the socket.
I am using two raspberry’s pi (will migrate to one in a few weeks though). One has the api running and the other connects to the api’s websocket. They are both Pi 3B+ models and in the same network. Did not do any upgrades to free@home.
Is there any thing I can do to help you debug this?
Please enable debug logging and start the API for about 1 minute and post the log here. They're both on ethernet right?
Done that, obviouly now it works..grlmpfff.. Will output a log when it has issues again.
👍
Had the issue again. Needed to reboot the machine, after that web socket stopped working, even with multiple reconnects. Fun thing it started working again when I disabled the debug logging in the config.json.. Attached is a long list of the debug log, I tried to change the thermostat, and some lights to get some results in on the web socket. Let me know if you could find anything out of it..
Mar 25 23:15:50 pihome node[519]: 3/25/2020, 11:15:50 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:15:50 pihome node[519]: 3/25/2020, 11:15:50 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0016/20
Mar 25 23:15:55 pihome systemd[1]: systemd-hostnamed.service: Succeeded.
Mar 25 23:15:59 pihome node[519]: 3/25/2020, 11:15:59 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:16:15 pihome node[519]: 3/25/2020, 11:16:15 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:16:23 pihome node[519]: 3/25/2020, 11:16:23 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:16:33 pihome node[519]: 3/25/2020, 11:16:33 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:16:42 pihome node[519]: 3/25/2020, 11:16:42 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:16:51 pihome node[519]: 3/25/2020, 11:16:50 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:17:00 pihome node[519]: 3/25/2020, 11:17:00 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:17:15 pihome node[519]: 3/25/2020, 11:17:15 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:17:23 pihome node[519]: 3/25/2020, 11:17:23 PM - INFO: [192.168.73.5:44154]: Websocket connection established
Mar 25 23:17:24 pihome node[519]: 3/25/2020, 11:17:24 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:17:33 pihome node[519]: 3/25/2020, 11:17:33 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:17:42 pihome node[519]: 3/25/2020, 11:17:42 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:17:51 pihome node[519]: 3/25/2020, 11:17:51 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:18:00 pihome node[519]: 3/25/2020, 11:18:00 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:18:13 pihome node[519]: 3/25/2020, 11:18:13 PM - INFO: [192.168.73.5:44154]: Websocket connection closed
Mar 25 23:18:15 pihome node[519]: 3/25/2020, 11:18:15 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:18:19 pihome node[519]: 3/25/2020, 11:18:19 PM - INFO: [192.168.73.5:44254]: Websocket connection established
Mar 25 23:18:24 pihome node[519]: 3/25/2020, 11:18:24 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:18:33 pihome node[519]: 3/25/2020, 11:18:33 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:18:37 pihome node[519]: 3/25/2020, 11:18:37 PM - INFO: [192.168.73.5:44254]: Websocket connection closed
Mar 25 23:18:42 pihome node[519]: 3/25/2020, 11:18:42 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:18:51 pihome node[519]: 3/25/2020, 11:18:51 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:18:53 pihome systemd[1]: Stopping freeathome API Service...
Mar 25 23:18:53 pihome systemd[1]: freeathome-api.service: Main process exited, code=killed, status=15/TERM
Mar 25 23:18:53 pihome systemd[1]: freeathome-api.service: Succeeded.
Mar 25 23:18:53 pihome systemd[1]: Stopped freeathome API Service.
Mar 25 23:19:02 pihome systemd[1]: Started freeathome API Service.
Mar 25 23:19:04 pihome node[1127]: 3/25/2020, 11:19:04 PM - INFO: Starting free@home API
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Connected as e8e2af8d-bb9b-4147-a7ea-715b3685d73d@busch-jaeger.de/freeathome-api
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Websocket Server started
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Webserver Started
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Sent Authenticator
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Received Local Key
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Sent New Session Request
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Sent Login SASL Message
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Received SASL Challenge
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Sent SASL Challenge Response
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Received SASL Login Confirmation
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Successfully Authenticated
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Announced Capabilities to System Access Point
Mar 25 23:19:12 pihome node[1127]: 3/25/2020, 11:19:12 PM - INFO: Requested Master Data Structure from System Access Point
Mar 25 23:19:14 pihome node[1127]: 3/25/2020, 11:19:14 PM - INFO: Received Master Update from System Acccess Point
Mar 25 23:19:14 pihome node[1127]: 3/25/2020, 11:19:14 PM - INFO: Sent Subscription Request
Mar 25 23:19:15 pihome node[1127]: 3/25/2020, 11:19:15 PM - INFO: Sent Subscription Confirmation
Mar 25 23:19:15 pihome node[1127]: 3/25/2020, 11:19:15 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:19:16 pihome node[1127]: 3/25/2020, 11:19:16 PM - INFO: [192.168.73.5:44381]: Websocket connection established
Mar 25 23:19:24 pihome node[1127]: 3/25/2020, 11:19:24 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:19:32 pihome node[1127]: 3/25/2020, 11:19:32 PM - INFO: [192.168.73.5:44381]: Websocket connection closed
Mar 25 23:19:33 pihome node[1127]: 3/25/2020, 11:19:33 PM - INFO: Set Datapoint: ABB700D74698/ch0000/idp0011/0
Mar 25 23:19:41 pihome systemd[1]: Stopping freeathome API Service...
Mar 25 23:19:41 pihome systemd[1]: freeathome-api.service: Main process exited, code=killed, status=15/TERM
Mar 25 23:19:41 pihome systemd[1]: freeathome-api.service: Succeeded.
Mar 25 23:19:41 pihome systemd[1]: Stopped freeathome API Service.
Mar 25 23:20:22 pihome systemd[1]: Started freeathome API Service.
Mar 25 23:20:24 pihome node[1228]: 3/25/2020, 11:20:24 PM - INFO: Starting free@home API
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG: Received new status:
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG: connecting
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG: Received new status:
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG: connect
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG: Received new status:
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG: opening
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG: Received new output data:
Mar 25 23:20:25 pihome node[1228]: 3/25/2020, 11:20:25 PM - DEBUG:
Well, not much to say. The SysAp does not send any web socket updates. Either it must be a configuration issue or an unstable connection. I use the exact same setup (Version 2.4.0) with a ODROID N2 via Ethernet. Runs flawlessly since months on latest master version.
I'm not sure how to debug this.
Thanks for the help. I noticed the raspberry was a bit unstable due to a power cord (yes, not the power supply. That is an 10a 5v, but a standard micro usb cable with thin wires caused the voltage to drop to almost 4.6v), so without me knowing the Pi restarted at irregular times, obviously causing the Free at home connection to reset and therefore need to do the logon process in Busch and jaeger before the socket sends any data again.
Once again thanks for the help!
👍 I was in the same situation. The Pi should log it if it detects undervoltage (dmesg -T
).
10A is overkill for a pi :) Let's hope you don't short anything or you will get a big surprise 😅
Haha, it is not only for a Pi, multiple Pi's actually ;). And one can never have to much power 👍
I noticed that the websocket is not sending any data anymore. It worked for a while but it seemed to have stopped working. First I thought it might had to do with the fact that I have two ip addresses on the Pi, one Ethernet (used by default) and WiFi, but it worked for a while.. I did configure the config to use the eth0 ipaddress for the webserver and websocket, however the webserver seems to work fine, but the websocket doesn’t.
Any ideas how to troubleshoot this?