Announcement

Collapse
No announcement yet.

On / Off lamp with status input.

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

    On / Off lamp with status input.

    Hello, first, excuse my English.
    I have a problem creating an event.
    To understand better, I created the circuit shown:
    Click image for larger version

Name:	Retroavisos recort.JPG
Views:	2
Size:	31.5 KB
ID:	1210371
    As you can see, it is based on Arduino.
    I have not put this post in Aduino because Arduino works well.

    The switches turn the light on and off, in any situation, even if Arduino, PC or HS fails.

    The relay turns the light on and off through HS commands. In this case the configuration of the device simply toggle on / off. It is configured as an output device in Arduino.

    Through the OPTO AC IN card HS is informed of the status of the lamp. Otherwise HS does not know or recognize the state of the lamp. The lamp is turned on or off by the relay or the switches and the opto-in card informs HS about the lamp status.

    I hope you understand the meaning of the circuit exposed.


    Now comes the problem:

    How do I make an event to turn the lamp on or off based on whether it is on or off?

    I created this event to turn off the light:

    Click image for larger version

Name:	Captura event.jpg
Views:	1
Size:	25.7 KB
ID:	1210372

    And this to turn on the light:

    Click image for larger version

Name:	Captura event on.jpg
Views:	1
Size:	25.8 KB
ID:	1210370

    "Exterior Jardi entrada Retro. jar. ent llum porta" is the input that report the status of the lamp.

    The one shot by another event, but the result is not expected. Whether the lamp is switched on or off, the event always changes its state.

    I hope you have understood the question and can help me.

    Sorry for my english (google traslation) ...

    #2
    Originally posted by ferran View Post
    The relay turns the light on and off through HS commands. In this case the configuration of the device simply toggle on / off. It is configured as an output device in Arduino.

    How do I make an event to turn the lamp on or off based on whether it is on or off?

    I created this event to turn off the light:
    And this to turn on the light:

    The one shot by another event, but the result is not expected. Whether the lamp is switched on or off, the event always changes its state.
    I hope you have understood the question and can help me.
    I think the translation is quire good except for the statement "The one shot by another event".

    Are you always triggering both events you posted? (That's what I think must be happening, and because the condition on one of them is always going to be true, the light gets toggled regardless of its initial state.)

    If not, how do you choose which of them to trigger?
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      Thanks for answering.
      I think the translation is quire good except for the statement "The one shot by another event".
      It has not been translated correctly.
      The two events are triggered by another event,is an event manually triggered.
      The On event is triggered by an event that turns on the garden lights at sunset.
      The Off event is triggered by an event that turns off the garden lights at a set time.

      Are you always triggering both events you posted? (That's what I think must be happening, and because the condition on one of them is always going to be true, the light gets toggled regardless of its initial state.)
      If you mean if the light turns on and off continuously, no, the triggered is manually (the first events created were not manually, my garden a disco light).

      If not, how do you choose which of them to trigger?
      This I do not understand, but it can have relation with the explained above.

      Gracias de nuevo.

      Comment


        #4
        Thank you for the clarification. I am now wondering about the events that trigger these events - the ones that turn the garden lights on and off. It is necessary to explicitly require that HS check the conditions on an event that is triggered by another event if you want those conditions to be honored. Do you have that option checked?

        If my answer is not clear, perhaps you could post a screen shot of the events that turn the garden lights on and off.
        Attached Files
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment


          #5
          Thanks for answering.
          The option is not checked.
          I'm not at home. Testing with myHs, I think it works!
          Tomorrow I will do more tests, I have to modify events.
          I'll tell you if it really is the solution.

          Thanks again.

          Comment


            #6
            Hello good day.
            Solved!
            It works perfect.
            Thank you very much for your help.

            Comment

            Working...
            X