Comments (19)
Hi,
I think there is already a way to implement this with Home Assistant using the REST API, but I don't know HomeAssisant in detail. Nevertheless MQTT would be nice to have and I definitely will look into this when I find time. The PubSub library uses some additional RAM and memory, so I will have to try out if it's working with all libraries enabled.
If you or someone else will do the first step on the integration I would definitely integrate this into McLighting.
Regards
Tobias
from mclighting.
+1 for home assistant integration with MQTT. I will maybe buy another esp to test this :)
from mclighting.
i just added MQTT to MCLighting.ino.
Page is in request
from mclighting.
Awesome! It's already in master branch ? Wanna check this out
from mclighting.
from mclighting.
I overflew the file and couldn't locate mqtt username and password . Neither topic .I might have read a bit too fast and on the phone but I was just wondering if I miss something ?
from mclighting.
User&Passw is not needed for this , topics are at the end (ws2812-set/mode, ws2812-set/state )
Remind you that the control for mode does not work yet.
I use io-broker, for H.A.. integration search for " mqtt home assistant" lots off sources for it.
from mclighting.
from mclighting.
@LeonVos Great! I will have a look at it as soon as I'm back from holidays and find time.
Could you file this as a pull request in the McLIghting repo? Then I will create a standalone branch where we can test and do enhancements.
Regards
from mclighting.
Plese have a look here: #26 (comment)
from mclighting.
First off, thanks for the great repo. I have two things to mention in reference to this new MQTT functionality that was added to the master branch.
- I suggest refactoring the infinite mqtt connection loop to give up after a few retries. Right now, if the mqtt connection isn't established, then the webserver and websocket server will hang. At:
McLighting/Arduino/McLighting/McLighting.ino
Line 542 in 88b476d
if (!mqtt_client.connected()) { if(mqtt_reconnect_retries < mqtt_reconnect_retries_max){ mqtt_reconnect(); } }else{ mqtt_client.loop(); }
- As a hint as to why large messages aren't working in pubsubclient, as mentioned in this todo:
It seems that the pubsubclient doesn't respect redefining of MQTT_MAX_PACKET_SIZE, as you have in definitions.h. So any message over 128 bytes won't be sent. You can change this as a build option if using PlatformIO, but not with the Arduino IDE. See this issue knolleary/pubsubclient#110
Hope this info helps, and I'm not posting this into the wrong place. Thanks for the excellent software.
from mclighting.
Thank you @nimbl. I will have a look at it as soon I find time.
from mclighting.
why do i get
*WM: host
*WM: Adding parameter
*WM: port
*WM: Adding parameter
*WM: user
*WM: Adding parameter
*WM: pass
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
and it just wont connect and how is the wifimanager supposed to work? which address do i have to type in?
from mclighting.
Hi, you need to connect your wifi with the esp (ssid looks like "espxxxx") default ip is 192.168.1.4
from mclighting.
IP should be: 192.168.4.1 I think
@thundergreen It Looks like your Board has stored valid credentials. Maybe you used it with wifimanager before.
You could uncomment the line with wifimanager.resetsettings(). In McLighting.ino. Then run one time to reset everything. Then comment it again.
from mclighting.
how would i reset it then ? will try this again now
from mclighting.
i reset it by uncommenting .. commted it again and it runs as accesspoint now .. strange
from mclighting.
Dear @thundergreen,
I hope everything is OK now. I will close the issue. If there are still problems, please just open a new issue.
Regards
Tobias
from mclighting.
@nimbl
As proposed by you, I added a limit to the MQTT connections tries: 91571ea
from mclighting.
Related Issues (20)
- Cant Open/Import McLightingApp.aia HOT 2
- Change Hostname ? HOT 1
- Issues setting up Adafruit_MQTT configuration from wifiManager in Arduino
- Changing led pin issue? HOT 5
- E1.31 animations very laggy
- No Wifi connection although AP-Mode is quit
- What syntax should I use for domoticz HOT 1
- NUMLEDS Error HOT 1
- McLighting (esp8266) HOT 4
- No Wifi Network HOT 1
- Adding a selector switch in homebridge
- Home assistant Support
- USE_WS2812FX_UART1
- Flash Size ESP8266 2.7.4 HOT 1
- Build error HOT 3
- Start Problems ESP 8266 & WS2811
- Compile Error ... HOT 1
- connecting Octoprint (raspberry pi 4) to ESP8266 as the controller. HOT 4
- Change Wifi Network HOT 3
- Error compiling mclighting v3
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 mclighting.