Announcement

Collapse
No announcement yet.

Integrating control systems with the OneControl platform and adding more components

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

  • Integrating control systems with the OneControl platform and adding more components

    So I am a serial tinkerer - a previous boss accused me of having a "terminal case of the what-if's". I am also a home automation enthusiast, so naturally when I got my 2021 Momentum 397THR, I looked at the OneControl system and said "Meh - my turn "

    So, for some background, here is how the OneControl system works, at a high-level, at least in my rig with the X4 controller. All the devices are connected to each other over a CANbus system - this is a way for devices to talk to each other over 12v connections. In the case of OneControl, it has sepersate power and CANbus connections, and these connections allow the different components to signal to each other. The touch panel is ultimately the "controller" if you will - so when you push the button on the screen, the touch screen interprets the touch as "Oh, you want me to tell this device to do that thing". I tried to insert myself into the CANbus, and interact at the hardware level - this would have been optimal since I would see everything, literally, that everyone was telling each other to do. I could, in theory, intercept messages and send different ones - but I ran into a hurdle - the CANbus protocol they are using is proprietary and does not comply with the RV-C standard (dammit). I quickly figured out that this would not exactly be the optimal path since I would spend a ton of time with no support.

    Well, there needs to be a way for the CANnbus system to talk to the internet, or the online OneControl system would not work - there needs to be a hardware-to-software bridge in there somewhere, and that was the next target., As it turn out, the device used to be the bridge between the CANbus network and the rest of the world is a piece of hardware running a read-only instance of OpenHab - an open-source automation platform, and it's API's are available for use on the network - SCORE.

    I use a platform called "Home Assistant" - a free, open-source home automation platform that is absolutely incredible. So, starting with a Raspberry Pi 4, I installed Ubuntu, and installed Home Assistant in a docker container. After basic setup, I added a basic 6 port, 5v netwok switch switch on top of the cabinets and tied into the OneControl network with the Pi. I added the "Node-Red" addon, and away we go.

    I built a Node-Red flow that connects to the OpenHab device and sync's the state of the devices on the OneContrrol system with a service on the Pi called MQTT. MQTT is sort of like a live database, and using this allowed me to tell Home Assistant what everything in the OneControl system was doing in real time. If you turn on the AC, it autonmatically shows in Home Assistant. Turn on a light, change a tank level, etc. So this allowed me to SEE what what was going on, so the next step was to tell OneControl to do my bidding - and with another Node-Red flow and the openHab API, I was able to send commands to OneControl. This created a two way sync - i do something on Home Assistant, it tells OneControl to do it. If I work on the OneControl panel (ugh) it tells home Assistant. YAY, I am THIS close to getting rid of the OneControl panel!

    Now that I have this working, now it is time to start building a way to interact with the system. And here lies an important "limitation" - my wife and family.

    For those in the automation hobby, there is a measure of success called "WAF", which stands for "Wife Acceptance Factor" (seriously). This is the measure of how much grief you are going to get if you don't do it right. Well, I have a wife that HATES technology, so everything I do has to be usable with physical switches, or other easy interfaces. Add to the fact that my youngest son has Down Syndrome, and you can see that usability for non-technical people is critical. Well, if you hadn't noticed, there are several switches that are small, and hard to find in the dark. Take the switches in the garage for instance - my son uses the garage as his "room". Look, I am 47 years old, and I can't find that damn switch in the dark. So, it was necessary to add extra control to these dumb switches. I picked up a few Shelly 1 remote relays, and installed them with the switches. Now you can flip the physical switch (WAF +10) OR use the automation system (WAF -10). You can see that it is a wash. I added to it, but didn't make it any easier (yet). How would I make it easier without having to run wiires? AH - Wireless (RF) switches After adding a Sonoff RF bridge, now Home Assistant can see the button press, and says "Ahh, I see that signal, turn on the garage light". BOOM. WAF +25. now I have a large external switch on the wall in the garage that is a touch pad-type, and it toggles the lights, and even we can find it in the dark. I ended up adding the relays to all the switches in the garage, giving me the ability to control them remotely at will.

    Hmm, I have an automation system, and now I can control all the lights outside - what can I do with that? A few things, actually. Specifically, I have Home Assistant turn on the porch light at dark, and off at dawn. Simple enough, right?

    Now that I have made it easier for my son to get into and out of his room, it dawned on me that he could easily leave his room from the side door in the garage, and I would never know. DOH!

    Well, I have this cool RF bridge thing now, what else can I do with it? Well, I picked up a few door contact sensors - now when he opens the door at night, the rear door porch light turns on (safety first) AND the light in the bedroom flashes (after 11pm) to let us know that we have an escape in progress. Damn, that works out pretty well

    Things are going pretty well, but it seems that folks forget that the nice new shower heads will fill the tanks FAST - so I need to figure out a way to keep the family from having it back up into the shower. Well, I get the tank levels in the automation system, but how do I let people know, since if they were paying attention they would have noticed it was getting full beforehand? Ahh, if there was only a way to have someone yell at my family without me actually having to be there. Oh wait, they are used to being scolded by Alexa at home, so let's add that at the camper too. Now, whever the tank level changes, it annoucnes it over the Alexa speakers in the RV. Only problem is, there is no speaker in the shower. OK, lets up the annoying-but-critically-important level and send a text message to everyone when the status changes. Cool, now when my family ignores Alexa, I can yell at them too

    Having the ability to scold my family remotely and by proxy is a pretty powerful thing, especially for us who grew up with strict parents. How better to annoy them, and anyone else that does not pay attention, than to have Alexa yell at them if they leave the door open too long? Challenge accepted - I built a flow in Node-Red that will pick from 7 different scoldings, such as:
    1: "What the hell! Close the door!",
    2: "Were you born in a barn? Close the door!",
    3: "Close the door dammit, I am not paying to heat the world",
    4: "You want to get eaten alive? Close the door, you're letting the bugs in.",
    5: "When I was your age, we got a beating for leaving the door open.",
    6: "That door isn't going to close itself you know.",
    7: "Get back over there and close the door"
    Now they can feel Dad's presence, even when I am not there

    Anyway, this is the beginning of the overview of the system I have built - this has been quite long but there is a ton more

    I started this thread because I have not seen anyone do this with OneControl yet,and was hoping to find others who would be interested in colaborating - sharing ideas, etc. i am workoing on putting this all on Github eventually, if there is enough interest. So if you are interested, please let me know what you would like to see, would like to add, any ideas - more to come soon!
    Last edited by howson; 08-02-2021, 08:13 AM. Reason: Spelling in title...
    ==============
    Grand Design RV National Owners’ Rally: http://www.gdrvnationalrally.com
    Grand Design RV Mid-Atlantic Owners’ Rally: http://www.gdmarally.com
    Current GDRV: 2023 Solitude 391-DLR, Midnight FBP
    Previous GDRV's: 2016 Solitude 375RE, 2021 Momentum 397TH-R
    No tow vehicle!

  • #2
    bob -- wow!

    A high-interest item on the forum is dimming lights turned on and off via Compass Connect. If you have any thoughts/ideas...

    I ordered a Pi from Amazon with a Starter book. Will take me a bit, but will enjoy tinkering with home automation stuf.
    Forum moderators are not GD employees--we are volunteers and owners presumably just like yourself. Unless specifically mentioned otherwise, we have nothing to gain should you choose to purchase a product or engage a service we discuss on this forum.

    2017 Ford F-350 DRW, '19 315RLTSPlus

    Comment


    • #3
      Originally posted by howson View Post
      bob -- wow!

      A high-interest item on the forum is dimming lights turned on and off via Compass Connect. If you have any thoughts/ideas...

      I ordered a Pi from Amazon with a Starter book. Will take me a bit, but will enjoy tinkering with home automation stuf.
      Check out Hubitat as well for Home Automation stuff. I've been real happy with it. Tons of stuff you can do with that little thing.
      Curtis, Christine, Cole, and Charlotte
      2007 Chevrolet Silverado Duramax LBZ, CCLB
      2020 Momentum 351M
      2004 Essex Vortex

      Comment


      • #4
        Originally posted by howson View Post
        bob -- wow!

        A high-interest item on the forum is dimming lights turned on and off via Compass Connect. If you have any thoughts/ideas...

        I ordered a Pi from Amazon with a Starter book. Will take me a bit, but will enjoy tinkering with home automation stuf.
        I would love to be able to help but I do not have a Compass Connect system - it will also depend on the type of hardware used (switches ve dimmers on the control boards)
        ==============
        Grand Design RV National Owners’ Rally: http://www.gdrvnationalrally.com
        Grand Design RV Mid-Atlantic Owners’ Rally: http://www.gdmarally.com
        Current GDRV: 2023 Solitude 391-DLR, Midnight FBP
        Previous GDRV's: 2016 Solitude 375RE, 2021 Momentum 397TH-R
        No tow vehicle!

        Comment


        • #5
          bob , I also posted in your previous thread where you were developing your automation system. I’m currently struggling with the J Gulick Pi software bridge, mostly because I know basically zilch about programming. I’ma hardware guy through and through, but I have a buddy trying to help me remotely. I’d love to chat about your setup, and check it out IRL if we’re in the same area some time. My wife and kids and full time in our 395MS, so getting the laggy LCI system working better is high on my list!

          cheers

          Josh

          Comment


          • #6
            Originally posted by Lightsnsiren79 View Post
            bob , I also posted in your previous thread where you were developing your automation system. I’m currently struggling with the J Gulick Pi software bridge, mostly because I know basically zilch about programming. I’ma hardware guy through and through, but I have a buddy trying to help me remotely. I’d love to chat about your setup, and check it out IRL if we’re in the same area some time. My wife and kids and full time in our 395MS, so getting the laggy LCI system working better is high on my list!

            cheers

            Josh
            Lightsnsiren79 let me know how I can help - I am working with another 397TH owner to get full integration with OneControl complete. We have just about everything working, just fine tuning the HVAC setpoints and the RGB accent lights, but pumps, tanks, lights, dimmers- they are all working now.

            I tried the Gulick Pi, but I found it had too many limitations, notably that it was not a n instant response - my interface is instant - when you chage something on one platform, it shows immediately on the other. Plus, if you have internet, you can access the system remotely in a number of different ways, even without a monthly fee (other than the internet cost)

            I have published the code to Github -https://github.com/rperciaccante/HA_OneControl - feedback, and collaboration, welcome!
            Attached Files
            ==============
            Grand Design RV National Owners’ Rally: http://www.gdrvnationalrally.com
            Grand Design RV Mid-Atlantic Owners’ Rally: http://www.gdmarally.com
            Current GDRV: 2023 Solitude 391-DLR, Midnight FBP
            Previous GDRV's: 2016 Solitude 375RE, 2021 Momentum 397TH-R
            No tow vehicle!

            Comment


            • #7
              Originally posted by OffToHavasu View Post

              Check out Hubitat as well for Home Automation stuff. I've been real happy with it. Tons of stuff you can do with that little thing.
              OffToHavasu in the Github link, I have a Node Red flow that syncs OneControl with MQTT, which should make integration with any platform possible.
              ==============
              Grand Design RV National Owners’ Rally: http://www.gdrvnationalrally.com
              Grand Design RV Mid-Atlantic Owners’ Rally: http://www.gdmarally.com
              Current GDRV: 2023 Solitude 391-DLR, Midnight FBP
              Previous GDRV's: 2016 Solitude 375RE, 2021 Momentum 397TH-R
              No tow vehicle!

              Comment


              • #8
                Originally posted by bob View Post

                Lightsnsiren79 let me know how I can help - I am working with another 397TH owner to get full integration with OneControl complete. We have just about everything working, just fine tuning the HVAC setpoints and the RGB accent lights, but pumps, tanks, lights, dimmers- they are all working now.
                Oh hey I resemble that remark! Lol.

                I'm going to have to work on the voice scolding, because that's golden (but with Google instead of Alexia), just need to add a variable for the 'heat the world' to verify if the heater /ac is on and send the appropriate message of that's the one that gets selected but that's easy enough, lol.

                Comment


                • #9
                  bob - thanks for what you've done here, it's exactly the kind of project I was looking for. I've loved Home Assistant, and I had our house pretty well controlled through it. We just moved ourselves into our new 2022 GD Momentum 397TH and I miss Home Assistant. I also really really hate the One Control setup - the panel is SOOOOOOO frustratingly slow and since I'm not using their wi-fi/cellular setup, I have to make my phone drop our network and join the MyRV wi-fi which is a real pain in the arse.

                  My goals are:
                  - Get the controller wired into my network
                  - Won't have to use the app to connect to other wi-fi
                  - remove OneControl router - free up wi-fi RF
                  - Get OneControl connected devices under HA alongside other smart devices - one pane of glass
                  - Have everything run on 12v

                  I wonder if you would mind answering a question though. I'd like to take out a piece or two of the LCI equipment if they're not needed. I assume that I really only need the controller/gateway box, it's just not clear to me which one that is. The router is obvious because of the wi-fi antennas, but it looks like that box also has cell antenna connections. That leaves me guessing as to what the other two are, though the one on top of the router has extra connections that make me think those are how it talks on the CANBUS. Is this the same equipment you have, and what did you do with any of it?

                  Click image for larger version  Name:	PXL_20211124_201132860.jpg Views:	83 Size:	51.7 KB ID:	71008
                  Click image for larger version  Name:	PXL_20211124_201143156.jpg Views:	71 Size:	72.0 KB ID:	71009
                  Click image for larger version  Name:	PXL_20211124_201153284.jpg Views:	71 Size:	67.5 KB ID:	71010
                  Click image for larger version  Name:	PXL_20211124_201321355.jpg Views:	71 Size:	68.8 KB ID:	71011
                  Click image for larger version  Name:	PXL_20211124_201345621.jpg Views:	71 Size:	74.5 KB ID:	71012

                  UPDATE:

                  I played around and determined that the only box you can remove is the router box (the one with the antennas attached). The other two are necessary. The one on the left is the OpenHAB box running on a Pi, the other on top of the router is the actual CanBUS gateway that OpenHAB appears to talk to.

                  I added a Peplink managed switch in this same space (wired into the 12V available here), created a VLAN for the OneControl boxes and the Home Assistant Raspberry Pi, and was able to plumb it all into my network. With this done, I'm able to open the OneControl app on my phone and it very quickly notices that it can talk to everything (without having to connect to the MYRV wi-fi - it doesn't exist anymore anyway). The intent will be to mostly use Home Assistant - but for any of the devices that don't work via HA, we still have access to the OneControl app so that the ridiculously slow panel doesn't have to be used. **Important Note*** all of the IPs are static, I set my router's IP for this VLAN to be the same that I found.
                  • CanBUS / Cellular gateway box: 192.168.1.1
                  • Router: 192.168.1.2
                  • OpenHAB box: 192.168.1.4

                  On a not really related note - Up next I will be moving my Peplink router to this space and wire it into 12V so that I have a full network and HA controlling the OneControl stuff when off shore power (no inverter as of yet, and would still like to have it all on 12v anyway).
                  Last edited by RoadKill; 12-08-2021, 10:14 AM.

                  Comment


                  • #10
                    I'm also suffering from a lack of knowledge of MQTT and Node-Red it seems. For now I just plugged the Pi into the LCI router. I'm able to ping 192.168.1.1, 192.168.1.2, 192.168.1.4. I see that there is a "ConnectAnywhere" setup page at http://192.168.1.2/ and OpenHAB at http://192.168.1.4:8080. I played around with the SwaggerUI on OpenHAB and can see the list of my devices at /things. On the Node Red side, I imported both of your flows from the github repo. I saw in the variables of the "Initialze" flow that it should write the .CSV to /config/packages/OneControl/OneControl_Components.csv, but I'm not finding it there (using HassOS and connected via ssh). On the "Monitor" flow, it shows connected to the expected points - Events (I see this has the OpenHAB api URL in it), and MQTT (sending and listening). I "Deploy"ed everything. I ran both of the triggers in the "Initialize" flow.

                    Click image for larger version  Name:	Screen Shot 2021-11-30 at 6.18.29 AM.png Views:	0 Size:	553.2 KB ID:	71333

                    What I"m struggling with is that I don't seem to have a way to verify if anything is making its way over to MQTT. I used your FloodLight example, verified the ID that I found via API call via Swagger shown as "UID", and put all the things into YAML. I'm still seeing the FloodLight as Unavailable in HomeAssistant.

                    Click image for larger version  Name:	Screen Shot 2021-11-30 at 6.24.03 AM.png Views:	0 Size:	105.5 KB ID:	71334

                    Any thoughts on how to troubleshoot?
                    Last edited by RoadKill; 11-30-2021, 06:44 AM.

                    Comment


                    • #11
                      Just as I wrote that out, I remembered seeing the "Listen to Topic" option in the MQTT integration config. I set to listen to smarthome/# and I can see constant updates for all my devices... so I probably have something messed up in my YAML - that's good news (maybe). I'll keep plugging along here.

                      Comment


                      • #12
                        Ah, success - I just added my tanks and kitchen light, and they are all showing as available, giving readings, and I can control the light from HA. So now I assume it's just a matter of manually adding each device in YAML - though I'll have to figure out the specifics on any device types with no examples (switch vs. dimmer for example).

                        This is awesome though. Nice work!

                        Click image for larger version

