Occasional HABpanel disconnect from the openHAB server

Posted by ads' corner on Saturday, 2020-01-18
Posted in [Ansible][Linux][Raspberry-Pi][Software]

The new display showing HABpanel works quite nice. But occasionally the fullscreen browser will lose the network connection. As far as I can see, it’s not a Wi-Fi problem of the Raspberry Pi, but still annoying: in the morning the browser shows a small red warning that the connection to the openHAB server is lost, time is still correct, but temperature and the status of other devices is outdated. To fix that, I have to leave fullscreen mode, hit reload - and then there is no keyboard for going into fullscreen mode again (that’s using the F11 key).

After digging around for a while, I couldn’t really figure out what is causing that problem. And since I need that display as a standalone device without maintenance overhead, or mouse and keyboard connected, I settled for the next best solution: just reboot it every night. The browser is already configured to come up in fullscreen mode, so everything is fine afterwards.

Note: probably just logging in and out would be OK as well, but LXDE is set to autologin and once I log out the pi user, I have to enter a password to login again.

Adding a reboot task is fairly simple: if you are using some kind of automation. Ansible is setting up the entire Pi installation, therefore all I have to do is add a task using the cron module:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
- name: Reboot every night
  cron:
    name: "Reboot every night"
    user: root
    minute: "00"
    hour: "4"
    day: "*"
    month: "*"
    weekday: "*"
    job: "/sbin/reboot"

That said: if someone knows how to fix the problem, or what might cause the disconnects, or how I can make HABpanel reconnect without restarting the browser, please leave a comment.


Categories: [Ansible] [Linux] [Raspberry-Pi] [Software]