News

moodlite - Coming soon


MQTT Support

Psycho_Mantis · 1563

spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #15 on: January 12, 2019, 10:16:40 AM
Right now I'm working on basic MQTT functionality.
I can change: Brightness, Speed, Pattern.
For now it's only one way (MQTT -> Moodlite), but next step is both ways and for that I need some basic HA config (working on it now).

So many things to do, so little time.



LordVader

  • moodlite Developer
  • Full Member
  • *****
    • Posts: 113
    • Likes: +5/-0
  • I find your lack of faith disturbing!
    • View Profile
Reply #16 on: January 12, 2019, 10:47:59 AM
Although I do not have any LEDs yet (screw you, Aliexpress :D) I can't wait to play around with my Home Assistant and MQTT!

Speaking of both way communication: What about the possibility to add a motion sensor to the power block to make the Moodlite report motion to the MQTT server?
Just an idea for when there are no more ideas left :D


spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #17 on: January 12, 2019, 12:51:18 PM


Speaking of both way communication: What about the possibility to add a motion sensor to the power block to make the Moodlite report motion to the MQTT server?
Just an idea for when there are no more ideas left :D

Added to ToDo list. But then we'll need to modify power cover for motion sensor. 8)
« Last Edit: January 12, 2019, 03:32:01 PM by spigot »



LordVader

  • moodlite Developer
  • Full Member
  • *****
    • Posts: 113
    • Likes: +5/-0
  • I find your lack of faith disturbing!
    • View Profile
Reply #18 on: January 12, 2019, 04:05:06 PM
Happy to do so ;-)


AS-3Ddruck

  • Newbie
  • *
    • Posts: 9
    • Likes: +1/-0
    • View Profile
    • 3D Druck Service Dienstleister
Reply #19 on: January 14, 2019, 06:46:06 PM
Can somebody say me what this MQTT is?
Is it like a API?



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #20 on: January 14, 2019, 06:48:48 PM
It's protocol used to communicate between different devices.
« Last Edit: January 14, 2019, 07:03:15 PM by spigot »



shfaxx

  • Jr. Member
  • **
    • Posts: 95
    • Likes: +11/-0
    • View Profile
Reply #21 on: January 15, 2019, 01:55:57 AM
Can somebody say me what this MQTT is?
Is it like a API?

It the messaging protocol used by many of the IoT devices.  Found some info here (Not sure how good / bad it is).
https://www.hivemq.com/blog/how-to-get-started-with-mqtt/



galorin

  • Newbie
  • *
    • Posts: 10
    • Likes: +1/-0
    • View Profile
Reply #22 on: January 18, 2019, 02:39:47 PM
I am quite interested in this as well.  I'm still fairly new to MQTT, but I've already written custom software for a Sonoff wall switch with MQTT.  It turned out to be objectively inferior to Sonoff-Tasmota.

Have you got a Develop branch somewhere that I could look at?  I've just started picking through what's in Master on Github, looking to potentially fork if I see something I would like to change.



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #23 on: January 18, 2019, 03:51:37 PM
It's "finished", but I need to make more tests. So if you would like to test it and maybe help to improve the code, you're welcome.



galorin

  • Newbie
  • *
    • Posts: 10
    • Likes: +1/-0
    • View Profile
Reply #24 on: January 18, 2019, 04:09:59 PM
I would love to do some testing.



chemmings60

  • Newbie
  • *
    • Posts: 4
    • Likes: +1/-0
    • View Profile
Reply #25 on: January 22, 2019, 10:42:11 PM
I have also built in MQTT to the original code, to be controlled using openhab, but im sure home assistant would be very similar.
Id be keen to see your MQTT code to see the differences. I am controlling, power, brightness, speed, colour and pattern

I have also only got one way communication right now, but this was only about 2 hours of playing with the code last night. Publishing an MQTT message and retaining it each time the code updates would be simple.



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #26 on: January 24, 2019, 05:37:25 AM
Ok. I don't have much time these days. Send me PM If you're willing to test it.



sniperx

  • Newbie
  • *
    • Posts: 3
    • Likes: +0/-0
    • View Profile
Reply #27 on: January 24, 2019, 07:41:49 AM
Love to test the new code, when you have some ready let me know.



marky

  • Newbie
  • *
    • Posts: 12
    • Likes: +1/-0
    • View Profile
Reply #28 on: March 20, 2019, 02:12:04 AM
it seem to be broked at less for me in the last version of Hassio. how did you fix the: rgb_color: true thats seem to only work in old version



spigot

  • Global Moderator
  • Full Member
  • *****
    • Posts: 112
    • Likes: +24/-0
  • There's no place like 127.0.0.1
    • View Profile
Reply #29 on: March 24, 2019, 03:35:26 PM
This is my actual HASS code for RGB LED:

Code: [Select]
  - platform: mqtt
    name: rgb_moodlite
    brightness_state_topic: "Moodlite/Brightness/Get"
    brightness_command_topic: "Moodlite/Brightness/Set"
    state_topic: "Moodlite/Backlight/Get"
    command_topic: "Moodlite/Backlight/Set"
    payload_on: "1"
    payload_off: "0"
    rgb_state_topic: "Moodlite/Color/Get"
    rgb_command_topic: "Moodlite/Color/Set"
    optimistic: false
    qos: 0
    retain: false



 


SMF spam blocked by CleanTalk