Open Source Self-Hosted Home Assistant home automation with an interface to a Victron Solar System

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 มิ.ย. 2024
  • Home Assistant is an open source self-hosted home automation tool that puts local (not external cloud) control and privacy first. My system is running in a Docker container on a machine at home.
    Home Assistant is more than just the monitoring and managing of smart home switches and lights. It has powerful automation that can be triggered by all sorts of events or device states to notify you, or manage even solar systems, garage doors, and much more. For example, I have an automation that announces it has started to rain so we can get the washing off the line before it gets too wet.
    In this video I show what my HA dashboards look like, and how I managed to read lots of information via the universal Modbus TCP protocol from my Victron solar energy system, and to also write data back to the Victron system to change the battery minimum state of charge values from HA (or other registers).
    I have shared my config files on a Github page so that it is easier for others to replicate some of the same functionality (without spending 4+ hours like I did on a single value statement line).
    CHAPTERS:
    Intro 00:00
    Mobile App View 01:19
    Topics 05:10
    Terminology 06:43
    Dashboard Tour 10:11
    Solar Dashboard 15:38
    Entities drill down 19:18
    Update Victron Register 21:06
    Integrations 25:56
    GUI Card code 33:08
    Automations 35:57
    Troubleshoot value statements 39:55
    Modbus with Victron 44:16
    Probe Modbus register from terminal 47:57
    Github page 52:39
    Wrap Up 55:11
    Links:
    Home Assistant website: www.home-assistant.io/
    Victron overview of Modbus TCP: www.victronenergy.com/live/cc...
    My Home Assistant config files: github.com/Danie10/gadgeteerz...
    My Hosting at home video: • How I'm using open sou...
    My website, blog and social media links: gadgeteer.co.za
    #technology #homeassistant #smarthome #opensource #selfhosting
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 66

  • @GadgeteerZA
    @GadgeteerZA  9 หลายเดือนก่อน +3

    Victron changed the Modbus registers, so I have fixed this in the modbus.yaml file, and updated the code at github.com/Danie10/gadgeteerza-homeassistant

  • @ossugsa6876
    @ossugsa6876 ปีที่แล้ว +2

    So true that open source gives you local control and privacy over your hosting, as well as being able to see how it works!

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      Yes, key reasons why I love using open source software.

  • @kaupokeskula
    @kaupokeskula ปีที่แล้ว +2

    Thank you very much!!! This makes my new Victron setup and HA integration so much easier. The amount of "write" options is what makes Victron exceptional. All the possible automations with HA, just amazing. I am going to automate Multiplus II to charge when energy pool price (Nordpool) is low and next day weather forecast cloudy. Discharge (supply to grid) when pool price is high ... or something like that.

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      Yes it really helps with Victorian being so open and the real power of HA is exactly all those flexible automations you can set up. I can see it’s going to be a long and rewarding journey 😀

  • @mylesmacaulay
    @mylesmacaulay ปีที่แล้ว +1

    Amazing work! Just got my victron setup installed today and this helped. Keep it up! So very well explained.

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      Great to hear and glad it helped!

  • @carolynstephenson3736
    @carolynstephenson3736 ปีที่แล้ว

    Thank you for your excellent video and all the work! I have been looking for how to integrate the victron control panel into a card on the home assistant dashboard. This is the only one I have seen! Much appreciated... Thank You!

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว +1

      You are welcome! That is really the only reason why I do my videos - to help others, and then help myself a year later when I've forgotten how to do it ;-)

  • @TheRidDlerX44
    @TheRidDlerX44 9 หลายเดือนก่อน

    Baie dankie! This really made things a million times easier in getting my Victron up on HA

    • @GadgeteerZA
      @GadgeteerZA  9 หลายเดือนก่อน

      Plesier! I'm glad it could help.

  • @MrPeregrines
    @MrPeregrines ปีที่แล้ว

    Great content! Thank You!! (with your help i finally was able to automate my victron soc setpoints)

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว +1

      Glad the video could help you! Yes I've not yet had the guts to auto-change the minimum SOC based on the next days weather forecast. In South Africa it's also complicated by whether we're going to have load shedding, and whether that changes suddenly so I'm just being sure to keep a good 35% reserve right now.

  • @chipmeister111
    @chipmeister111 4 หลายเดือนก่อน

    This has been a really interesting video. The possibilities seem endless & really only limited to ones imagination. It's potentially a very powerful tool and I'm gonna have to give it a go so thanks so much for the detailed information.

    • @GadgeteerZA
      @GadgeteerZA  4 หลายเดือนก่อน

      It's a pleasure. Yes, HA has so many possibilities with not only the integrations, but protocols like MQTT open more new worlds. Shows again too why you want to choose to buy devices that can either be reflashed, or which support open protocols.

    • @chipmeister111
      @chipmeister111 4 หลายเดือนก่อน +1

      @@GadgeteerZA Yeah, i remember my first mp3 player in the early 2000's When everyone was buying ipods, i chose a Korean made iRiver H340 which you could flash a 3rd party rom to and take advantage of so many features that the stock ROM didn't offer. It was a great piece of gear and it has set the stage. That and buying hardware that i can repair myself are very important to me when purchasing items.
      Thanks again for the great info.

  • @lvdmerwe
    @lvdmerwe ปีที่แล้ว

    This looks like an awesome setup!

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      Thank you! Yes, certainly ongoing work as I'm tweaking stuff still, and trying not to bung the whole kitchen sink in.

  • @JMX246
    @JMX246 5 หลายเดือนก่อน

    very cool - thanks for posting

    • @GadgeteerZA
      @GadgeteerZA  5 หลายเดือนก่อน

      Glad you enjoyed it

  • @danielpatzer7148
    @danielpatzer7148 ปีที่แล้ว

    Awesome Work! Keep it up :)

  • @jacovanniekerk838
    @jacovanniekerk838 11 หลายเดือนก่อน

    I would like to say many thanks for the assistants. I have used some of your examples with my Victron Solar system.
    I am currently working on graphs to track historical data.
    Need to figure out why the new Home Assistant Energy dash board doesn't have the correct entity for the matching inputs.

    • @GadgeteerZA
      @GadgeteerZA  11 หลายเดือนก่อน

      Thanks for sharing that feedback. It does make it all worthwhile for me if the videos or shared code can help others. Yes, I did find that to isolate things sometimes meant lots and lots of twiddling with registers and settings. But to be honest, I also saw that Energy Dashboard was not showing everything. I suspect it has to do with declaring the entity as an energy entity. Energy Dashboard is scanning to see where that variable is declared in the entity creation. It could be that, combined with possibly also the numeric value type eg. it is looking for a kWh or a Volts entity.

  • @dimitrisp3214
    @dimitrisp3214 ปีที่แล้ว

    Great setup and quite informative video.Thank you Danie. VenusOS running at your server,
    would be also possible? (for further customization)

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว +1

      Thanks Dimitris! Yes fully possible, just the slave ID will likely differ for that device. In many cases, the general slave ID 100 will return many of the generic register data. Easiest way to test first, is just to run that mbpoll command and probe a few addresses. I just got the Time to Go on battery calculation gauge working, so may do a short video talking about just that. Just letting it settle for a day or two to make sure it's latest tweaks are correct.

  • @Michael-tl3zx
    @Michael-tl3zx ปีที่แล้ว

    Hello Danie! Thanks, that you share your knowledge with us! Could you please explain, how you integrated the remote console in the dashboard (or send a link, where this is explained)?

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว +2

      OK if you meant the Victron CCGX display - it is simply an HTML address (of the CCGX device on the LAN) embedded in an iFrame card. But you can have a look at the code I posted at github.com/Danie10/gadgeteerza-homeassistant/tree/main/ha-configs. The Lovelace file is all the UI code to display the cards.

  • @TheOzembuch
    @TheOzembuch ปีที่แล้ว

    I'd love to see your HAM dashboard, are you an operator? What do you use for your dashboard? Great job, thank you for posting this. (Ok, I got to that part later on 🙂 )

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      Yes I am, but I try so many things and keep moving onto something else ;-) I spend most of my time now assisting with HAMNET emergency comms and operate our local radio room for bulletins, and exercises with local authorities. I also operate an OpenWebRx system from home, which you can tune into remotely at openwebrx.gadgeteerza.co.za/ to listen in, as well as an APRS iGate.

  • @jacosmuts8818
    @jacosmuts8818 ปีที่แล้ว

    Good job Danie - have a look there are samples online to integrate into eskomsepush api

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      Ah thanks for that. That is a new one I think as the one I saw 2 months back was quite basic. I definately check it out.

  • @fibranijevidra
    @fibranijevidra 11 หลายเดือนก่อน

    Hi Danie, thank you for this fantastic video. I am new to the victron gear. Can you please tell me is there a point connecting Venus OS to HA if I am only using victron mppt charger with custom battery with ElectroDacus SBMS0, and I'm gonna use third party inverter.

    • @GadgeteerZA
      @GadgeteerZA  11 หลายเดือนก่อน +1

      It’s really about what you are able to connect to from HA. So the Venus obviously made a lot of connectivity available, but my battery for example has its own WiFi so it can be possible to read from it on its own. If your charge controller only has Bluetooth then you may need a Bluetooth dongle to see if you can connect to the solar charger. So focus on what has its own connectivity otherwise.

  • @GG-nt7jg
    @GG-nt7jg ปีที่แล้ว +1

    0 seconds ago
    Thank you Danie. Do you by chance know if there is any integration for electric fence Energizers from JVA or nemtek? I did a quick search but found nothing

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      Sorry no idea about electric fences but thing to look for is search with terms like MQTT or modbus which would indicate some form of comms or connectivity.

  • @tuju-
    @tuju- ปีที่แล้ว +1

    Have you used GX relays over modbus as coils? I can’t get them working. They do work if i just write unit register.

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      No I have not, just writing back to Minimum SoC so far. Check in the list of Victron register for Modbus whether that is a writable register. If it's read only it won't accept updates. Basically what I did for writing to Minimum SoC register, would be the same, except the register number (and maybe slave ID) is different.

  • @arnoldbailie5042
    @arnoldbailie5042 4 หลายเดือนก่อน +1

    Is it possible to load multiple victron systems onto home assistant (> 1 IP address)?

    • @GadgeteerZA
      @GadgeteerZA  4 หลายเดือนก่อน

      Yes, certainly as it is just a Modbus interface. I'd named mine victron and pointed to it's IP address as 192.168.1.205, but you could name a second device say victron2 and point to its IP address if that was 192.168.1.200. The sensors in the modbus.yaml file are grouped under the named modbus interface, so I'd then also think carefully about naming them a bit differently to differentiate e.g. not just Battery SOC if there are two Victron systems both with batteries in.
      ```
      - name: victron
      type: tcp
      delay: 0
      message_wait_milliseconds: 30
      timeout: 5
      retries: 3
      host: 192.168.1.205
      port: 502
      ```

  • @svrooyen
    @svrooyen ปีที่แล้ว +2

    How does the victron interface with the system. How does HA connect to VE.Direct

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว +2

      The various Victron devices such as inverter, smartsolar charger, etc interface via their VE-bus cable interfaces to a Victron CCGX, Cerbo GX or Venus GX device. That CCGX or Venus device is actually a small Linux PC with a display, Ethernet and VE.bus and VE.Direct ports. That webpage integration, I showed, is the CCGX display which can be seen with a web browser over the LAN by going to its IP address.
      So essentially the Modbus TCP protocol on HA is talking to the Modbus (or MQTT) that is being served by the CCGX. If the inverter or charge controller had its own Modbus or MQTT, then they could have spoken directly. One can otherwise try building your own CCGX device using a Raspberry Pi which a VE.Bus and / or VE.Direct hardware interface. So it's HA via Modbus/MQTT over LAN to Victron CCGX/Venus GX.

  • @JailBraik
    @JailBraik ปีที่แล้ว +1

    Hello, I have two MPPTs
    your config says that it only works with a mppt.
    How do I get two queried.
    Everything works for me but I can't see the MPPT´s.
    Thanks

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      I seem to recall that would be via the slave ID difference in number. So try checking how I suggested to see what devices are connected (around 47:35), and then you could address the second one. Within Home Assistant you get look at combining MPPT 1 and 2's register readings if you needed single totals.

  • @FurnitureFlippingRush
    @FurnitureFlippingRush ปีที่แล้ว

    🙌🏻✨

  • @Elites-asthetic
    @Elites-asthetic 10 หลายเดือนก่อน +1

    Ok I’m completely new to all this
    Have you got a video how to install everything and work home assistant
    From downloading the app
    Using a hub and what items you need?
    What I do have is a motorhome with wi fi and net gear router I have all Victron gear from solar to inverter and cerbo gx
    Can you use a cerbo instead of raspberry pi
    I have cameras in my van on blink I have wi fi lights I have echo dot Also the echo show
    I’m trying to get my head around what I need
    Thank you

    • @GadgeteerZA
      @GadgeteerZA  10 หลายเดือนก่อน +2

      Sorry, but that is probably the exact reason why I don't do install videos as there are just way too many different ways to do everything. I did mine on an Intel NUC running Debian Linux with Docker containers, and bit by bit over weeks I built it up.
      I think my Victron CCGX is like the Cerbo GX? So that Cerbo GX will have an IP address on your network, and you need to see how to enable the Modbus protocol on it (there is probably some TH-cam video about it). If there is no Modbus, it may have MQTT but then it will be a bit more different to mine.
      Basically you have Home Assistant running on something (no matter what) and connects to LAN and must see the Cerbo GX by IP address, to read from registers. My CCGX registers gave access to the info from solar, batteries, and more. But start with finding one register, and add from there. Hope this can help you a bit.
      The Victron forums online are also a good place to get contact with all sorts of different installations.

    • @Elites-asthetic
      @Elites-asthetic 10 หลายเดือนก่อน

      @@GadgeteerZA thanks for the reply
      So basically I need home assistant running on a laptop for the stance
      When it’s running you can then open the all
      Is that right
      I was thinking this was something totally different
      I plan to use just in the camper van so having a laptop running this home assistant I can’t do

    • @GadgeteerZA
      @GadgeteerZA  10 หลายเดือนก่อน +1

      The principle is that the Home Assistant can run on anything basically, but it needs to read Victron data live as those Victron registers are updating the whole time. Home Assistant can even run on a small Raspberry Pi and use little power. You'd use your laptop to log into the HA dashboard if it is running on the Pi. HA just polls and stores data, and displays it on webpages. You can view via a laptop, mobile phone, or anything with a browser.

    • @Elites-asthetic
      @Elites-asthetic 10 หลายเดือนก่อน +1

      @@GadgeteerZA ok now I get it so a rpi you can use for the instance of home assistant because the rpi is a mini computer
      Then you can have the app on the iphone to open home assistant and view dashboard the cerbo ccgx by Victron would be to read files to home assistant

    • @GadgeteerZA
      @GadgeteerZA  10 หลายเดือนก่อน +1

      Yes that's it. Watch a few "how to install Home Assistant" videos and they should give a feel of how it installs and what some of the options are. The HA can run on its on a rpi, but mine for example, is running in a Docker container on an Intel NUC. But I started out first on a rpi.

  • @ppi57
    @ppi57 ปีที่แล้ว +1

    Did I miss it somehow? Can you share how you embedded the CCGX page in to your Dashboard pls?

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      It was actually just embedded as a simple HTML web page using the IP address of the CCGX ;-) It's one of the standard HA modules.

    • @ppi57
      @ppi57 ปีที่แล้ว +1

      @@GadgeteerZA Thx Danie... but the page doesn't open for me when I try the Victron GX IP address(Wifi), and the Cerbo IP address (Wired LAN) sends me in to Node Red... its all so confusing to this old guy ;)

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      It will all depend on what the IP address is on your Victron unit. If you can open it, using your browser on your network, then it should work exactly the same. If it does not open with the browser, then the problem is not with the Home Assistant side at all. That embedded HTML page simply opens whatever IP address you specified, just the same as a browser would.

  • @tuju-
    @tuju- ปีที่แล้ว +1

    Why there isn’t Victron GX integration?

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว +1

      There is integration - my Color Control GX is a Victron GX device, and it is working 100% with Modbus as I described in the video. If Modbus is not an option of your one, you can also try MQTT but the setup would be different for MQTT. You may have to also activate either MQTT or Modbus on your Victron GX device before integration can happen. Best usually is to search for name of your Victron GX's model along with Modbus or MQTT, and there will be some description of how to get it activated.

    • @tuju-
      @tuju- ปีที่แล้ว

      @@GadgeteerZA I have Cerbo and like I said, writing registers works, changes the relay state. But modbus has coil type for stateful devices and I wont need to write another automation to switch it off. But coil type does not work. Does the CCGX have relays?

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว

      No my CCGX is just a Linux box with display and connection interfaces, so no relays. I seem to think my Victron Multiplus II has two relays but I've had no reason yet to use them for anything as my house's DB is connected to critical loads, and nothing connected to non-critical. I have bypass switches on the DB for oven, grid, etc.

    • @tuju-
      @tuju- ปีที่แล้ว +1

      @@GadgeteerZA inverter relays need inverter assistant. GX that has relays built in are directly accessible for manipulation via modbus. It just seems i’m the only one trying those,

    • @GadgeteerZA
      @GadgeteerZA  ปีที่แล้ว +1

      @@tuju- yes could be. Big thing though with Modbus is to make sure you have the register with the correct slave ID, as my ESS system can use salve 100 or it's own number, and each addressable device has it's own slave ID with a set of registers. But maybe also try the r/Victron community on Reddit.