Announcement

Collapse
No announcement yet.

Dimmer Control?

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

    Dimmer Control?

    Michael,

    I am writing a bridge driver for a MQTT device which requires some complex signature generation for published packets. Since I am defining the topic's and payload with which I will interface with Homeseer, how do I do it so a dimmer control is detected / generated? I was thinking of using the Tasmota nomenclature for the topics [CMND/STAT]/device/POWER, but am unsure what to use for the dim control....

    -Stan

    #2
    mcsMQTT does not recognize a data pattern that would be characterized as a dimmer. I will need to look to see what the HS setup is for a dimmer and then I can add it as one of t he Contol/UI types. If you have an example of the setup of a dimmer from Zwave or other plugin then that would help me.

    Comment


      #3
      Michael,

      Not Sure what you need to see....

      Here is a zwave dimmer....

      Need more???

      -Stan
      Attached Files

      Comment


        #4
        Michael,

        I thought I had a pretty good handle on how your plugin worked. I coded a device to be a dim module and associated it with the following....
        Click image for larger version

Name:	hs.jpg
Views:	172
Size:	47.4 KB
ID:	1306947
        This seems to work well as this is a simplified topic being sent from a Node-Red driver. It all works but on occasion I am getting a weird looping problem where the plugin is operating on a topic not associated with any HS device.... Here is what it looks like in the log...

        5/23/2019 9:49:52 PM 192230200 | ActoOnMessageForTrigger Topic /appliance/1812144891717229088234298f196791/subscribe,Payload={"header":{"from":"/appliance/HaPi/MeRossDriver","messageId":"c6d4eab7e79412b1e34467dc14bcff99" ,"method":"SET","namespace":"Appliance.Control.Light","paylo adVersion":1,"sign":"ed7cf7c8aaeebf32e84e080dc0a9fc7d","time stamp":1558662592},"payload":{"light":{"capacity":4,"channel ":0,"rgb":-1,"temperature":-1,"luminance":44}}}
        5/23/2019 9:49:53 PM 192230514 | HSEvent VALUE_CHANGE| 1024| | 3382| 3381| 180
        5/23/2019 9:49:53 PM 192230515 | HSEvent VALUE_CHANGE| 1024| | 1217| 1216| 181
        5/23/2019 9:49:53 PM 192230516 | ActoOnMessageForTrigger Topic /appliance/HaPi/MeRossDriver,Payload={"header":{"messageId":"c6d4eab7e79412b 1e34467dc14bcff99","namespace":"Appliance.Control.Light","me thod":"SETACK","payloadVersion":1,"from":"/appliance/1812144891717229088234298f196791/publish","timestamp":1558662592,"timestampMs":404,"sign":"ed 7cf7c8aaeebf32e84e080dc0a9fc7d"},"payload":{"light":{"capaci ty":4,"channel":0,"rgb":-1,"temperature":-1,"luminance":84}}}
        5/23/2019 9:49:53 PM 192230566 | HSEvent VALUE_CHANGE| 1024| | 3383| 3382| 180
        5/23/2019 9:49:53 PM 192230566 | HSEvent VALUE_CHANGE| 1024| | 1218| 1217| 181
        5/23/2019 9:49:53 PM 192230568 | ActoOnMessageForTrigger Topic /appliance/1812144891717229088234298f196791/publish,Payload={"header":{"messageId":"d0f3492b7361d92c46bc 46714c1362cf","namespace":"Appliance.Control.Light","method" :"PUSH","payloadVersion":1,"from":"/appliance/1812144891717229088234298f196791/publish","timestamp":1558662592,"timestampMs":415,"sign":"2b d75be43f1bd6049af6dcdaf01dd4f3"},"payload":{"light":{"capaci ty":4,"channel":0,"rgb":-1,"temperature":-1,"luminance":84}}}
        5/23/2019 9:49:53 PM 192230617 | HSEvent VALUE_CHANGE| 1024| | 3384| 3383| 180
        5/23/2019 9:49:53 PM 192230619 | HSEvent VALUE_CHANGE| 1024| | 1219| 1218| 181
        5/23/2019 9:49:53 PM 192230620 | Updat
        e Accepted 172 to 84 StatusType=0
        5/23/2019 9:49:53 PM 192230626 | Command nonPlugin Device 172 to 84
        5/23/2019 9:49:53 PM 192230626 | Command 172 to 84, nValue=84, ControlValue=0, Range=Nothing, ControlType=Button, ControlString=, Label=Off, ControlUse=_Off
        5/23/2019 9:49:53 PM 192230626 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230626 | Command 172 to 84, nValue=84, ControlValue=100, Range=Nothing, ControlType=Button, ControlString=, Label=On, ControlUse=_On
        5/23/2019 9:49:53 PM 192230626 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230626 | Command 172 to 84, nValue=84, ControlValue=1, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 1%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230626 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230626 | Command 172 to 84, nValue=84, ControlValue=2, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 2%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230626 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230626 | Command 172 to 84, nValue=84, ControlValue=3, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 3%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230626 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230626 | Command 172 to 84, nValue=84, ControlValue=4, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 4%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230626 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230627 | Command 172 to 84, nValue=84, ControlValue=5, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 5%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230627 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230627 | Command 172 to 84, nValue=84, ControlValue=6, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 6%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230627 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230627 | Command 172 to 84, nValue=84, ControlValue=7, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 7%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230627 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230627 | Command 172 to 84, nValue=84, ControlValue=8, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 8%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230627 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230627 | Command 172 to 84, nValue=84, ControlValue=9, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 9%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230627 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230627 | Command 172 to 84, nValue=84, ControlValue=10, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 10%, ControlUse=_Dim
        5/23/2019 9:49:53 PM 192230627 | Command numeric, but no CAPI matches value or range
        5/23/2019 9:49:53 PM 192230627 | Command 172 to 84, nValue=84, ControlValue=11, Range=Nothing, ControlType=Values, ControlString=, Label=Dim 11%,

        It continues this until it reaches Dim=84%

        The topic is unusual but is the native topic from the device.... BTW, here is the plugin working correctly...

        5/23/2019 9:49:53 PM 192230644 | ActoOnMessageForTrigger Topic /stat/9679100/DIM,Payload={"device":"9679100","dim":84}
        5/23/2019 9:49:53 PM 192230644 | HSEvent VALUE_CHANGE| 1024| | 84| 44| 172

        Could this some kind of a database corruption? Do I have some setting in a weird mode?

        Thx for the help....
        -Stan

        Comment


          #5
          When a non-plugin device is commanded mcsMQTT needs to search through all the CAPI controls of the device looking for some form of match. It looks like this device has a CAPI control of each of what is likely 100 values. Other than being ugly in the debug log what is the actual problem that you are observing?

          It looks to me as if things are normal with Topic /appliance/1812144891717229088234298f196791/publish being mapped into HS devices 180 and 181 and /stat/9679100/DIM being mapped into non-plugin device 172. Device 180 and 181 are owned by the plugin so no search through CAPI is needed and the when mcsMQTT changes each an HSEvent acknowledge is provided. The same acknowledge occurs for 172 after the CAPI search found the 84.

          Your setup looks reasonable for device 172.

          Comment


            #6
            Michael,

            I see I was interpreting the order of the log incorrectly. It does appear that /appliance is being ignored as was intended. I think I see the error in my intermediate driver. Thanks for your help....

            -Stan

            P.S. - As a followup, my root problem was using the connection via Event Change (Blue highlighting). This has the side effect, that if a change comes from HS OR the MSQTT event - it triggers a publish action. In my setup this causes a circular chase condition. It appears using the normal method will fix the issue. I have to delete the device and re-create it. Now validated - thx for the help....

            Comment

            Working...
            X