Name:	Screen Shot 2021-11-30 at 7.41.08 AM.png
Views:	1124
Size:	29.6 KB
ID:	71346

                        Click image for larger version  Name:	Screen Shot 2021-11-30 at 7.05.43 AM.png Views:	0 Size:	43.1 KB ID:	71340
                        Last edited by RoadKill; 11-30-2021, 07:41 AM.

                        Comment


                        • #13
                          RoadKill Sorry dude, I just saw that you had responded with questions - I apologize for leaving you hanging!

                          If you are on FB, and I know a lot of folks here are not, there is another gentleman (SergeantBort) I am working with who is in the same boat as we are - tech savvy, Home Assistant user, with OneControl and a penchant for abusing technology until it screams mercy

                          As for your comments above:
                          1. I have not used the OneControl app or the OneControl panel in almost a year except for the temp settings (see #4 below). I have a tablet on the counter running Fully Kiosk that I use to run everything that has a dock, so I can take it wherever I want, plus I use the web interface. I only use the OneControl app for the leveling (and Ihave no intentions of messing with that - i dont travel much since I am stationary, and I don't trust being away from the rig and havinh physical controls that decide not to behave....
                          2. I replaced my LCI wireless router with a Pepwave BR1 Mini, which is connected to the cellular antenna up on the roof. Works PHENOMENALLY well. I just added a screenshot of my HA dashboard that I took from Raleigh NC and the camper is in DE...
                          3. If you could send me a copy of your component list (OneControl_Components.csv), that would be huge. I am not familiar with the naming conventions other than my own - I assume that each installation has its own unique ID's. One I get a good feel for it, I will make a NodeRed flow that will automatically create the YAML files so you don't need to hand edit them. Since I keep refining mine, it might be a while until the dust settles enough for this to be possible, MQTT auto discovery is a little longer down the road.
                          4. *** There is a bug in the HVAC and RGB configs ***. I am working with SergeantBort to figure out what is going on with the configs there. I think it is in the MQTT/HTTP API flows in Node Red. The HVAC integration works with mode (heat/cool/off) but setting the temp is not working quite right. The RGB lights (accents) are being a pain with the light level 0 and off settings, but havent been at the rig long enough recently to troubleshoot them....
                          5. To keep the display clean, use the "Entity Filter Card" on your main display - this will hide things unless a condition exists - like an open door, etc.
                          Sorry for the lag - I will keep an eye out and see what I can help with!

                          Bob
                          Attached Files
                          Last edited by bob; 11-30-2021, 08:22 AM.
                          ==============
                          Grand Design RV National Owners’ Rally: http://www.gdrvnationalrally.com
                          Grand Design RV Mid-Atlantic Owners’ Rally: http://www.gdmarally.com
                          Current GDRV: 2023 Solitude 391-DLR, Midnight FBP
                          Previous GDRV's: 2016 Solitude 375RE, 2021 Momentum 397TH-R
                          No tow vehicle!

                          Comment


                          • #14
                            Well, now you've done it I went down the rathole of making the system use MQTT discovery - so far it seems to be working. This will eliminate the need for you to have to create all those complex YAML files. It also removes the need for you to know all the Node/Channel UID's since they all roll up into the MQTT Discovery process.

                            Hope to work through the rest of the sensors to configure the auto discovery, and then the Node Red flows that support it. The real issue is that info we get from the events feed does not contain the channel information we need for auto-discovery
                            Click image for larger version  Name:	2021-11-30 12_00_38-Node-RED - Home Assistant — Mozilla Firefox.png Views:	0 Size:	19.0 KB ID:	71397 Click image for larger version

Name:	2021-11-30 13_09_53-Configuration - Home Assistant — Mozilla Firefox.png
Views:	1080
Size:	65.1 KB
ID:	71404
                            Attached Files
                            Last edited by bob; 11-30-2021, 01:11 PM.
                            ==============
                            Grand Design RV National Owners’ Rally: http://www.gdrvnationalrally.com
                            Grand Design RV Mid-Atlantic Owners’ Rally: http://www.gdmarally.com
                            Current GDRV: 2023 Solitude 391-DLR, Midnight FBP
                            Previous GDRV's: 2016 Solitude 375RE, 2021 Momentum 397TH-R
                            No tow vehicle!

                            Comment


                            • #15
                              No worries, and thanks for the info. I'm going to bang away at it for a bit so I'll have better questions to ask. The auto-discovery sounds way better if it can work (I'm not a big fan of manually creating stuff). I was never able to find the .CSV - I think it's because I'm using HassOS and everything is containers. I think the SSH add-on only gives access to the /config for Home Assistant and the flow that creates the .CSV probably writes to the /config for the Node-Red container.

                              Comment

                              Working...
                              X