MQTT is the name of the protocol - mosquitto is the name of a program that will run an MQTT broker (what would could be termed the server part of the deal)1. What's the difference and which should I be using for the Pi Zero W?
Eclipse Paho - Eclipse Mosquitto
2. MQTT is an app/program run on pi or or programming/unix type protocol?
I run mosquitto on my main windows PC (as its on all of the time) and all my little Pi around (and outside) the house send and receive msgs to/from itI don't want to have this on the internet, so no webserver.io address. Just my own little intranet if you will. So I need to establish an Access Point and Webserver on the Pi. Then running mqtt, create Clients, Publishers, URI/URLs? Am I getting it or even close?
Assuming that the Wemos can run a client, the Pi with NR and MQTT server would be trivial to set up, no code required.marine_hm wrote:I want my project to run autonomous from our work wifi, no access to the outside world other than the Wemos D1 minis that will connect to the access point created on the Pi Zero, subscribe/publish to the MQTT to turn on/off LEDs on the remote Wemos. A silent notification process that; attention is needed and where.
Yepthe Pi with NR and MQTT server would be trivial to set up, no code required.
I use the sunrise node to control pond lights.mattmiller wrote: At the moment I use mainly Python for my MQTT but I do utilise NodeRed with the BigTimer add-on node that works out when sunrise/sunset is so I only turn on outside lights during darkness.
Just to re-clarify - MQTT is a protocol - mosquitto is the base software that is used.but I tried downloading MQTT on my windows 7 laptop.
Code: Select all
Your environment has been set up for using Node.js 6.10.0 (x64) and npm. C:\Windows\System32>cd C:\Users\<your-userid> C:\Users\<your-userid>>npm install -g --unsafe-perm node-red npm WARN deprecated email@example.com: you can use npm install i18next from version 2.0.0 npm WARN deprecated firstname.lastname@example.org: use uuid module instead C:\Users\<your-userid>\AppData\Roaming\npm\node-red -> C:\Users\<your-userid>\AppData\Roaming\npm\node_modules\node-red\red.js C:\Users\<your-userid>\AppData\Roaming\npm\node-red-pi -> C:\Users\<your-userid>\AppData\Roaming\npm\node_modules\node-red\bin\node-red-pi C:\Users\<your-userid>\AppData\Roaming\npm `-- email@example.com C:\Users\<your-userid>>node-red 16 Mar 01:40:18 - [info] Welcome to Node-RED =================== 16 Mar 01:40:18 - [info] Node-RED version: v0.16.2 16 Mar 01:40:18 - [info] Node.js version: v6.10.0 16 Mar 01:40:18 - [info] Windows_NT 10.0.14393 x64 LE 16 Mar 01:40:20 - [info] Loading palette nodes 16 Mar 01:40:21 - [warn] ------------------------------------------------------ 16 Mar 01:40:21 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node 16 Mar 01:40:21 - [warn] [tail] Not currently supported on Windows. 16 Mar 01:40:21 - [warn] ------------------------------------------------------ 16 Mar 01:40:21 - [info] Settings file : \Users\<your-userid>\.node-red\settings.js 16 Mar 01:40:21 - [info] User directory : \Users\<your-userid>\.node-red 16 Mar 01:40:21 - [info] Flows file : \Users\<your-userid>\.node-red\flows_<your-machine-name>.json 16 Mar 01:40:21 - [info] Creating new flow file 16 Mar 01:40:21 - [info] Server now running at http://127.0.0.1:1880/ 16 Mar 01:40:21 - [info] Starting flows 16 Mar 01:40:21 - [info] Started flows `
Thanks! That seems to be working. I think I had to paste and run it twice. I was too impatient and closed out the window before anything happened. The second time I did it and had to set the aptop down to do something and noticed it downloading and decompressing the files.asandford wrote:To install on win 10:
-install latest node 6.x binary from here
-Right click on "Node.js command promt" from start menu, and run as administator
-in the console that pops up type npm install -g --unsafe-perm node-red
-type node-red to start
Matt; with MQTT, do I even need to set up an access point? Mosquitto would act as a server and the "clients" would log on via the IP address of the Raspberry Pi? Maybe I have to forget the idea that you need an SSID that says "hey I'm here", you click on it and log on with the proper credentials.mattmiller wrote:Sounds like a great little project - not had experience with turning a Pi into an access point but there are plenty of tutorials about for that.
Yes if you still want thisdo I even need to set up an access point?
mosquitto/MQTT needs a network (and since your using Wemos - a WiFi one)I want my project to run autonomous from our work wifi,
Its one of those things that looks incomprehensible to start with but once you start playing with it and understand the concept of a flow - the VFM in terms of power/effort is fantasticNot sure what I think of node red. It's probably very easy for someone who's used to it, but doesn't seem very intuitive for a beginner.
Users browsing this forum: pitibonom and 19 guests