pherting / streamdeck-mqtt

Simple MQTT Client Plugin for Elgato Stream Deck.
13 stars 3 forks source link

MQTT Stopped working after 6.5.2 (19936) Update #8

Open gerard8800 opened 8 months ago

gerard8800 commented 8 months ago

This is a great product BTW. I use to contol various things in my office. I updated my stream deck yesterday and my MQTT give a warning sysmbol when pressed. If a new mqtt button is created, the parameters do not set saved. It is like Stream Deck is looking at the wrong location for the mqtt button settings.

fabiofl commented 7 months ago

Actually, I'm not even being able to install the plugin from the marketplace. Begun playing with MQTT for controlling stuff on my home literally yesterday, so I thought "it would be awesome to trigger this stuff from StreamDeck". Would love to. :D

gerard8800 commented 7 months ago

I have figured out a work around. I installed the MQTT client on my computer. Then I created a .bat file (you can use a sh file on mac/linux) and I run as a System/Open. Using a bat file stops the blink of the system window. "C:\Program Files\mosquitto\sd.bat" "raspi/1" "CHARGER_ON"

sd.bat file @echo off if "%~1"=="" goto notopic if "%~2"=="" goto notopic "C:\Program Files\mosquitto\mosquitto_pub.exe" -h 192.168.1.253 -m "%~2" -t %~1

goto end :notopic echo nothing :end

fabiofl commented 7 months ago

I found my own way too. I'm on Mac and I work with with front-end for a living, so this was my approach:

Installed the MQTT.js node package npm install -g mqtt (I already work with web dev, so I already had all I needed). And then wrote a very simple bash script to call it directly:

#!/bin/bash

source ~/.zshrc; # Just to make sure we have node/mqttjs available - you'll have to figure out what to do in your setup

mqtt publish -t awtrix/notify -h YOUR_BROKER_IP -p 1883 -u YOUR_BROKER_USER -P YOUR_BROKER_PASSWORD -m '{"text": "It works!", rainbow: true}'

PS.: (For context)

gerard8800 commented 7 months ago

That looks like a fun project. I will take a look at that device. My MQTT server lives on a PI that functions as a MagicMirror. I just use a small display for my desk. Thx for the update! 20240414_092830

pherting commented 7 months ago

This is a great product BTW. I use to contol various things in my office. I updated my stream deck yesterday and my MQTT give a warning sysmbol when pressed. If a new mqtt button is created, the parameters do not set saved. It is like Stream Deck is looking at the wrong location for the mqtt button settings.

Sorry for the late Answer! I try to reproduce the problem and yes, on first try it doesnt save correct the values. But when you switch to another random Button in the StreamDeck Software and back again to the MQTT Button and give him some Server details and click on the Save Button at the bottom, it works. Maybe you can try it again and fill the fields once by once and save it after one field to check which maybe not correct saving.. That would help me a lot. You need to fill SSL Combobox and the Retain Combo also. So try it with both of No. It works with the actual version from Store and actual version of StreamDeck Software.

When it doesnt work, let me now some more details please! Be Shure your mqtt server works over WebSocket!

pherting commented 7 months ago

Actually, I'm not even being able to install the plugin from the marketplace. Begun playing with MQTT for controlling stuff on my home literally yesterday, so I thought "it would be awesome to trigger this stuff from StreamDeck". Would love to. :D

Hi, sorry for late Answer! What is the problem with downloading the Plugin over the Store? I try it now with a clean installation and clean account and it works perfectly. You need to put in your basket on the website and open it in your StreamDeck Software. Can you give me more details what happend? Thanks a lot!

pherting commented 7 months ago

I have figured out a work around. I installed the MQTT client on my computer. Then I created a .bat file (you can use a sh file on mac/linux) and I run as a System/Open. Using a bat file stops the blink of the system window. "C:\Program Files\mosquitto\sd.bat" "raspi/1" "CHARGER_ON"

sd.bat file @echo off if "%~1"=="" goto notopic if "%~2"=="" goto notopic "C:\Program Files\mosquitto\mosquitto_pub.exe" -h 192.168.1.253 -m "%~2" -t %~1

goto end :notopic echo nothing :end

Thanks for you comment! Its not a really workarround for the Plugin, its an another way to do it manualy =D So the best way is, to use the plugin without handling some Batch files.

Can you give me more information what doesnt work on your side? Please be shure that you ran mosquitto also as WebSocket Listener with example Port 9001 and try it over this Port with my Plugin! The normal MQTT Way over TCP/IP with Port 1883 will not work! It need to connect over WebSockets.

pherting commented 7 months ago

I found my own way too. I'm on Mac and I work with with front-end for a living, so this was my approach:

Installed the MQTT.js node package npm install -g mqtt (I already work with web dev, so I already had all I needed). And then wrote a very simple bash script to call it directly:

#!/bin/bash

source ~/.zshrc; # Just to make sure we have node/mqttjs available - you'll have to figure out what to do in your setup

mqtt publish -t awtrix/notify -h YOUR_BROKER_IP -p 1883 -u YOUR_BROKER_USER -P YOUR_BROKER_PASSWORD -m '{"text": "It works!", rainbow: true}'
* Saved it to a `test.sh` file somewhere, ran a quick `chmod +ux test.sh` for execution permissions just in case.

* Dragged and dropped the bash file on StreamDeck (spent almost an hour trying to manually add the path to a "Run" tile, but for some weird reason it wasn't working).

PS.: (For context)

* I was just trying to send something to a MQTT topic on my HomeAssistant, to which I added an [Awtrix](https://github.com/blueforcer/awtrix3/) LED Matrix.

* A similar workflow worked with the [MQQT-cli](https://hivemq.github.io/mqtt-cli/docs/installation/) package though Homebrew, but since I didn't wanted to have to install Java/OpenJDK/zulu on my Mac just for it. Keeping it all in node seemed to be more logical to my setup, and I personally have plans to hack something together using it for another project.

* Not tested, but I guess the official `brew install mosquitto` package could possibly work similarly.

Thanks for you comment! Its not a really workarround for the Plugin, its an another way to do it manualy =D So the best way is, to use the plugin without handling some Batch files.

Can you give me more information what doesnt work on your side? Please be shure that you ran mosquitto also as WebSocket Listener with example Port 9001 and try it over this Port with my Plugin! The normal MQTT Way over TCP/IP with Port 1883 will not work! It need to connect over WebSockets.

eventfactory commented 7 months ago

Hi, I have the same issue as @gerard8800. It was working before but not anymore. I've started again with a clean install of Stram Deck (6.6) and the plugin but every time I want to send a MQTT command, I have the warning symbol. I'm using webSocket Listener with port 443 with connection over WebSockets.

marcel151 commented 1 day ago

I also only get the Warning symbol. Does not work at all. Are you still maintaining the plugin @pherting?

orichienal commented 1 day ago

I got it too. it turned out that i had to enable the port for WebSocket in my mosquitto server for it to work, it is not enabled by default

in the following file

/etc/mosquitto/conf.d/local.conf

I had to add the following

listener 9001 protocol websockets

then restart and everything worked

I hope this helps you

I have just updated to 6.8.0 (21252) and everything still works, sometimes it takes a few seconds after starting until it works.

marcel151 commented 1 day ago

Thanks for the Info. Too bad the Broker integrated in my home automation can't use WebSockets... Will have to find out another solution.