Announcement

Collapse
No announcement yet.

Time triggered events

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

  • Time triggered events

    Is there a way to get fusion brain to check the computer time and trigger an event? Say At 8am trigger output 1 etc.

  • #2
    Originally posted by flyingmonkey350 View Post
    Is there a way to get fusion brain to check the computer time and trigger an event? Say At 8am trigger output 1 etc.
    Currently no. Time is relative in MDX. I can add it without too much problem though.

    So you want to be able to base if/then logical statements off of the current time correct? Easy enough. I will add it to the list of to-dos.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

    Comment


    • #3
      Time based Logic

      I am surprised this does not have this feature. There are many many uses for time based automation. Many things just need to be done at a certain time that are not based on specific environmental conditions.

      Another thing - can their be a random feature for the the ole' turn on the lights at a different time every night and other situations where some randomness is desired?

      Please do add time based logic/processing capabilities

      Thanks,

      Comment


      • #4
        Originally posted by bdlitzer View Post
        I am surprised this does not have this feature. There are many many uses for time based automation. Many things just need to be done at a certain time that are not based on specific environmental conditions.

        Another thing - can their be a random feature for the the ole' turn on the lights at a different time every night and other situations where some randomness is desired?

        Please do add time based logic/processing capabilities

        Thanks,
        I am adding Time. I will also add a random feature.

        I will be out this week though so it wont be until next week anything is updated.
        Fusion Brain Version 6 Released!
        1.9in x 2.9in -- 47mm x 73mm
        30 Digital Outputs -- Directly drive a relay
        15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
        Buy now in the MP3Car.com Store

        Comment


        • #5
          Thank you!
          GadgetBandit

          Comment


          • #6
            and when you incorporate time, could you post a piece of example code for us idiots?

            Thanks,
            GadgetBandit

            Comment


            • #7
              I'm almost done wiring my hydroponic project.

              button - on/off
              input0 - full switch
              ouput0 - pump
              output1 - drain value

              I need help. Books on XML haven't provided much except working with databases and the web. I need examples for looping and branching . . . and time. I'm monitoring light, temp, and humidity. I can turn on/off irrigaton, manually, but need values to go off automatically after 5 minutes or so.

              The hydronics is a stretch. I need to fill a tray, wait ~10 minutes, drain for 15 and repeat. This seems overwhelming and could really use help.

              Thanks,
              GadgetBandit

              Comment


              • #8
                Just a heads up, xml has nothing to do with the data encoding that MDX reads. XML is just the file format that MDX uses, nothing more nothing less.

                All the instructions are parsed out by MDX and interpretted by MDX. If you open the XML file in a web browser, it will just display the text of it since XML itself is just the format containing text, not a format containing programmatic instructions.

                The way MDX works is based on logic sections. So if you want to branch somewhere, you have a variable that gets set to some value based on some logic block. So your conditional statement then in the then-do section you change a variable to some value. Then in another logic block you do a conditional based off of that variable's value. Usually you dont need to branch though so I dont know what you need it for.

                As for looping that is easy but same principle. 1 variable increments every logic block. Then a block that does "if variable is greater than loop_max then reset variable to idle state or back to beginning" depending on if you want a loop finite or infinite. Then in a logic block you do "if variable is between x and y then do whatever" which is the inside part of the loop.

                Time is coming, I have been distracted lately with other side projects and uni. I am still trying to lay out a good foundation for the time triggered events. Such as when and how often. Say every hour, or every tuesday, or every 4th of the month, or every second millenia or something like that. I think what I came up with will work, it will just take some time coding in.
                Fusion Brain Version 6 Released!
                1.9in x 2.9in -- 47mm x 73mm
                30 Digital Outputs -- Directly drive a relay
                15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                Buy now in the MP3Car.com Store

                Comment


                • #9
                  Here is the beginning:

                  Fusion Brain Version 6 Released!
                  1.9in x 2.9in -- 47mm x 73mm
                  30 Digital Outputs -- Directly drive a relay
                  15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                  Buy now in the MP3Car.com Store

                  Comment


                  • #10
                    What is a realistic timeframe?

                    Thanks,
                    GadgetBandit

                    Comment


                    • #11
                      It is already in MDX. Not in the configurator. Probably wont be for a while.

                      But it is fully functional as far as I remember in MDX as of the late Feb. update.
                      Fusion Brain Version 6 Released!
                      1.9in x 2.9in -- 47mm x 73mm
                      30 Digital Outputs -- Directly drive a relay
                      15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                      Buy now in the MP3Car.com Store

                      Comment


                      • #12
                        The last post in feb said "here is a beginning."

                        How do I get to it? Have I missed a thread that discusses it?

                        GadgetBandit

                        Comment


                        • #13
                          It ain't a car. But the brain monitors my greenhouse and drives the hydroponics. It's a pain to run logic at 100 and try to count seconds. "Time" is important for 24 hour cycles. Please.

                          GadgetBandit

                          Comment


                          • #14
                            Sorry I missed replying, thought I had. Things have been hectic.

                            But it is in the current release, pretty sure it came just after I posted that post with the pic.

                            Here is the code:

                            Code:
                            /*
                                  <task id="Task Test" minimum_delta_vote_time="1000">
                                    <when year="XXXX" month="XX" day="01" hour="XX" minute="00" second="00" />
                                  </task>
                                  <task id="Task Test 2" minimum_delta_vote_time="1000">
                                    <when year="XXXX" month="XX" day="Thursday" hour="XX" minute="XX" second="00" />
                                  </task>
                            */
                            Fusion Brain Version 6 Released!
                            1.9in x 2.9in -- 47mm x 73mm
                            30 Digital Outputs -- Directly drive a relay
                            15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                            Buy now in the MP3Car.com Store

                            Comment


                            • #15
                              XX means dont care.

                              And day can be a day of the week as a string or a number.

                              Also numbers can have "X" in the spot anywhere in the number. So you could make the minute "X0" for it to fire every 10 minute tick and so on.
                              Fusion Brain Version 6 Released!
                              1.9in x 2.9in -- 47mm x 73mm
                              30 Digital Outputs -- Directly drive a relay
                              15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                              Buy now in the MP3Car.com Store

                              Comment

                              Working...
                              X