EDIT: I have modified the code to work with OpenWRT and ModemManager. It is far better and cooler now. It uses MQTT autodiscovery for the sensors so you don’t have to make template sensors anymore.
I am just starting to get used to GoldenORB. Where do I put the code for modem_mqtt.sh? I add the sensors to the config.yaml file but not sure how to tell the GoldenOrb to send the data to the mqtt server which I already have.
log into goldeorb router via ssh via terminal (ssh username@ipaddress)
install opkg install moaquitto-client in the default directory that ssh logs into
place the modem_mqtt.sh file in the /etc/config/ directory with the correct moquuitto ip address with SCP
Questions?
Do I need to include the port number or is it the default?
type in command chmod…
then type in command ./modem_mqtt.sh
Last step add the /etc/config/modem_mqtt.sh & to the startup local section on the gui
Did you put “&” mark after the startup command? It allows other commands to execute at the same time.
Beford doind rc.local changes you can run script manually in ssh with command “./modem_mqtt.sh” (in the same folder, where script file is) and see that everything is working.
I’m curious if you are still monitoring this thread. I am attempting to add this to my Goldenorb router. I am getting the not found error in my system log
Sat Jan 8 14:50:27 2022 daemon.notice procd: /etc/rc.d/S95done: /etc/rc.local: line 4: /etc/config/modem_mqtt.sh: not found
I have placed the modem_mqtt.sh file in the etc/config/ folder and set the file executable with chmod +x
I added the following to the rc.local file
sleep 60
/etc/config/modem_mqtt.sh &
Did you run into this error perhaps and know of a fix?