[SOLVED] MQTT Sending LWT

Hi Guys.
I might send little Dumb. I have a question.
I have my mqtt 2.4 working and I am using Mosquito as my Broker.
I want my openhab to send a LWT . out to a Chanel that my Remote DB is subscribed to. and if the system say hangs up or is disconnected from the wifi I want to Reboot my server. the server is a laptop running ubuntu no battery as current. will be using a relay to cycle the power to the laptop. I am also aiming to use node red as that is my signal controls that I am running on the Remote db. can any one just point me in the right direction. I have all the rest figured out. just not how to send the LWT on a Fixed basis.

Thanks so long.

On your MQTT Broker Thing, under “Show More” are the LWT parameters.

If I understand you correct, you want to reboot your server once the MQTT broker recognizes the server going offline since the server has sent its LWT.

But except for the case that ubuntu really hangs and does not repond i highly advise not just to “plug the cord”
Do you really want to hard reboot the system when your WiFi router does a reboot or shortly disables and enable WiFi?
It is not unlikely that you somehow could end up with a corrupt file system.

It tends to hang up. So that i have to power cycle the laptop. Not sure what the reason might be. Or even where to look.

Regards
Allen

Start with the syslog around the time that it locks up.

Sascha does have a good point though. If it is still writing to disk (e.g. logs) that will mean that a hard power cycle has the potential to corrupt your file system.

Thanks will have a look i am a noob on linux. Will tri to get the information

Regards
Allen

I got it working.
for information.

re:freezing screen with Ubuntu 16.04

This only started recently with me, after watching in the monitor I noticed the process Web Content was taking almost all the CPU time and a lot of memory until I ran out of my 6 GB.

I solved it by using these following procedures, after removing a Cookie editor extension:

1 Under Firefox pref: Accept 3rd party cookies only from visited websites!

2 change this in GRUB

Ubuntu 15.10 and 16.04 keep freezing randomly

There is a line in that: GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash” (like this), replace with: GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash intel_idle.max_cstate=1”
3 My SWAP was not being used at all! I doubled my swap space to that of my memory (12 GB)

hope it holds Thank you