Giter Site home page Giter Site logo

auto run on pi3 about broadlink-mqtt HOT 11 CLOSED

eschava avatar eschava commented on July 19, 2024
auto run on pi3

from broadlink-mqtt.

Comments (11)

eschava avatar eschava commented on July 19, 2024 1

Sorry, I'm not an expert in the Linux
But you can try adding your line to /etc/rc.local, not /etc/profile

from broadlink-mqtt.

cobra85ec avatar cobra85ec commented on July 19, 2024 1

ok i got it. this let it wait 1min b4 it start after my node red which runs my mqtt server.. thank u guys very much.
sudo nano /etc/rc.local
then add this to the bottom after
fi
sleep 60 && python home/pi/broadlink-mqtt/mqtt.py

from broadlink-mqtt.

eschava avatar eschava commented on July 19, 2024

What error are you getting?

from broadlink-mqtt.

cobra85ec avatar cobra85ec commented on July 19, 2024

this is what i did
-sudo nano /etc/profile
then added to the bottom.
-python broadlink-mqtt/mqtt.py
save it then
-sudo reboot
when i log back in with putty this is what i get..

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Oct 26 06:46:52 2018 from 192.168.50.1
[2018-10-26 06:52:06,053] DEBUG Connected to RM2 Broadlink device at '192.168.50.179' (MAC e8:d4:50:77:0f:78)
Traceback (most recent call last):
File "broadlink-mqtt/mqtt.py", line 389, in
mqttc.connect(cf.get('mqtt_broker', 'localhost'), int(cf.get('mqtt_port', '1883')), 60)
File "/home/pi/.local/lib/python2.7/site-packages/paho/mqtt/client.py", line 839, in connect
return self.reconnect()
File "/home/pi/.local/lib/python2.7/site-packages/paho/mqtt/client.py", line 962, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File "/usr/lib/python2.7/socket.py", line 575, in create_connection
raise err
socket.error: [Errno 111] Connection refused

from broadlink-mqtt.

eschava avatar eschava commented on July 19, 2024

Looks like your mqtt server is run AFTER broadlink-mqtt
Could you please confirm?

from broadlink-mqtt.

cobra85ec avatar cobra85ec commented on July 19, 2024

i dont kno how to do that.... but is there a way to add a delay to the start up..?

from broadlink-mqtt.

cobra85ec avatar cobra85ec commented on July 19, 2024

i try that also same erro and i also try bashrc

from broadlink-mqtt.

eschava avatar eschava commented on July 19, 2024

I think /etc/profile is a bad option because it's run only when you log in using ssh, am I correct?
Look, do you have success running broadlink-mqtt in manual mode?

from broadlink-mqtt.

cobra85ec avatar cobra85ec commented on July 19, 2024

yes. ill try to local again.. and yes i can run command manual works fine.

from broadlink-mqtt.

plains203 avatar plains203 commented on July 19, 2024

I added mine to /etc/rc.local The command I used is as follows. Your path will vary.
nohup python /home/plains203/broadlink-mqtt/mqtt.py --mqtt >/dev/null 2>&1 &
sleep 1

from broadlink-mqtt.

cobra85ec avatar cobra85ec commented on July 19, 2024

nope not working...

from broadlink-mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.