Announcement

Collapse
No announcement yet.

Setting virtual device values

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting virtual device values

    I was not really sure how to name this topic, but let me describe what I am trying to do. I have a Haiku L-series fan in my bedroom (Which is an amazing fan for anyone interested) that can be "controlled by smart home devices." What that really means is that it can be controlled by Alexa and I want to integrate it into HS.

    To do this I have configured a module someone wrote that translates MQTT commands into the Haiku API protocol and I have setup mcsMQTT on HS to send the commands to my MQTT broker.

    What I am trying to do now is setup a virtual device that can be set to the values 1-7 such that whenever it is set to one of those it appends the value of the virtual device to the MQTT topic as the payload.

    I am thinking the only way I am going to be able to do this is with some scripting, but I thought I would throw it out and see what the collective could come up with.

    Any thoughts on how to create/set the device values here to achieve what i am trying to do?

    Thanks in advance guys!

  • #2
    Originally posted by chewie View Post
    What I am trying to do now is setup a virtual device that can be set to the values 1-7 such that whenever it is set to one of those it appends the value of the virtual device to the MQTT topic as the payload.
    Can you expand on this statement a bit? Are you looking for a way to set a virtual device value to a number, or a way to generate the entire MQTT payload when the device value changes?

    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

    Comment


    • #3
      It may be easier just to control the fan directly:

      https://bruce.pennypacker.org/2015/0...-with-senseme/

      It would just need a simple script to send UDP messages on your network.
      Jon

      Comment


      • #4
        Originally posted by Uncle Michael View Post
        Can you expand on this statement a bit? Are you looking for a way to set a virtual device value to a number, or a way to generate the entire MQTT payload when the device value changes?
        I am looking for a way to generate the payload based on the value of the device. This specific example is that the fan has different speed values (1-7) so that is why i asked about those particular numbers.

        Comment


        • #5
          Originally posted by jon00 View Post
          It may be easier just to control the fan directly:

          https://bruce.pennypacker.org/2015/0...-with-senseme/

          It would just need a simple script to send UDP messages on your network.
          I agree Jon, however after spending a day trying to get that working (I am not much of a programmer and do not really know Python) I found the MQTT package and was able to get that up and running in just about an hour.

          Comment


          • #6
            Originally posted by chewie View Post

            I agree Jon, however after spending a day trying to get that working (I am not much of a programmer and do not really know Python) I found the MQTT package and was able to get that up and running in just about an hour.
            Hi

            Are you still using this method? I just installed a Haiku fan as well and have some basic success with sending commands using the Big5 plugin.

            Comment


            • #7
              I am, once I got the MQTT payload setup it has just worked. Not sure about Big5, I have not looked into it.

              Comment

              Working...
              X