Announcement

Collapse
No announcement yet.

PLCBUS Connector for HomeSeer 2 - V1.33.2.4

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    I snooped the T-4034E mini PLCBUS controller, and I found it's sending the command a second time when it does not receive an ack within 1 second.

    I'll try to do the same. This might be necessary for 3-phase support.

    --------------

    Any other board user could send me some feedback on the plugin ?
    It would really help as with my test PLCBUS setup it's really working 100%...
    --
    stipus

    Comment


      #32
      I'll try to do the same. This might be necessary for 3-phase support.
      If you implement sending a second command if no ack in 3-phase mode I think it will work. ( Or so wait until I get the new interface and see what happens ) Most of time but not all it is enough to send a second command.

      Would be nice if On Off status is based on ack. so I can see if the module really change the status. Will this work if you send another command? Is it possible to receive an ack on the second command?

      Comment


        #33
        To check if the device really changed status, you can use the "Poll Devices" green button at the top of HomeSeer status page.

        Currently further development of the plugin is on hold until I get feedback from more users.
        Last edited by stipus; November 15, 2007, 06:21 PM.
        --
        stipus

        Comment


          #34
          Attachement in post #1 updated to V0.8.2.2

          Change log since V0.7.2.2

          - Updated plugin expiration date to 12/31/2007.

          If you are upgrading, you can just copy the new hspi_plcbus.dll to the HomeSeer 2 directory.
          --
          stipus

          Comment


            #35
            Getting status

            Stipus

            Have just ordered a bunch of PLCBUS modules from Kevin to start playing with them. Hopefully they will arrive soon. Keen to play with your module and integrate it into my Philips Pronto world!

            Sorry if I ask some dim questions as I come up to speed with PLCBUS and Homeseer (I use Indigo as I am a Mac user but I am now running Homeseer in a virtual machine on the mac!). But here we go: How do I get the dim status level back from the plugin so that I can send this on to my Pronto so I know the light status?

            Regards

            Simon

            Comment


              #36
              How do I get the dim status level back from the plugin so that I can send this on to my Pronto so I know the light status?

              If the device status has been changed from HomeSeer (using a device command or a scene command), you just need to read the DeviceValue.

              If the device status has been changed from a controller that sends the PLCBUS device command such as PLCBUS 4034-E, you just need to read the DeviceValue.

              However, if the device status has been changed using the module local control, you need to poll the device first.

              hs.PollDevice "A1"
              dimLevel = hs.DeviceValue "A1"
              --
              stipus

              Comment


                #37
                Tonight, I did move the PLCBUS plugin from my dev server to my production HomeSeer server. It's the exact same version V0.8.2.2 as available here on the board.

                I removed a bunch of X10 modules from 2 rooms including my living-room, and replaced all of them with PLCBUS modules.

                I started to create new scenes... etc ... it's currently working great !

                I found that for some house-code-wide commands such as "D All-Lights off", the plugin doesn't receive the command from Homeseer.

                I'm not sure if it's because I still have some X10 devices on the D house-code, or if these commands are always sent to the CM11a plugin when it's enabled.

                I didn't have this problem on my dev server, but it doesn't have a CM11a X10 interface.
                --
                stipus

                Comment


                  #38
                  lunkan,

                  Did you receive your new PLCBUS-1141 interface ?

                  As I have no feedback from others and as it's working fine here, I'll send this first version of the plugin to the HomeSeer updater.
                  --
                  stipus

                  Comment


                    #39
                    Yes, got it last week but no time yet to go to the post office, will do it tomorrow

                    Comment


                      #40
                      OK. I'm going to wait until I get feedback from you.

                      If it still doesn't work, I'll try to change the code to send commands twice in 3-phase mode.
                      --
                      stipus

                      Comment


                        #41
                        Got the new 1141 interface today, seems to work now in 3 phase mod. No problem when turning devices on/of from homeseer
                        Polling the devices does not work, seems to be little to fast between devices. (3 phase module has to transfer commands)

                        EDIT:
                        Also when running an event its a little to fast between commands

                        Code:
                        2007-12-10 17:26:56   Info  Event Trigger "Test ON" 
                        2007-12-10 17:26:56   PLCBUS Debug  SetIO() called HC=A DC=2 COMMAND=2 
                        2007-12-10 17:26:56   Info  Device: Nere Hall Taklampa (A2) ON 
                        2007-12-10 17:26:56   Info  Device: Nere Kök Spotlights (D1) ON 
                        2007-12-10 17:26:56   Info  Device: Nere Köksö (D2) ON 
                        2007-12-10 17:26:56   Info  Device: Nere Sovrum Fönster (C1) ON 
                        2007-12-10 17:26:56   Info  Device: Nere Sovrum Fönster (C1) ON 
                        2007-12-10 17:26:56   PLCBUS Debug  SetIO() called HC=D DC=1 COMMAND=2 
                        2007-12-10 17:26:56   PLCBUS Debug  SetIO() called HC=D DC=2 COMMAND=2 
                        2007-12-10 17:26:56   PLCBUS Debug  SetIO() called HC=C DC=1 COMMAND=2 
                        2007-12-10 17:26:56   PLCBUS Debug  Sending: UserCode:51 DeviceCode:A2 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:26:56   PLCBUS Debug  SetIO() called HC=C DC=1 COMMAND=2 
                        2007-12-10 17:26:56   PLCBUS Debug  Sent: UserCode:51 DeviceCode:A2 Function:On Data1:100 Data2:0 Tx:True Ack:False Id:False RiscOK:True PlcBusOK:True 
                        2007-12-10 17:26:56   PLCBUS Debug  Received Ack: UserCode:51 DeviceCode:A2 Function:On Data1:100 Data2:0 Tx:False Ack:True Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:26:56   PLCBUS Debug  Sending: UserCode:51 DeviceCode:D1 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:26:57   PLCBUS Debug  Received: UserCode:51 DeviceCode:A2 Function:StatusOn Data1:100 Data2:3 Tx:False Ack:False Id:False RiscOK:True PlcBusOK:True 
                        2007-12-10 17:27:01   PLCBUS Debug  PLCBUS Error : Too long wait for interface response to command: UserCode:51 DeviceCode:D1 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:02   PLCBUS Debug  Sending: UserCode:51 DeviceCode:D2 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:02   PLCBUS Debug  Sent: UserCode:51 DeviceCode:D2 Function:On Data1:100 Data2:0 Tx:True Ack:False Id:False RiscOK:True PlcBusOK:True 
                        2007-12-10 17:27:02   PLCBUS Debug  Received Ack: UserCode:51 DeviceCode:D2 Function:On Data1:100 Data2:0 Tx:False Ack:True Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:02   PLCBUS Debug  Sending: UserCode:51 DeviceCode:C1 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:07   PLCBUS Debug  PLCBUS Error : Too long wait for interface response to command: UserCode:51 DeviceCode:C1 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:08   PLCBUS Debug  Sending: UserCode:51 DeviceCode:C1 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:08   PLCBUS Debug  Sent: UserCode:51 DeviceCode:C1 Function:On Data1:100 Data2:0 Tx:True Ack:False Id:False RiscOK:True PlcBusOK:True 
                        2007-12-10 17:27:08   PLCBUS Debug  Received Ack: UserCode:51 DeviceCode:C1 Function:On Data1:100 Data2:0 Tx:False Ack:True Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:09   PLCBUS Debug  Received: UserCode:51 DeviceCode:C1 Function:On Data1:100 Data2:0 Tx:False Ack:False Id:False RiscOK:True PlcBusOK:True 
                        2007-12-10 17:27:09   X10 Received  C1 ( Nere Sovrum Fönster) C On 
                        2007-12-10 17:27:09   PLCBUS Debug  Received Ack: UserCode:51 DeviceCode:C1 Function:On Data1:100 Data2:0 Tx:False Ack:True Id:False RiscOK:False PlcBusOK:False 
                        2007-12-10 17:27:09   PLCBUS Debug  Received: UserCode:51 DeviceCode:C1 Function:StatusOn Data1:100 Data2:3 Tx:False Ack:False Id:False RiscOK:True PlcBusOK:True
                        Only tested for one hour now, will do some more test this evening.
                        Is it possible to have a delay between each command sent to the 1141 interface in 3 phase mod?
                        Last edited by lunkan; December 10, 2007, 11:42 AM.

                        Comment


                          #42
                          Can you send me (stipus at stipus dot com, or post here) a few more debug logs.

                          - Debug log when the polling is failing
                          - More debug logs with events failing.

                          For polling, there is a 5 second timeout, and I don't think this is a little too fast: it must be another problem. 5 seconds should be more than enough.

                          From the log you posted, I can see the following lines:

                          Code:
                          2007-12-10 17:26:56   PLCBUS Debug  Sending: UserCode:51 DeviceCode:D1 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False 
                          2007-12-10 17:26:57   PLCBUS Debug  Received: UserCode:51 DeviceCode:A2 Function:StatusOn Data1:100 Data2:3 Tx:False Ack:False Id:False RiscOK:True PlcBusOK:True 
                          2007-12-10 17:27:01   PLCBUS Debug  PLCBUS Error : Too long wait for interface response to command: UserCode:51 DeviceCode:D1 Function:On Data1:0 Data2:0 Tx:False Ack:False Id:False RiscOK:False PlcBusOK:False
                          Plugin is sending D1 on to the interface
                          Interface is receiving A2 Status-On (I don't get these messages in one phase mode)
                          Interface never replies that the D1 command has been sent. I think the D1 command has not been sent because the interface was busy receiving A2 status-on.
                          So after 5 second 26:56 --> 27:01 there is a timeout.

                          I'll see if it's the same problem in 2 or 3 of your logs, and change the algorithm. If the interface doesn't reply a message has been sent after one second, I'll retry.
                          --
                          stipus

                          Comment


                            #43
                            Can you try this new version.

                            If the plugin doesn't receive TX from the interface within one second, the command is sent again to the interface (up to 3 retries).

                            I could do the same for ACKs : currently if ACK is not received within 3 seconds, a message is printed to the event log, and the plugin sends next command. I could also retry to send the command.


                            Note: The attached ZIP archive only contains the main plugin DLL V0.9.2.2
                            Last edited by stipus; December 10, 2007, 08:22 PM.
                            --
                            stipus

                            Comment


                              #44
                              I'm attach a file from logs using your latest DLL V0.9.2.2
                              Edit: Oops, wrong in my logfile: "Comments: When polling first the rest of last command starts (something buffered?) D1,C1,C2 goes ON" D1 wrong should be D2

                              With latest .dll if I set devices on /off from webinterface "device list" and not to fast 2 sec between commands it works correct. Polling also works!
                              Attached Files
                              Last edited by lunkan; December 10, 2007, 05:38 PM.

                              Comment


                                #45
                                It took me a while to understand why commands have been buffered... a stupid copy/paste error on my side

                                Here is a new version. It should be much better I have also added more debug info for next time....


                                I can see from your log that 3-phase mode is really special:

                                - sending D2 ON
                                - sent D2 ON
                                - ack D2 ON <-- until this point, I get the same but then
                                - received D2 ON <-- I think it's the command sent by the coupler echoed back to the interface ?
                                - received D2 status-on <-- I don't know where does this come from. Maybe it's some kind of ack message between the device and the coupler ?

                                In the future, I'll need to filter those 2 last received commands, because this can have side effect on HomeSeer (like status change triggers triggered twice...).

                                In the case that this version works, I'll need a few more log files (same as you sent before). With the debug info I added, I hope to find a solution to filter the extra received commands.

                                [EDIT] Attachement removed as a new version is available from the HomeSeer updater.
                                Last edited by stipus; January 1, 2008, 09:11 AM.
                                --
                                stipus

                                Comment

                                Working...
                                X