I wonder what commands are supported by MB Pro firmware/bash.
I'm trying to download (with curl) json data and read it (with jq). Script works well with Linux. Any tutorial or alike available?
Ver 4.4 new functionality plugin
Moderator: Mattk
Re: Ver 4.4 new functionality plugin
It's not bash here, it's ash
, sort of a "diet bash"
For commands, look (e.g.) https://www.lifewire.com/ash-linux-command-4095519


For commands, look (e.g.) https://www.lifewire.com/ash-linux-command-4095519
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
Re: Ver 4.4 new functionality plugin
Thnx, will study.
Re: Ver 4.4 new functionality plugin
ash is rather close to bash. So when you are familiar with bash you should find a way.
curl and jp are not there. You can work with wget and awk for grabbing data from the stream.
Please don't have the idea to install additional packages. This will fill your flash storage and operation will stop.
Just a warning as some user thought they can install stuff as on their regular PC and had a hard stop after that
curl and jp are not there. You can work with wget and awk for grabbing data from the stream.
Please don't have the idea to install additional packages. This will fill your flash storage and operation will stop.
Just a warning as some user thought they can install stuff as on their regular PC and had a hard stop after that

Re: Ver 4.4 new functionality plugin
Acknowledged
Re: Ver 4.4 new functionality plugin
Thanks for pointing to right direction. Got it up and running 

Re: Ver 4.4 new functionality plugin
Would you like to share your plugin code? Might be helpful for other users...
Re: Ver 4.4 new functionality plugin
short and simple after some trial and error
Code: Select all
#!/bin/sh
#
#read solar and uv data from url file at json format
#download file from url
i=0
while true;
do
wget -q http://veikkola-saa.com/pws2/solardata.txt -O /tmp/mnt/data/scripts/solardata.txt
solar=$(awk -F, '{print $2}' /tmp/mnt/data/scripts/solardata.txt | cut -d':' -f 2)
uv=$(awk -F, '{print $3}' /tmp/mnt/data/scripts/solardata.txt | cut -d':' -f 2)
#awk -F tells to split with comma (,) take second/third dataset and then cut tells to take second part of string after :
#
echo "uv0 $uv"
sleep 2
echo "sol0 $solar"
sleep 180
done
Re: Ver 4.4 new functionality plugin
Thanks for sharing!