nymea-networkmanager icon indicating copy to clipboard operation
nymea-networkmanager copied to clipboard

stopping nymea after network established and running secondary ble

Open uselessgames opened this issue 3 years ago • 8 comments

Hello,

Thank you for the daemon, it is great!

I have a scenario where I need to run a secondary ble service after internet connectivity is established. ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 5; done;' I have noticed that when my broadcast starts it still uses nymea's characteristics. I have to disconnect + refresh several times + connect in order to see mine.

So we tried the following to check + stop nymea before starting ours

ExecStartPre=/bin/sh -c "until ping -c1 google.com; do sleep 5; done;if  systemctl list-units -all | grep -Fq 'nymea-networkmanager.service'; then echo 'Stoping nymea before starting jawsaver'; sudo systemctl stop nymea-networkmanager.service; else echo 'nymea not found'; fi"

Which seems to properly stop and broadcast the correct ble characteristics. However it prematurely stops nymea during the wifi setup (whenever there is no wlan set up).

Any suggestions to properly stopping nymea after setup and starting a second ble service?

if it makes a difference we are using the installation as noted on berrylan repo.

uselessgames avatar Jan 05 '21 08:01 uselessgames