Announcement

Collapse
No announcement yet.

Strange behaving

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

  • Strange behaving

    Well i have a "problem" here with my domotica.
    The equipment we have running here is quite old but still works great when used the IR remote.

    The luxaflex and curtains i am controlling since a few months but i am experiencing now and then some errors.
    I am using a Arduino with some relay boards , and i "hot wired" a remote from the curtains because when wiring the controls on the wall the wires are behaving as little antennas and the controls seem to have problems with EMC or something because they do not respond anymore.



    So every button on the remote is connected to a relay so i can press them by the software,made some Events and that took me a while as well to figure out when it worked good.

    what is another "problem" is that the remote remembers what channel he is on, not when you drop the power it automatically goes back to 0 so when i get a misfire/press it is lost and i have to do a inspection by hand to set it back to chan 0 but luckily this did not happen to often.

    Because i can not fire the relay very fast to go up to channel 3 for example i need to make the event with a few seconds of pauze.
    After each press i have to deactivate the relay of course otherwise it only stays on.

    So its like:
    activate "chan up relay" wait 2 seconds, deactivate "chan up relay", activate "chan up relay" wait 4 seconds ,deactivate "chan up relay" , activate "chan up relay" wait 6 seconds, deactivate "chan up relay".


    If i do not use the wait things get messed up.
    This has worked for quite a while but i do get some errors and the errors are then after a program in the morning and evening it seems that some relays stay on.
    They do not switch off, this does not happen always.
    I am wondering how is this possible that it does not switch relays off anymore ?
    Is it software related, plugin related ?

    What i have tried as well is to start a even 2 minutes after the even to open the curtains or close them is a event that switched off all relays after the events have runned.
    But these do not seem to work ok.
    What i also noticed, when manually pressing the even activation icon the blue arrow all things work fine.

    But when its automatically activated it seems to have errors and the last days every day in the week..

    Any ideas were to start searching, i have put the log on but do not see any strange behaving as well.

    (not sure if this is the proper forum to ask sorry if not)


    Edit: after a few hours some of the dallas temp sensors that worked great before start to act up as well.
    reset the card, reconnect, reboot the computer but they keep the temp on 85 degrees Celsius.


    strange things are happening here.
    The rest of the sensors do keep working like the PIR and relays.
    Last edited by Vincenttor; October 3rd, 2014, 02:26 AM.

  • #2
    nobody ??

    Comment


    • #3
      HI,

      Sorry I must have missed your first post.
      I have seen something like this in the past and have may have a fix for it. When you say you get errors is this errors in the log and if so what are they?
      Can you email me direct with a debug log of when it fails with the events not triggering the relays off.

      Greig.
      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
      Scripts =
      Various

      Comment


      • #4
        no problem, will do this.
        I did found after a few days of fiddling around one of the things that caused the abort.

        What happened is , because i sometimes got home and i could not press the buttons (thats because the relays were still on state) i made a Event that did a reset on the arduino on 2 times, 1 at 8 AM in the morning and another that reset the card at night somewhere.

        What i did is because its getting winter time I changed the time to activate the event to open the curtains.
        How stupid can you be to change it on 8 AM and the reset was set on the same time.

        So the program started to do his thing and after a amount of seconds it did a reset to the arduino and it stopped of course with the job.


        But it still have a life of its own sometimes that it leaves some relays on, if this happens i will log it right away and send it.


        What happened as well is with the 1 Wire sensors, i got i in a daisy chain connected like the manual i have found from Jon00 and it worked great for weeks.
        But suddenly the 3 sensors show only 85 Deg like the image above.
        I restarted the arduino, computer, checked the cable.
        All i have t do know is check if there is still 5 Volt on the wires.
        Will let it know what i can find about it.

        Further its a great plugin !!!

        Comment


        • #5
          Well , the temp sensors are working ok again.
          But still experiencing strange behavior from the curtains open and closing.
          A part on a relay card broke down as well resulting in a relay that went on off on off on off but this has been replaced and working again.

          The curtains are still having a live of there own, what i discovered is that when i press the Event manually to start it all works.

          All 4 curtains open and also close, but when its triggered by the timer it does not open everything.
          It does count up from 0 to channel 4 for the curtains and counts down to 0 again but im not sure what is happening.
          I had a log file but there was not much readable in , it all seemed normal.
          Got a new log running again and will make some more timing events to see if it goes like it should then ill post it.



          Here is a video of activating the event manually and it all works.
          gives a bit better image of what i am talking about i hope.

          https://www.youtube.com/watch?v=G2NaTsuYVmQ

          Comment


          • #6
            Ok I think I see how it is working now. Can you send me a screen shot of the full event so I can check it but if it runs ok when you manually trigger it then it should run ok with the event.
            Can you try and change the trigger and trigger it with something else and see if that works as this will see if it is another event is running sometimes and messing things up.
            If you get a log send it through.

            Thanks,

            Greig.
            Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
            X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
            Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
            Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
            Scripts =
            Various

            Comment


            • #7
              There is another event running at the same time indeed.
              This is for the luxaflex if thats the name for it in english.
              Those are also running and controlled by the arduino

              I have them changed in time now, 1 minute later then the other Event so i hope this will solve it.

              I am going to put an external power supply to feed the 1-wire temp sensors so they hopefully stay online.
              Also the PIR that i have connected are all working now, strange thing is that 2 of them did not work for a while and at first they did work.

              Then the Disconnects suddenly i almost forgot, only a reboot worked to get it online again, i used the 1.56 version like described on the topic here and reloaded the .ino file again.

              This is the event for the luxaflex - these actually worked pretty good for a long time even when you first gave the demo for free to use.
              Sometimes when i got home there was a error and 1 or 2 of the relays did not shut off but stay on and the controls did not work anymore.



              This is the event where it should open X minutes after sunrise:

              as you can see i needed some time because the remote i am controlling with the relays can't response as fast as 1 or 2 seconds and only accepts 1 press per button at a time , hence the x amount of delay seconds.

              The next Event is closing after the sun goes down:


              There are 4 channels for the curtains , it has to count from 0 - 1- 2 - 3 - 4 and then it has to count back to 0 again so for the next job it does pick the right channel.




              At this video i made an event that triggered the event of the curtains and the luxaflex at the same time.

              on the beginning it seems that it had a problem, when i started the event to close everything at the same time it worked.
              After this i triggered it again to open both and it worked this time like it should.

              https://www.youtube.com/watch?v=kGkqUoPrF6E

              https://www.dropbox.com/s/yhkn52cw2g...debug.txt?dl=0
              This is the part of the log when i started it in the video.

              Comment


              • #8
                Let me step in here and offer some suggestions. AS Greig said, there seems to be no reason why this event would run any differently when manually triggered rather than time triggered - unless it is conflicting with another event triggered at the same time. You could turn on logging for all of the individual Arduino outputs (logging is disabled by default), then look at your log and see if you see any conflicts. I am also not seeing where you are turning off the "Arduino Devices Channel UP" button in your event.

                I also have some suggestions, based upon how I would do it. I don't know how far the Arduino and relays are from your remote, but I would mount the relay board(s) right at the controller. This would keep any RF interference to a minimum. I would use optically isolated relay boards like pictured in the attachments below. I would also use a total of 5 relays:
                1. Open button
                2. Close button
                3. Channel UP button
                4. Channel DOWN button (this relay may no longer be needed with the addition of the reset below)
                5. Power connect. This would connect the power from the controller and RESET it


                I am considering your statement above that the controller resets to channel 0 when the power is removed and restored.

                As far as the event goes I have several suggestions, if I understand how the controller works. I have found the "WAIT" action to be easier to use when adding delays in events - that way you do not need to keep track of the accumulated times. I will describe the "OPEN Curtains" event below, the close curtains would be similar.
                • IF the time is 30 m, 0s after sunset.
                • THEN set device Arduino Devices Controller Power to ON (this would power up the controller and reset it to channel 0)
                • THEN Wait 10 seconds (this creates a delay to allow the controller to wake up and become operable, you may need to adjust this value)
                • THEN set device Arduino Devices Controller "channel up" to ON (advance channel to 1)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "channel up" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller "open" to ON (curtain 1 open)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "open" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller "channel up" to ON (advance channel to 2)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "channel up" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller "open" to ON (curtain 2 open)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "open" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller "channel up" to ON (advance channel to 3)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "channel up" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller "open" to ON (curtain 3 open)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "open" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller "channel up" to ON (advance channel to 4)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "channel up" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller "open" to ON (curtain 4 open)
                • THEN Wait 2 seconds
                • THEN set device Arduino Devices Controller "open" to OFF
                • THEN Wait 5 seconds
                • THEN set device Arduino Devices Controller Power to OFF (this would power down the controller until the next cycle)


                The above event structure would turn the controller on, delay then advance the channel, delay then press the open button, delay and repeat three times. The close event would only change the "open" outputs to the "close" outputs. Having the relay boards close would reduce the likelihood of interference and clean up the wiring - requiring only 5 or 6 wires from the Arduino to control plus a 5 volt supply for the relay boards. Alternately you could use the power connect relay as a disconnect. Then you would power cycle the controller at the end of the event to reset it to channel 0.
                Attached Files
                Randy Prade
                Aurora, CO
                Prades.net

                PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                Comment


                • #9
                  Thanks for the help,

                  i see i forgot to add another event.
                  The channel up and channel down button are events.
                  What this event does is when triggered for on, it switches to off after 1 second.

                  So in the above events where you only see channel up on, it switches back to off after a second.
                  This is why it does work but its not understandable of course for you guys, my mistake , i actually also forgot about this until i just checked it because that would have been a big mistake indeed if i only turned it on.


                  About the channels, what i hoped was that when the power was off from the "old remote" that it reverted to 0, but thats the thing , it does not.
                  It keeps the number in memory for a few minutes.
                  So turning the power supply for the remote off is no option.


                  Between the relayboard and the remote is about 20 meter of cat5 FTP cable, i can try to move it indeed to the remote and use the cable to transfer the signals coming from the arduino.

                  I have the debug on, posted a small part of it on the bottem of the post but i can't see much wrong things between it.


                  Just a moment ago i had also the 3 PIR working again, did not change anything except restarted homeseer a few times.
                  Then the 3 PIR worked, and now only 1 PIR is working in the living room.
                  The other pir that goes trough the same cable as the pir that is still working stopped.
                  as well as the pir in a bedroom stopped.
                  Cables are all shielded that i use, and i put a external psu in the arduino board.

                  Even tried another mega2560 board to see if that would solve anything but it did not.

                  The relay board i am using is like one you had as example:



                  I will see what happens the coming week, hopefully it stays working now with the curtains and luxaflex after the change in time for the events that start.
                  If it still continues i will move the relay board to the controller to see if this helps.


                  I am going to move to my house this weekend and like i wrote in your topic i like to switch all my power sockets with an arduino, or actually a few.
                  This is why i asked if you had any problems and thought it was stable enough for it since i am experiencing some problems here at my parents home.

                  Comment


                  • #10
                    Originally posted by Vincenttor View Post
                    About the channels, what i hoped was that when the power was off from the "old remote" that it reverted to 0, but thats the thing , it does not.
                    It keeps the number in memory for a few minutes.
                    So turning the power supply for the remote off is no option.
                    What if the power is removed at the end of the event as I showed in my example? It would be several hours before it was powered on again. Would that cause it to reset?
                    Randy Prade
                    Aurora, CO
                    Prades.net

                    PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                    Comment


                    • #11
                      Will do a test tomorrow if this is a good solution indeed to see how long it takes, its 11.36 PM here so time to go to bed in a few moments.

                      I then need to put the power on command in front of the event because if it has been manually triggered in HStouch for example to open the curtains it should response of course.
                      Could be that this comes a bit to soon after the power went off but i can take my chances , have read over it the last line what you said ,i probably have shutters in front of my eyes...

                      Thanks

                      Comment


                      • #12
                        Originally posted by Vincenttor View Post
                        Will do a test tomorrow if this is a good solution indeed to see how long it takes, its 11.36 PM here so time to go to bed in a few moments.

                        I then need to put the power on command in front of the event because if it has been manually triggered in HStouch for example to open the curtains it should response of course.
                        Could be that this comes a bit to soon after the power went off but i can take my chances , have read over it the last line what you said ,i probably have shutters in front of my eyes...

                        Thanks
                        That is why I put the controller power on as the first action in the event above.

                        Think about it overnight, then look at it with fresh eyes tomorrow
                        Randy Prade
                        Aurora, CO
                        Prades.net

                        PHLocation - Pushover - EasyTrigger - UltraECM3 - Ultra1Wire3 - Arduino

                        Comment


                        • #13
                          ok so here i have the log from this morning,
                          When i came downstairs the luxeflex were all open.
                          But the curtains, only the thickest curtain top not sure how its called was opened and the thin layer was still closed the second one.


                          https://www.dropbox.com/s/iynt2clkvf1j2sb/logarduino.txt?dl=0


                          I do not understand why this part is 2 times in the log after 1 event/action of the button up.

                          you see that it is Chanced to 0 , then shortly 2 times Chanced to 1.
                          As is 0 is on and 1 is off if i read it correctly, i wonder why it tries to turn it off 2 times because i only have it 1 time set to turn off.
                          Not sure if this could cause it

                          Code:
                          17-12-2014 ,06:58:00.088 SetIOMulti, Device =Arduino Devices Huiskamer Gordijn kanaal omhoog, Ref =89, Chanced to 0, 
                          17-12-2014 ,06:58:00.098 Type = Output
                          17-12-2014 ,06:58:00.100 BoardNo = 1
                          17-12-2014 ,06:58:00.102 Output = 9
                          17-12-2014 ,06:58:00.104 Pin = 47
                          17-12-2014 ,06:58:00.106 Key = O
                          17-12-2014 ,06:58:00.109 Index = 9
                          17-12-2014 ,06:58:00.150 Sent to com port No:6  = 1 O 47 0     
                          17-12-2014 ,06:58:00.155 Type = Output
                          17-12-2014 ,06:58:00.158 BoardNo = 1
                          17-12-2014 ,06:58:00.160 Output = 9
                          17-12-2014 ,06:58:00.162 Pin = 47
                          17-12-2014 ,06:58:00.163 Key = O
                          17-12-2014 ,06:58:00.165 Index = 9
                          17-12-2014 ,06:58:00.207 Sent to com port No:6  = 1 O 47 0     
                          17-12-2014 ,06:58:01.118 SetIOMulti, Device =Arduino Devices Huiskamer Gordijn kanaal omhoog, Ref =89, Chanced to 1, 
                          17-12-2014 ,06:58:01.125 Type = Output
                          17-12-2014 ,06:58:01.126 BoardNo = 1
                          17-12-2014 ,06:58:01.128 Output = 9
                          17-12-2014 ,06:58:01.131 Pin = 47
                          17-12-2014 ,06:58:01.133 Key = O
                          17-12-2014 ,06:58:01.135 Index = 9
                          17-12-2014 ,06:58:01.179 Sent to com port No:6  = 1 O 47 1     
                          17-12-2014 ,06:58:01.185 Type = Output
                          17-12-2014 ,06:58:01.188 BoardNo = 1
                          17-12-2014 ,06:58:01.190 Output = 9
                          17-12-2014 ,06:58:01.192 Pin = 47
                          17-12-2014 ,06:58:01.193 Key = O
                          17-12-2014 ,06:58:01.195 Index = 9
                          17-12-2014 ,06:58:01.239 Sent to com port No:6  = 1 O 47 1     
                          17-12-2014 ,06:58:01.514 Data Received:1 Rom 4010851200050000122 17.00
                          17-12-2014 ,06:58:01.519 Timer 1 Reset
                          17-12-2014 ,06:58:01.537 Rom Address = 37A967EA81EDF0FA , Value = 17.00
                          17-12-2014 ,06:58:01.543 Device Exists
                          17-12-2014 ,06:58:02.124 SetIOMulti, Device =Arduino Devices Huiskamer Gordijn kanaal omhoog, Ref =89, Chanced to 1,
                          here is the event button press up and button press down,


                          The rest looks good in the log if i compare it to the event. the up and down relays and open.
                          Next step is bringing the relayboard to the remote control then i guess.

                          Comment


                          • #14
                            Originally posted by Vincenttor View Post
                            ok so here i have the log from this morning,
                            When i came downstairs the luxeflex were all open.
                            But the curtains, only the thickest curtain top not sure how its called was opened and the thin layer was still closed the second one.


                            https://www.dropbox.com/s/iynt2clkvf1j2sb/logarduino.txt?dl=0


                            I do not understand why this part is 2 times in the log after 1 event/action of the button up.

                            you see that it is Chanced to 0 , then shortly 2 times Chanced to 1.
                            As is 0 is on and 1 is off if i read it correctly, i wonder why it tries to turn it off 2 times because i only have it 1 time set to turn off.
                            Not sure if this could cause it

                            Code:
                            17-12-2014 ,06:58:00.088 SetIOMulti, Device =Arduino Devices Huiskamer Gordijn kanaal omhoog, Ref =89, Chanced to 0, 
                            17-12-2014 ,06:58:00.098 Type = Output
                            17-12-2014 ,06:58:00.100 BoardNo = 1
                            17-12-2014 ,06:58:00.102 Output = 9
                            17-12-2014 ,06:58:00.104 Pin = 47
                            17-12-2014 ,06:58:00.106 Key = O
                            17-12-2014 ,06:58:00.109 Index = 9
                            17-12-2014 ,06:58:00.150 Sent to com port No:6  = 1 O 47 0     
                            17-12-2014 ,06:58:00.155 Type = Output
                            17-12-2014 ,06:58:00.158 BoardNo = 1
                            17-12-2014 ,06:58:00.160 Output = 9
                            17-12-2014 ,06:58:00.162 Pin = 47
                            17-12-2014 ,06:58:00.163 Key = O
                            17-12-2014 ,06:58:00.165 Index = 9
                            17-12-2014 ,06:58:00.207 Sent to com port No:6  = 1 O 47 0     
                            17-12-2014 ,06:58:01.118 SetIOMulti, Device =Arduino Devices Huiskamer Gordijn kanaal omhoog, Ref =89, Chanced to 1, 
                            17-12-2014 ,06:58:01.125 Type = Output
                            17-12-2014 ,06:58:01.126 BoardNo = 1
                            17-12-2014 ,06:58:01.128 Output = 9
                            17-12-2014 ,06:58:01.131 Pin = 47
                            17-12-2014 ,06:58:01.133 Key = O
                            17-12-2014 ,06:58:01.135 Index = 9
                            17-12-2014 ,06:58:01.179 Sent to com port No:6  = 1 O 47 1     
                            17-12-2014 ,06:58:01.185 Type = Output
                            17-12-2014 ,06:58:01.188 BoardNo = 1
                            17-12-2014 ,06:58:01.190 Output = 9
                            17-12-2014 ,06:58:01.192 Pin = 47
                            17-12-2014 ,06:58:01.193 Key = O
                            17-12-2014 ,06:58:01.195 Index = 9
                            17-12-2014 ,06:58:01.239 Sent to com port No:6  = 1 O 47 1     
                            17-12-2014 ,06:58:01.514 Data Received:1 Rom 4010851200050000122 17.00
                            17-12-2014 ,06:58:01.519 Timer 1 Reset
                            17-12-2014 ,06:58:01.537 Rom Address = 37A967EA81EDF0FA , Value = 17.00
                            17-12-2014 ,06:58:01.543 Device Exists
                            17-12-2014 ,06:58:02.124 SetIOMulti, Device =Arduino Devices Huiskamer Gordijn kanaal omhoog, Ref =89, Chanced to 1,
                            here is the event button press up and button press down,


                            The rest looks good in the log if i compare it to the event. the up and down relays and open.
                            Next step is bringing the relayboard to the remote control then i guess.
                            OK I think that is your problem. Your button press up and button press down are the same event so this will trigger twice. You only need one event to do this any time the relay is turned on.

                            Greig.
                            Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
                            X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
                            Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
                            Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
                            Scripts =
                            Various

                            Comment


                            • #15
                              Not sure if i fully understood what you mean,
                              you mean that i do not can use an event in a event ?

                              So in my case, the event i made when the channel up relay is activated it turns on and then turns the relay off after 1 second.

                              i have to put in the big event, but then separate.


                              Here i got the view collapsed what the up and down button normally should do.


                              Isn't it strange then, that when i manually activate the event , the curtains do work correct.
                              And when i look on the remote control press the button to see what channel it is on, it is back on 0 again after the event has runned.
                              So it is counting up and down like it should , you should think.

                              Comment

                              Working...
                              X