TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Command format on Raspi

    Raspberry Pi
    3
    32
    2.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Steve PorterS
      Steve Porter @Steve Porter
      last edited by

      @steve-porter Just realized that "Alexa, Turn off living Room Fan" also turns the fan ON......another Hmmmmmm.....

      tuicemenT 1 Reply Last reply Reply Quote 0
      • tuicemenT
        tuicemen @Steve Porter
        last edited by

        @steve-porter you only have a year on me I'm still learning too.
        I find I have to go through my TRIGGER calls and scripts a couple of times to catch my typos. I seem to have more of them lately 😞
        The Script route really is the best route.
        I've read several posts on other Home Automation sites complaining about mochad not working correctly for them. It was one reason I chose not to use that Home Automation software.
        Mochad was originally created for the North American market and it seems like that maybe why some users have problems though I think it is mainly the RF side of it.
        Are you using mochad as a addon for another Home Automation software?
        What X10 hardware are you interfaceing with?

        Steve PorterS 1 Reply Last reply Reply Quote 0
        • Steve PorterS
          Steve Porter @tuicemen
          last edited by

          @tuicemen I'm mostly now using smart plugs and light bulbs via WiFi but still have a bunch of X10 stuff. My pool light and waterfall both have 220v X10 modules, and the smart plugs won't work with fan motors. And for my house ceiling fans I installed X10 "relay" switches cause they're way cheaper than the smart switches that would work.

          I moved all the X10 stuff from my Windows Desktop to the Raspi. Mochad wouldn't compile without a bunch of errors, which is why I modified it. The version I started with was mochad-0.1.17. I've heard rumblings of a mochad-0.1.19 version floating around somewhere, so I'm bumping this one to mochad-0.1.21 just to be sure. Mochad recognized my X10 CM15a with no problem. That's the same hardware I was using with my Windows installation for years.

          I'm going to be setting up the script stuff you and Russ pointed my towards today.

          Cheers

          (P.S: I'm in California, what region are you?)

          tuicemenT 1 Reply Last reply Reply Quote 0
          • tuicemenT
            tuicemen @Steve Porter
            last edited by

            @steve-porter I'm in Ontario Canada.
            My setup is still mostly x10 though I have wemo, zwave, sonoff modules (WiFi), mylight (rf & wifi), Broadlink RM (for IR and some RF ) I've integrated most of my setup with HomeGenie so I can control it all from anywhere, schedule things and view status of things and my cameras. I move my stuff from windows to the PI mainly due to my off grid place so I could reduce power consumption of a PC Running.
            I actually moded a CM15A so a PI zero W fits inside.
            https://forums.x10.com/index.php?topic=30322.0
            I did this mod to 3 different CM15As all are running HomeGenie.
            One I added a hat to give me extra USB ports and I'm thinking of upgrading that one pi to the ZeroW2.

            Steve PorterS 1 Reply Last reply Reply Quote 0
            • Steve PorterS
              Steve Porter @tuicemen
              last edited by

              @tuicemen Oh, SWEET! 😎 So sounds as if this was a consulting gig for someone else? Very nice!

              tuicemenT 1 Reply Last reply Reply Quote 0
              • tuicemenT
                tuicemen @Steve Porter
                last edited by

                @steve-porter said in Command format on Raspi:

                Oh, SWEET! 😎 So sounds as if this was a consulting gig for someone else? Very nice!

                No, not really. I did create a CM15A Pi combo for the new owners of X10 (Authinix) mainly to show the CM15A could be upgraded as a Pro option to their limited WiFi Module(WM100).
                The other two were for myself. I do know of a few others that created these combos for their CM15As based of my shared info.

                Steve PorterS 1 Reply Last reply Reply Quote 0
                • Steve PorterS
                  Steve Porter @tuicemen
                  last edited by

                  @tuicemen Got it all working tonight. YAY! Thanks again guys. Just to get it all in one place, here's what works for me:

                  /root/.TRIGGERcmdData/commands.json
                  [
                  {"trigger":"Living Room Fan","command":"/home/pi/scripts/X10.sh i6","ground":"background","voice":"Living Room Fan","allowParams": "true"},
                  ]

                  (duplicated for each X10 house unit, i.e. i6, i5, etc.)

                  Script:
                  "/home/pi/scripts/X10.sh i6"

                  echo "pl $1 $2" | nc -w 1 localhost 1099
                  echo "sent powerline command $1 $2 to mochad"

                  Even with you guys' help this was a bit of a pain. This really should all be put into a simple install guide. But, it works great!

                  Cheers!

                  Steve PorterS 2 Replies Last reply Reply Quote 1
                  • Steve PorterS
                    Steve Porter @Steve Porter
                    last edited by

                    @steve-porter Oops,
                    "home/pi/scripts/X10.sh"

                    tuicemenT 1 Reply Last reply Reply Quote 0
                    • tuicemenT
                      tuicemen @Steve Porter
                      last edited by

                      @steve-porter glad to see you have it all setup and working.
                      setup is a bit of a pain for new users especially with a large number of devices possible in a X10 setup.
                      A setup wizard sure would help even for me just adding one new device once in a while.

                      1 Reply Last reply Reply Quote 0
                      • tuicemenT tuicemen moved this topic from Instructions on
                      • Steve PorterS
                        Steve Porter @Steve Porter
                        last edited by Steve Porter

                        @steve-porter Actually, I just noticed in my example .json command I left a comma in at the end of the line. That'll be a gotcha. The LAST command line in that file can not have a comma, it won't tell you that, it'll just not update the .json file.

                        tuicemenT 1 Reply Last reply Reply Quote 0
                        • tuicemenT
                          tuicemen @Steve Porter
                          last edited by

                          @steve-porter yep that will mess things up. I remember reading another post about that so that isn't something that you alone have experienced. I found a couple times the file didn't update for me for different errors in command lines.
                          I've gotten into the habit of double checking if it saves.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post