February 10, 201610 yr Yes, off course. Sorry my posts were in no way meant to negate or degrade the effort you guys are putting in. There are certainly a lot of factors one needs to consider when developing such a system. I was wondering out loud, more than anything else. Anyway, I am busy developing an embedded monitor/control system, as per my related thread some weeks back. But it will be embedded, not running on top of a commercial/free OS or anything like that. I'll post more details another day (on another thread), I don't want to interfere with your project. Good luck! Not problem at all!!! This thread was started to let the developers play and see what comes out, for I do not have an Axpert, but dearly want to read all the data from my parts, 4 in total, that may result in software that can read data, irrespective of device. So we are here to share ideas and, as Plonkster asked for so diplomatically, code. We prefer .NET, HTML5, JSON and SQL Server, the real one, not these other namesakes.
February 10, 201610 yr Where and how will the mqtt server be hosted?Why... in the Rpi of course :-) I'm sort of modeling Victron's ccgx with Mqtt instead of dbus.Sent from my GT-I9195 using Tapatalk
February 10, 201610 yr Plonkster, what you are working on, Morningstar added, would you share, sell?Do not want to continue, and you have done better.
February 10, 201610 yr I'm still miles away from something that's working, mostly because I made the insane decision of going with the high end BlueSolar. If I took one of the others, I'd have it working by now :-) I have no interest to sell, and I am in no hurry. It's open source, and anyone can get involved. I think that is my biggest worry: That I might never finish it. All talk and no action :-) I have my arduino can bus shield soldered up, and I also finished my own interface. I tested the can driver side and that seems to be working fine.
February 10, 201610 yr A bit more progress. My software now populates a local cache with data it reads from mqtt, and displays it on the angular view. TTT, if you are up for a bit of python learnage, clone this repo, and install the angular and python bits. Start it up and hit http://localhost:6543/. https://github.com/izak/ib.bluelantern Sent it mqtt messages like this and watch it update: topic = battery01/inverter/power, payload = 213. topic = battery01/mppt/power, payload = 414. The idea is that at some future point, it should be able to manage more than one battery bank. You can have multiple pieces of equipment (in this case just mppt and inverter), and use your own names for them. It simply checks for the type (pv or load) and does it's thing. See rough screenshot of browser, with no decent styling just yet :-)
February 11, 201610 yr Well done, Plonkster. Looks nice. Are you planning to incorporate control of the whole system? Or just monitoring? And, can the monitoring/logging be done without a PC? i.e., can you create the db on the raspi?
February 13, 201610 yr OomD, for now the plan is monitoring and logging, but in time, who knows :-) To do that, I'll have to write some authentication and stuff, but I've written two oauth services for angular apps already so I'll steal one of those. With that in place, all that is required is another view on the web page where some control functions will reside. Future stuff... :-) For now, two nights ago I wired up the STM32 and the arduino, with little success. Photo attached (working in the Kitchen, yes TTT, the wife lets me :-) ). So last night I was faced with a choice, either break out the oscilloscope and try to debug the makeshift can circuit (probably not going to be fun since I have a dumb non-storage analog scope), or go for broke and plug it directly into the bluesolar mppt (already hacked up a 120 ohm terminator for the other end a few days ago). So I went with the second option, hacking up yet another ethernet cable and tying the arduino/canbus into the Victron bus, and last night I got my first data streaming down the page. Just the data. Apparently I need to get the PGN information from the sending CAN-id to make sense of it, and the example code doesn't do that yet... but it's a step in the right direction. Turns out a dude already wrote an NMEA2000 lib for arduino, along with an mcp2515 library that allows use with the can bus shield. I'm probably going to try to NOT use that whole library, because I don't need all of that. The info I need is broadcasted, I just need to listen for what I want and decode it. Also, on the python/angular side. I created two scripts that fake an inverter and a charge controller. It hooks into the mqtt bus and just throws in values that radomly varies a bit like it might in real life, so you can see how the display updates. That is to say, this bit now actually works in real life, though it is still a bit of a pain to get going as you need to set up python, virtualenv, nodejs, and pull down all the python and js dependencies before it even runs. In future, I'll probably package the js bit so you don't need nodejs if you just want to use it. Edit: Oh I am such a doofus. The problem is that the STM32 and that little transceiver board on strip board don't share a ground... I only have the rxd and txd lines connected. Nothing like publicly posting your broken solution to shake the old gray matter...
February 13, 201610 yr Hi PLonky When I am prototyping I generally use a breadboard rather than a breadbin.
February 13, 201610 yr Success! Well, step one. I managed to get this little canbus dump, or at least this snippet, where the first collumn is the CAN id (which can be decoded into a priority, pgn, source and destination: 435295268: 0 46 10 0 0 255 255 37 435294756: 193 255 255 255 255 255 255 255 435294756: 161 255 255 255 255 255 255 255 435295268: 1 182 6 0 0 255 255 37 435295268 decodes into PGN=127508 which is battery status. What follows is 8 bits for instance, 16 bits voltage, and 16 bits ampere. It's night time, so the ampere bits are zero, but the voltage bits are 46 and 10, and 10*256+46 = 2606 = 26.06V. Which is bang on where things are standing right now. 435294756 decodes to PGN=127506 which is "DC Detailed Status". Mostly 0xFF values, not sure if it is useful. The Victron documentation says it's disabled by default and you have to explicitly enable it. So I'll ignore this one. Strange things: There is a second battery bank that's being reported. Note the "435295268: 1" which is battery status for bank 1, at 17.18V. This appears to be the panel voltage, ie that's what the city lights are doing to them open circuit at this moment. It also sends PGN=127750, which seems to be a converter status related to 127508 and 127506. Not important for my purposes. Finally it also talks to PGN=61184, "Seatalk: Wireless Keypad Light Control", probably to turn on the backlight if you have one of these on your boat. Next step, figure out how to set up the filter for the MCP2515 so I only see data for PGN=127508.
February 14, 201610 yr I just figured out the filtering on the MCP 2515, so now just to decide how much functionality to implement on the microcontroller, then finish the interface code. Next, I'll probably want to write an interface for another controller, something with ve.direct. Need someone on this group with such hardware to collaborate with. :-) Sent from my GT-I9195 using Tapatalk
February 14, 201610 yr 54 minutes ago, jdp said: Plonky you should fire the people who put in your marble tops as well. ;-) Came with the house. Indeed, there's a lot done around here that was clearly done by the lowest bidder. Do not get me started. According to the house plans the original owner has a name that indicates he probably used his cousin to do the tiling and his brother's son for the kitchen... tiling was done using an angle grinder instead of a tile cutter, you should see the overcut... buuut, the place came at a good price at the time. The only problem is that when you buy a place in the middle of a recession, it takes a while to fix it :-)
February 14, 201610 yr Oookay. The canbus code is now a VE.can->VE.Direct converter. It simply converts a subset -- specifically the content of PGN 127508 -- to the equivalent VE.Direct tab-delimited text. I can now write the PC side application, and it should work out of the box with the other Victron MPPT controllers as well. Code is here: https://github.com/izak/arduino-victron-canbus It needs way more testing. I haven't actually tried it during the day yet. When I finally get time to do this, the sun has long left the skies :-)
February 14, 201610 yr 6 hours ago, plonkster said: I just figured out the filtering on the MCP 2515, so now just to decide how much functionality to implement on the microcontroller, then finish the interface code. Next, I'll probably want to write an interface for another controller, something with ve.direct. Need someone on this group with such hardware to collaborate with. :-) Sent from my GT-I9195 using Tapatalk What do you need?
February 14, 201610 yr 8 minutes ago, The Terrible Triplett said: What do you need? Let me explain the objective first. I would like my little open source project to support a more widely available mppt charge controller. I think few hobbyists/home installers go for the 150/70 or the 150/85. So I was thinking of at least doing the integration for a 75/15 or one of the lower-end models, but that means I would need access to one. In the mean time I decided that the intermediary text protocol for my arduino-canbus module might as well be the ve.direct text format, or at least a minimal subset of it, that is to say: With this arduino-based converter in the system the ve.can messaging is suitably converted to ve.direct, so that for all practical purposes I now have the hardware I need to develop the ve.direct module. So I might only need someone with such hardware to test it.
February 14, 201610 yr I use a 75/15 and I have one spare in Pretoria, that I can bring back. Hardware you mention I presume the same as you have posted here before?
February 15, 201610 yr 9 hours ago, plonkster said: tiling was done using an angle grinder instead of a tile cutter Off topic. There is nothing like an angle grinder when it comes to tile cutting - not talking about straight cuts, but rather cutouts e.g. around door frames etc.
February 15, 201610 yr Guys, just a 'klip in die bos'. Will this work to read data using a USB hub? Tablet
February 15, 201610 yr 33 minutes ago, The Terrible Triplett said: Guys, just a 'klip in die bos'. Will this work to read data using a USB hub? Tablet Jaco I think the problem on this one will be it uses that Micro USB port for charging also. That is why I went and got a tablet with a dedicated full size USB port and connected a USB Hub that uses external power
February 15, 201610 yr 46 minutes ago, The Terrible Triplett said: Guys, just a 'klip in die bos'. Will this work to read data using a USB hub? Tablet The question I think comes down to whether the tablet can act as a USB host. Technical jargon and stuff: On any USB bus you have a bunch of dumb slaves and one master, that is, one acts as a host and the rest are just devices. It is the job of the host to move data between the devices. Many Android devices act as a slave when you plug them in, and emulate a mass storage or MTP device, so that you can access it as if it is a flash disk or a media device. Some of them support USB OTG though (OTG == on the go), which is a protocol where devices that are capable of being both a host and a device, may negotiate with the other device which of them is going to be the host. Remember this post from last year (https://www.victronenergy.com/blog/2015/08/25/bmv-on-android-phone-via-usb/), that's an example of an android device acting as a host. So... possibly yes. If it can act as a host, then it should be able to communicate with other devices and read data. Internally, of course, it's an ARM SoC running Linux, so if you are prepared to load a custom ROM or root it, I'm certain it will work just fine.
February 15, 201610 yr All that stuff where I was going on about the STM32 chips (ARM Cortex M4 and family) being able to act as a USB host? That is what this was about. If it can act as a host, I can use it to talk to USB-Serial converters, which means I can use an $11 arduino-on-steroids type device to harvest all that data :-) Turns out it can act as a host, you even get libraries from ST to help you implement support for the more common things: HID, aka keyboard and mouse, mass storage aka flash disks, CDC aka some serial port and modem type hardware, MTP aka some media devices. But in the end it just feels like too much low level work and while it might score me oodles of geek points and oomD would be proud of me, I'll settle for the Rpi for now :-)
February 15, 201610 yr Plonkster ... Ditto! your posts reminded me of: KISS For dinges weet, it can get quite techie very fast due to so many clever things out there.
February 15, 201610 yr 8 minutes ago, The Terrible Triplett said: Plonkster ... Ditto! your posts reminded me of: KISS For dinges weet, it can get quite techie very fast due to so many clever things out there. I was literally just reading a post on how to run micropython on the ESP8266 (Seems a bit limited, but interesting) :-) I padded my Hong Kong order with the can bus shield with a few other items, one of them an ESP8266. I think I paid like ZAR30 for this little thing. It can do WiFi and has a bunch of GPIO pins. What to do with it... I think the main problem is that I have only one. Should perhaps order a few more, pad that order with several more ATTiny85 chips just for the heck of it... (Honey!!! What is this!? Oh that. It's a small 8 bit computer. Just throw it away... I'm sick of them already). :-P
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.