Jaco De Jongh Posted September 4, 2016 Share Posted September 4, 2016 Hi, I am looking for Linux packages for Blue Mppt's and BMV 702 and VE-direct. I want to monitor both of them from a LInux Machine. Blue mention some open source projects on their site, but i cant seem to find the correct names or anything to download. Someone with some ideas or directions? cvzyl 1 Quote Link to comment Share on other sites More sharing options...
___ Posted September 4, 2016 Share Posted September 4, 2016 Three options. The one is to install the Debian/Raspian packages. Follow the instructions here: https://github.com/victronenergy/venus/wiki/Installing-Venus-packages-on-a-Raspberry-Pi That's for Raspbian (for the Raspberry Pi) but there are packages available for Debian derivatives too. Second option, run the official Venus build for The Raspberry Pi, here: https://github.com/victronenergy/venus/wiki/Raspberry-Pi-user-instructions Third option. I can build vedirect_interface (the sofware you need) for your platform. I cannot give source code access as this bit is still closed for now. What's your target platform? Edit: In case you haven't figured it out yet, I'm the guy who wrote both those documents and who ported Venus to the Rpi :-) Jaco De Jongh 1 Quote Link to comment Share on other sites More sharing options...
Jaco De Jongh Posted September 5, 2016 Author Share Posted September 5, 2016 10 hours ago, plonkster said: What's your target platform? @plonkster. To be honest, I know to little about Linux to answer your question. I just recently had to much problems with windows related machines and Microsoft's way of thinking with the Windows 10 Supporting DRM and spying on you continuously. That made me look at Linux. I have already changed 2 of my PC's to Linux Mint 18 and like what I see. I could get SolarPower to run in Linux and want to try to do the same with Blue equipment. I still monitor my Inverters with a laptop and the laptop will be a duel OS machine. I still use a few different Configuration tools for different Alarm systems ext that is only available for Windows, I am just finding out what i can run from Linux. I would prefer using Linux for all solar related equipment, and don't mind switching to to windows when i want to work on the alarms ext. I am intrigued by what you guys do with the PI's and ordered mine. With the help of a friend I made on this forum and the internet i want to learn some coding and see if i can do my own version of a KWH meter for my specific setup, looking at true values before and after my 2 inverters on the AC and PV side .I am happy with the 702 readings on the battery side, proved them to be correct. I don't fully trust the readings on the inverters, as I have seen some readings not corresponding with actual measurements. This is just the beginning, I still have a very long way to go from understanding the PI and open source concept to implementing my plan. Hope you understand where I am standing in all this, I am still looking at the mountain that you guys are standing on. SilverNodashi 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 5, 2016 Share Posted September 5, 2016 Jaco, if you are going Victron data reading, using a Pi and want to learn, Plonkster is the man to take you there. Quote Link to comment Share on other sites More sharing options...
___ Posted September 5, 2016 Share Posted September 5, 2016 Okay... I forget that not everyone speaks the lingo :-) Platform is a combination of the hardware and software. So my platform might be Debian Linux 8.5 (the OS) running on x86-64 (PC, 64-bit). That would be one example. Or it might be arm7 (the ARM chip, completely different architecture to PC, that's in the Raspberry Pi 2) or arm8 (Raspberry Pi 3), or the ARM Cortex processors which I believe are also v7 (used in the Beaglebone Black). So when I ask your platform, I basically want to know what hardware and what Linux distribution. Because if it is Debian linux (or a derivative, such as Ubuntu or Mint) then you can use the packages provided by Victron, and if it is not (eg SuSe, Redhat, etc) then I might be able to build you a binary (aka compiled version without source) using a virtual machine. Second, how it works. On most linux distributions there is a IPC mechanism called DBUS. More lingo. IPC == Inter Process Communication. Other examples would be things like CORBA. That's how one program tells another about something interesting. All the Victron components talk to each other using DBUS. Luckily most linux distros already have that, so you're sorted. Just mentioning this (and glossing over a bunch of other things for now) so you know how it fits together. When you run the vedirect_interface software, it talks to a device on a serial port, and the information it reads is published on DBUS where any other process can get at it. So all you need to do to get the information is query DBUS, or write something that sits there receiving the information. For example, you could look at this, a small bit of software we wrote to look at a value published by a BMS (battery management system, something you find in Lithium Ion packs) and shut off the MPPT when the BMS says it's had its fill. If you're already getting the Rpi though, this might be your best bet, as that is where I'm spending the most time: Porting to the Pi. Just running the official testing port of Venus might be the way to go then. But it is up to you, I'll try to help you out either way... :-) Also, you should join the Venus mailing list if you want to be kept up to date or read what others are doing. Jaco De Jongh 1 Quote Link to comment Share on other sites More sharing options...
___ Posted September 5, 2016 Share Posted September 5, 2016 Oh, and as an aside, the new version of Venus has MQTT included, and the information on dbus is re-sent using MQTT. So you could have a Raspberry Pi doing its thing in the garage (next to the inverter, wherever that is) while running something different on another computer in the house, using MQTT to get the information. MQTT is another messaging platform, but it's a little lighter (read: it does less) than dbus and is more widely supported (on windows for example). Quote Link to comment Share on other sites More sharing options...
Jaco De Jongh Posted September 5, 2016 Author Share Posted September 5, 2016 @plonkster Thanks for the explanation, got a clearer picture now of what can and should happen. I am just busy loading the laptop with a virtual box to run mint and windows on the same machine. Once all the updates has been done and i am happy with the operation, i will pick your brain again. 13 hours ago, The Terrible Triplett said: Plonkster is the man to take you there. @The Terrible Triplett, i will keep that in mind. Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted September 6, 2016 Share Posted September 6, 2016 23 hours ago, plonkster said: Okay... I forget that not everyone speaks the lingo :-) Platform is a combination of the hardware and software. So my platform might be Debian Linux 8.5 (the OS) running on x86-64 (PC, 64-bit). That would be one example. Or it might be arm7 (the ARM chip, completely different architecture to PC, that's in the Raspberry Pi 2) or arm8 (Raspberry Pi 3), or the ARM Cortex processors which I believe are also v7 (used in the Beaglebone Black). So when I ask your platform, I basically want to know what hardware and what Linux distribution. Because if it is Debian linux (or a derivative, such as Ubuntu or Mint) then you can use the packages provided by Victron, and if it is not (eg SuSe, Redhat, etc) then I might be able to build you a binary (aka compiled version without source) using a virtual machine. Second, how it works. On most linux distributions there is a IPC mechanism called DBUS. More lingo. IPC == Inter Process Communication. Other examples would be things like CORBA. That's how one program tells another about something interesting. All the Victron components talk to each other using DBUS. Luckily most linux distros already have that, so you're sorted. Just mentioning this (and glossing over a bunch of other things for now) so you know how it fits together. When you run the vedirect_interface software, it talks to a device on a serial port, and the information it reads is published on DBUS where any other process can get at it. So all you need to do to get the information is query DBUS, or write something that sits there receiving the information. For example, you could look at this, a small bit of software we wrote to look at a value published by a BMS (battery management system, something you find in Lithium Ion packs) and shut off the MPPT when the BMS says it's had its fill. If you're already getting the Rpi though, this might be your best bet, as that is where I'm spending the most time: Porting to the Pi. Just running the official testing port of Venus might be the way to go then. But it is up to you, I'll try to help you out either way... :-) Also, you should join the Venus mailing list if you want to be kept up to date or read what others are doing. Doesn't the OS interface between the CPU (MCU?) and the code you would write for such a purpose? I.e. if you write in C++ / PERL / Python / etc, it shouldn't matter too much, or at all since you're not accessing direct hardware features? The compiler being used should take care of the underlying hardware, is that not so? Quote Link to comment Share on other sites More sharing options...
___ Posted September 6, 2016 Share Posted September 6, 2016 1 hour ago, SilverNodashi said: Doesn't the OS interface between the CPU (MCU?) and the code you would write for such a purpose? I.e. if you write in C++ / PERL / Python / etc, it shouldn't matter too much, or at all since you're not accessing direct hardware features? The compiler being used should take care of the underlying hardware, is that not so? Yes, there will be some platforms it won't work for, and there will be others where it's almost no work at all because Linux already works on that platform and you have serial ports and/or usb. So it probably won't work on anything with a MIPS R10K (I wonder if that is even still in use anywhere), but it will work on almost all ARM platforms that are powerful enough, because the compiler sorts it out. Direct hardware features: Many of these small-board computers come with some hardware (canbus, TTL serial, GPIO pins). For example: 1. The original CCGX is based on a Texas Instrument development board with such on board TTL-level serial ports and GPIO pins. One of those serial ports is wired directly to a MK2 serial chip (basically, a PIC microcontroller that interfaces with vebus), and one of the GPIO pins is wired in such a way that it can cycle the power to the MK2 to reset it. I'll add more below on why that is important. 2. On the Beaglebone Black Victron went to some effort to map the the available serial ports and CAN ports. The BBB has two (!) CAN ports, so in that respect it might even be preferred in some setups. They developed a Cape (BBB speak for a shield, an expansion board) that makes those connections available so you can use the same cabling as for the CCGX. It also contains a MK3 chip for talking to vebus. The cape isn't yet generally available, just mentioning this so you know where it is going. 3. On the Raspberry Pi, there is one serial port on the header. You could use that to link directly to a vedirect capable device (BMV or MPPT) but that's totally up to you (and you lose galvanic isolation unless you make your own). No hardware will be made for the Rpi. In the software (so far) that serial port is used as a boot console and there is a terminal running there where you can log in. The idea is that you will use USB hardware to connect your devices, aka an MK3-USB and VeDirect-USB cables. Since the Rpi has many more USB connections than the BBB, that's a perfectly good compromise I think. 4. Possible support for other boards: It would be very easy to port to other ARM boards, eg some of the development boards made by SGS Thompson with ARM Cortex processors, the Beaglonebone Green, Orange Pi or Pi Zero. I don't see much point as the cost difference will be dwarved by the time you spend developing it. Now some notes on the mk2/mk3. The mk2 has a firmware update issue. It needs to be power-cycled during the upgrade. This is no problem on the CCGX, since it has a hardware line it can use to power-cycle the built-in mk2. It is also no problem on the BBB, because the cape contains the new mk3 chip that does not have this problem (firmware updates don't require a power cycle). But it is a problem with the Raspberry Pi and potentially any other boards, and for that reason the mk2 (though it will work with a little legwork) is not officially supported, and we're really all waiting for the mk3 to land. Estimated date was end August... in other words.. RSN (real soon now). :-) Quote Link to comment Share on other sites More sharing options...
___ Posted September 6, 2016 Share Posted September 6, 2016 Mmmmh, I wonder how much those knock-off Dreamboxes from China are. They have USB. They run OpenEmbedded Linux (MIPS processor). They are usually very nicely put together... the only thing about them is they steal the bootloader from the original developer and that causes all sorts of problems due to the pirate nature. What it needs is an opensource bootloader. Sure, the DVB bit won't work, but if it is cheap enough... who cares! :-) Quote Link to comment Share on other sites More sharing options...
ebrsa Posted October 22, 2016 Share Posted October 22, 2016 Jaco de Jongh I agree with you that Windows is a pain but I also have to run a Win 10 PC running BlueIris to monitor CCTV that we as a residents association installed in our village of some 1200 people. It uses a huge amount of computing power so the CPU is an AMD 8 core. However since some software is only available for Windows, perhaps you could install Virtualbox from virtualbox.org and use Windows virtual machines on your Linux boxes until a more elegant solution is found. Some years ago I persuaded a friend who was a draughtsman in the village to run his Windows software on a Windows VM on Ubuntu. That was the end of his system crashes and he thought the VM was faster than the real machine. Jaco De Jongh and ___ 2 Quote Link to comment Share on other sites More sharing options...
___ Posted October 22, 2016 Share Posted October 22, 2016 13 minutes ago, ebrsa said: That was the end of his system crashes Virtualbox with the snapshot capability... for that alone it's worth it running Windows in a VM. Always. Virus? Ransomware? Deleted file by accident? No problem, just roll back to the snapshot. Using CoW (Copy on Write), it's very space-efficient too. Jaco De Jongh and SilverNodashi 2 Quote Link to comment Share on other sites More sharing options...
Jaco De Jongh Posted October 28, 2016 Author Share Posted October 28, 2016 @ebrsa, thanks following that route now. @plonkster, is Co W your best pick? Being a first time Linux user, I struggle getting Windows in the VB, what is the best way to install it in the box? maybe just a link to a nice linux learning/teaching site/forum would do, still a lot to learn, and tired of the 1000 different opinions and options on the net. Quote Link to comment Share on other sites More sharing options...
___ Posted October 28, 2016 Share Posted October 28, 2016 CoW (Copy On Write) is a method by which you make copies of large files or entire disks without actually making a copy. Whenever you change something, it copies specifically that part that you're changing to a separate area and then they change the copy. The idea is that all the files you never change gets used from the original copy and only the changes you make takes up extra space. Rolling back to the original is as simple as discarding the copied bits. So I'm not sure what you mean asking if this is my best pick. I suspect you thought it was a Linux distribution. I pretty much use Ubuntu on the desktop. Mildly modified by uninstalling a few irritants, but stock standard after that. Install Virtualbox and you're good. Quote Link to comment Share on other sites More sharing options...
Jaco De Jongh Posted October 28, 2016 Author Share Posted October 28, 2016 Plonkster, I saw that there is a couple of ways to set up the VB, one of the options was Co W. But by your answer I can gather that you see that option as the best option. That was actually what I tried to ask. Sent from my SM-N910F using Tapatalk Quote Link to comment Share on other sites More sharing options...
___ Posted October 28, 2016 Share Posted October 28, 2016 1 hour ago, Jaco de Jongh said: Plonkster, I saw that there is a couple of ways to set up the VB, one of the options was Co W. But by your answer I can gather that you see that option as the best option. That was actually what I tried to ask. Sent from my SM-N910F using Tapatalk Ok! Sorry, didn't get that. Yes, CoW combined with sparse files are the way to go. Sparse files, another thing Windows got support for in 2000, at least 8 years after almost anything else (BSD probably got support in the 80s, though I'm having trouble finding info on that), and to this day not particularly brilliant. A sparse file for a disk image means you only actually use as much space as is presently used for data. SilverNodashi and Jaco De Jongh 2 Quote Link to comment Share on other sites More sharing options...
Charles_Gibbs Posted May 22, 2018 Share Posted May 22, 2018 Hi All. Sorry to ask here, and I know this post is a couple of years old BUT..... I posted some thing in my profile setup thing and obviously I fluffed something up....... Having that out of the way, I am faceing the same dilema as Jaco de Jong, I have reached the point that I want to say cheers to windows, I am a total noob when it comes to Linux but looks like I do not have a choice, I have had my solar setup now for roughly 5 years and alot of it is Victron. Is there a way in which I can run the Victon VE Connect and Victron Connect app on linux, I do see that Plonkster an Jaco talked about it but see no conclusion, was there ever any headway made on that topic? I have it seems been able to get a blog up for that so if someone can help that would be great. Regards Charles from Namibia Quote Link to comment Share on other sites More sharing options...
___ Posted May 22, 2018 Share Posted May 22, 2018 Hi Charles, Nice to see another Namibian here (at least by birth in my case). Someone on the Venus development list noted that he had some success with Wine. The software itself doesn't use any fancy components and pretty common libraries so there is a good chance it will work on Wine. Personally I just downloaded a Windows Virtual machine (Microsoft makes it available for website testing) and I use that with VirtualBox. Don't really have the time to mess with this anymore :-) Side note: On the Venus list, someone else than expressed the desire to run Wine on a Raspberry Pi, to which I unfortunately had to point out that Wine only implements the missing w32 system calls for Linux (it is not an emulator), the actual code itself runs unmodified and needs to be compiled for the processor in question. In other words, when you run wine on an ARM processor, it can only run windows for ARM binaries :-) There is also a feature in the new candidate release that allows you to upload the configuration to the inverter using vrm and a ccgx. You still need to use veconfigure to edit it though. Quote Link to comment Share on other sites More sharing options...
Charles_Gibbs Posted May 22, 2018 Share Posted May 22, 2018 @plonkster Thanks for the quick response. Yeah! I'm a born and bred VP (Vaal Pens) So blou tot die dag wat ek vrek! Because I am not a draad sitter........ Poor me I know! So I can run Linux and then I will have to load VM software to run the other stuff in. I would like to make up a Pi later on in the year to run the venus stuff, for now I need something else, Windows is a resource hog and my internet is slowed down so much by it that it mkes me sick, with all the background updates and whatnot. It seems that these VM's laps after a while and need to be re-installed and I was looking to get away from that? As I am not a Linux Buff I thought I would come ask for help here. Thanks Kind Regards Charles Quote Link to comment Share on other sites More sharing options...
___ Posted May 22, 2018 Share Posted May 22, 2018 1 hour ago, Charles_Gibbs said: It seems that these VM's laps after a while and need to be re-installed and I was looking to get away from that? The Windows 10 VM from M$ gives you 90 days, but it continues to work after that and even stops pestering you about it. But just to be certain, I always make a snaphot just before I start it the first time, so I can always roll it back to a fresh install and get another 90 days (although then you have to reinstall all your software, which for me is only two packages: The printer's config tool, and veconfigure). I also turned off the automatic updates on mine, because I really hate it when I boot a VM once every two weeks to "quickly" do something in veconfigure... and it spends 45 minutes loading an update. I don't use it for daily work and I never browse the internet or read email on my VMs. It's firewalled two levels deep and NATed twice. We don't need no steenkin' updates. For Linux help, I would suggest you join a dedicated linux user group. Such as CLUG (Cape Linux User Group). I was a member there for over a decade but eventually moved on to greater things :-) Quote Link to comment Share on other sites More sharing options...
Charles_Gibbs Posted May 22, 2018 Share Posted May 22, 2018 Thanks @plonkster I will try some stuff and get back to you, Why did you stop your research if I may ask, are there that few people that work on linux ? ubuntu? Regards Charles Quote Link to comment Share on other sites More sharing options...
___ Posted May 22, 2018 Share Posted May 22, 2018 2 minutes ago, Charles_Gibbs said: Why did you stop your research if I may ask I didn't try it at all, I only know that there are people who did. It's an effort-reward ratio thing. I already know it works by using a virtual machine, and I don't use it often enough that I will save enough time to warrant the time I'm going to spend on figuring it out with wine. In addition, you can't exactly contact Victron support and say "I'm using wine", because the first thing they are going to tell you is to use the supported software. I use it for two things: Modifying basic settings, and updating firmware. I simply don't do it often enough, and I have enough on my plate as it is :-) If old hardware and the cost of a new/extra laptop is the issue, I suggest buying refurbished. I buy mine at a place called pclaptops in Bellville. You can often get decent little Celeron jobbies for under 3k. Quote Link to comment Share on other sites More sharing options...
Charles_Gibbs Posted May 22, 2018 Share Posted May 22, 2018 31 minutes ago, plonkster said: If old hardware and the cost of a new/extra laptop is the issue, I suggest buying refurbished. I buy mine at a place called pclaptops in Bellville. You can often get decent little Celeron jobbies for under 3k. I'm just tired of windows and want to run on linux, I have a pissy laptop, and the only thing running on it is windows, Netflix and popcorn time, and then the Victron stuff, but it is so slow, 2GB ram and an e1 AMD APU, I think that is where the problem is.... But have had it with windows. Such a resource hog.... Quote Link to comment Share on other sites More sharing options...
___ Posted May 22, 2018 Share Posted May 22, 2018 8 minutes ago, Charles_Gibbs said: but it is so slow, 2GB ram I used to be one of the biggest Linux evangelists, and I still think it is by far the superior system (well... there is that OSX thing... but that's for rich people and fanboys), but even I have grown tired of sukkeling with this stuff. 2GB is not a lot of RAM, even for Linux. 4GB is the absolute minimum these days. I have a Dell e6410 with 8GB RAM. It's positively ancient considering it first came out in 2011, but it is plenty capable and I can even run windows in a VM. And you can buy them for under 4k refurbished. Not to be funny or anything, but if you can afford Victron hardware, you can afford to treat yourself to something with a bit more computing power :-) Quote Link to comment Share on other sites More sharing options...
Charles_Gibbs Posted May 22, 2018 Share Posted May 22, 2018 He he he. Well 200K in Victron stuff was for the wifes salon as the power consumption had us putting power ona weekly basis,(prepaid). So she is fed up with pc stuff and could not be bothered, me? Well, I want to see what is going on, so hence the battel. I have a good pc but it is for Audio work and that is in the studio, this hunky crappy is in the livingroom next to the Victron stuff, (Ons bly in 'n vuurhotjie boksie.....) So no place for a garage and so on. I will just have to see what I can manage.... Thanks @plonkster Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.