NeoPixel Bus FX and sending MQTT commands in OpenHab

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
J74656
New user
Posts: 3
Joined: 30 Dec 2022, 15:54

NeoPixel Bus FX and sending MQTT commands in OpenHab

#1 Post by J74656 » 06 May 2023, 09:46

hi folks

still fairly new to ESP Easy and I have got NeoPixel (BusFX) installed on one of my ESP8266 NodeMCU devices with a WS2812 led strip attached to it and I can get it working using the command line option in ESPEasy for testing purposes. I installed the MQTT controller and enabled it and I am trying to get OpenHab via MQTT to send a MQTT command back to my ESP8266 board to basically turn it on/off or to play one of the presets such as Kitt. Now I already have MQTT up and running on my Pi with OpenHab 3 as I use several DHT11 sensors, BME680 all sending data to OpenHab via MQTT so this is definitely up and running fine.

The problem is trying to find suitable MQTT commands to put within OpenHab to trigger the LEDStrip to turn on or to light a preset sequence. I have asked over in the OpenHab forum but not much help so far as someone said its all down to what MQTT commands NeoPixel Bus FX supports so so far they are drawing a blank. So are these MQTT commands the same as the commands you use in the command line within ESPEasy to test the strip, i.e. nfx on; nfx rainbow etc? or will it take a totally different argument/text?

In OpenHab I have already created a new MQTT Thing (called NeoPixel) and have pointed this to my MQTT Broker. I am able to create channels to read in things such as Mode, LastMode, Fade etc so I know I am getting values read in via MQTT. The problem is not either the right MQTT command is used or this does not communicate back correctly from OpenHab to turn the LED strip on for example.

Has anyone managed to achieve this in OpenHab and would be kind enough to share some insight into how they got it to work? I am using OpenHab 3 and I now do most of the config via the UI. I am not sure what the best channel is to create from this screenshot attached and how to get this MQTT command option to work.

Thanks for your time.
Attachments
Screenshot 2023-05-06 at 08.40.05.png
Screenshot 2023-05-06 at 08.40.05.png (304.55 KiB) Viewed 747 times

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: NeoPixel Bus FX and sending MQTT commands in OpenHab

#2 Post by Ath » 10 May 2023, 20:08

I'm not very fluent in MQTT, but if you send a command to the ESPEasy endpoint with the topic ending in /cmd, then the command that's in in the payload will be executed on ESPEasy. That way you should be able to control your NeoPixels.
/Ton (PayPal.me)


Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests