Comments (12)
Thank you very much for a quick response to my problem. It was really just not setting up a DNS server ...
Thank you for your project
from mpower-tools.
That is very strange!
could you please execute some commands manually?
LOCALDIR="/var/etc/persistent/mqtt"
echo "my localdir is $LOCALDIR"
ls -la $localdir
also please post the contents of your (downloaded) install-client.sh
from mpower-tools.
Thank you for the answer, I immediately tried:
MF.v2.1.11# LOCALDIR="/var/etc/persistent/mqtt"
MF.v2.1.11# echo "my localdir is $LOCALDIR"
my localdir is /var/etc/persistent/mqtt
MF.v2.1.11# ls -la $localdir
drwxrwxrwx 2 admin admin 60 Jan 1 1970 .
drwxr-xr-x 7 admin admin 160 Jan 1 1970 ..
-rwxr-xr-x 1 admin admin 3106 Mar 31 09:01 install-client.sh
MF.v2.1.11#
from mpower-tools.
please do a cat install-client.sh
and post the output
from mpower-tools.
I copied content from install-client.sh and saved in to mPower via the "vi" editor:
`#!/bin/sh
LOCALDIR="/var/etc/persistent/mqtt"
LOCALSCRIPTDIR=$LOCALDIR/client
BASEURL="https://raw.githubusercontent.com/magcode/mpower-tools/master/mqtt"
echo "Installing mPower MQTT v2 ..."
wget --no-check-certificate -q $BASEURL/libmosquitto.so.1?raw=true -O $LOCALDIR/libmosquitto.so.1
wget --no-check-certificate -q $BASEURL/mosquitto_pub?raw=true -O $LOCALDIR/mosquitto_pub
wget --no-check-certificate -q $BASEURL/mosquitto_sub?raw=true -O $LOCALDIR/mosquitto_sub
mkdir -p $LOCALSCRIPTDIR
clean directory, but leave *.cfg files untouched
find $LOCALSCRIPTDIR ! -name '*.cfg' -type f -exec rm -f '{}' ;
wget --no-check-certificate -q $BASEURL/client/mqrun.sh -O $LOCALSCRIPTDIR/mqrun.sh
wget --no-check-certificate -q $BASEURL/client/mqpub-static.sh -O $LOCALSCRIPTDIR/mqpub-static.sh
wget --no-check-certificate -q $BASEURL/client/mqpub.sh -O $LOCALSCRIPTDIR/mqpub.sh
wget --no-check-certificate -q $BASEURL/client/mqsub.sh -O $LOCALSCRIPTDIR/mqsub.sh
wget --no-check-certificate -q $BASEURL/client/mqstop.sh -O $LOCALSCRIPTDIR/mqstop.sh
if [ ! -f $LOCALSCRIPTDIR/mpower-pub.cfg ]; then
wget --no-check-certificate -q $BASEURL/client/mpower-pub.cfg -O $LOCALSCRIPTDIR/mpower-pub.cfg
fi
if [ ! -f $LOCALSCRIPTDIR/mqtt.cfg ]; then
wget --no-check-certificate -q $BASEURL/client/mqtt.cfg -O $LOCALSCRIPTDIR/mqtt.cfg
fi
if [ ! -f $LOCALSCRIPTDIR/led.cfg ]; then
wget --no-check-certificate -q $BASEURL/client/led.cfg -O $LOCALSCRIPTDIR/led.cfg
fi
chmod 755 $LOCALDIR/mosquitto_pub
chmod 755 $LOCALDIR/mosquitto_sub
chmod 755 $LOCALSCRIPTDIR/mqrun.sh
chmod 755 $LOCALSCRIPTDIR/mqpub-static.sh
chmod 755 $LOCALSCRIPTDIR/mqpub.sh
chmod 755 $LOCALSCRIPTDIR/mqsub.sh
chmod 755 $LOCALSCRIPTDIR/mqstop.sh
poststart=/etc/persistent/rc.poststart
startscript="sleep 10; $LOCALSCRIPTDIR/mqrun.sh"
if [ ! -f $poststart ]; then
echo "$poststart not found, creating it ..."
touch $poststart
echo "#!/bin/sh" >> $poststart
chmod 755 $poststart
fi
if grep -q "$startscript" "$poststart"; then
echo "Found $poststart entry. File will not be changed"
else
echo "Adding start command to $poststart"
echo -e "$startscript" >> $poststart
fi
echo "Done!"
echo "Please configure mqtt.cfg"
echo "Please configure mpower-pub.cfg"
echo "Please configure led.cfg"
echo "run 'save' command if done."`
from mpower-tools.
I'd recommend to download it using the provided script
wget --no-check-certificate -q https://raw.githubusercontent.com/magcode/mpower-tools/master/mqtt/client/install-client.sh -O /var/etc/persistent/mqtt/install-client.sh;
chmod 755 /var/etc/persistent/mqtt/install-client.sh;
from mpower-tools.
I made a restart of mPower and tried the recommended:
BusyBox v1.11.2 (2015-04-06 14:24:36 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.
MF.v2.1.11# wget --no-check-certificate -q https://raw.githubusercontent.com/mag
code/mpower-tools/master/mqtt/client/install-client.sh -O /var/etc/persistent/mq
tt/install-client.sh;
MF.v2.1.11# chmod 755 /var/etc/persistent/mqtt/install-client.sh;
MF.v2.1.11#
from mpower-tools.
Good. Now execute the install script again!
/var/etc/persistent/mqtt/install-client.sh
from mpower-tools.
if I look at install-client.sh is empty - it is zero size
MF.v2.1.11# ls
bin data mqtt
cfg log rc.poststart
MF.v2.1.11# cd mqtt
MF.v2.1.11# ls
install-client.sh
MF.v2.1.11# ls -l
-rwxr-xr-x 1 admin admin 0 Mar 31 10:47 install-client.sh
MF.v2.1.11#
from mpower-tools.
Your device has internet access?
Please post the output of
wget --no-check-certificate https://raw.githubusercontent.com/magcode/mpower-tools/master/mqtt/client/install-client.sh -O /var/etc/persistent/mqtt/install-client.sh;
from mpower-tools.
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=58 time=56.059 ms
64 bytes from 8.8.8.8: seq=1 ttl=58 time=13.104 ms
64 bytes from 8.8.8.8: seq=2 ttl=58 time=12.482 ms
64 bytes from 8.8.8.8: seq=3 ttl=58 time=12.426 ms
64 bytes from 8.8.8.8: seq=4 ttl=58 time=56.055 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 12.426/30.025/56.059 ms
MF.v2.1.11#
MF.v2.1.11# wget --no-check-certificate https://raw.githubusercontent.com/magcod
e/mpower-tools/master/mqtt/client/install-client.sh -O /var/etc/persistent/mqtt/
install-client.sh;
--2020-03-31 10:59:39-- https://raw.githubusercontent.com/magcode/mpower-tools/master/mqtt/client/install-client.sh
Resolving raw.githubusercontent.com... failed: Name or service not known.
wget: unable to resolve host address `raw.githubusercontent.com'
MF.v2.1.11#
from mpower-tools.
Ok. That's it then. Seems like a DNS issue.
You need to fix that and afterwards you can try the installation again.
Ammended the docs:
55b4320
from mpower-tools.
Related Issues (19)
- Works for me HOT 1
- Frequent reconnects with Mosquitto HOT 2
- Disconnecting HOT 1
- save failed HOT 1
- Problems with number of ports on mPower Pro HOT 1
- Bus error when trying to save HOT 3
- Has anybody gathered a list of the awesome mPower/mFi repos like this one? HOT 1
- sh: Mini: unknown operand HOT 1
- Bad output after tail -f /var/log/messages command HOT 2
- Clarification on the guide /mqtt/client HOT 3
- .sh files contain ^M endine HOT 1
- Cloning the repository results in only empty files HOT 6
- install-client.sh- seems not working HOT 2
- Zero kb files HOT 1
- MQTT reports -1 for relay state HOT 4
- Extremely usefull HOT 3
- Mport HOT 6
- mPower 3 Outlet subs wrong HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpower-tools.