Esperyd?s Raspberry PI project

Announcement - Help us fight the BOTS! Please report all spam including stuff in your inbox!
Joined
Mar 5, 2017
Messages
101
Haven't been successfull in running mono batrium_reader.exe on background except for using screen, which doesn't resolve the after reboot situation.

When started in background it stops for some reason I don't understa.

When trying to run it in a systemctl service it blows up like this:

Sep 06 09:36:45 pi mono[2382]: UDPSend.init()
Sep 06 09:36:45 pi mono[2382]: Make sure grafana host is configured in hosts file
Sep 06 09:36:45 pi mono[2382]: Unhandled Exception:
Sep 06 09:36:45 pi mono[2382]: System.NullReferenceException: Object reference not set to an instance of an object
Sep 06 09:36:45 pi mono[2382]: at UDPReceive.Main () [0x00000] in <filename unknown>:0
Sep 06 09:36:45 pi mono[2382]: [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
Sep 06 09:36:45 pi mono[2382]: at UDPReceive.Main () [0x00000] in <filename unknown>:0
Sep 06 09:36:45 pi systemd[1]: batrium.service: main process exited, code=exited, status=1/FAILURE
Sep 06 09:36:45 pi systemd[1]: Unit batrium.service entered failed state.

Any idea why is this?
Having to manually start it after each reboot is a pain in the a** :)

Thanks for any help.
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
Ok take a look at that. I only run it in screen and with battery backup. Ok get back
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
Still working on the software of the inverters and it is getting there. It can now handle the protocoll dynamically rather well but still some work to do. You controll the inverter via REST-API and in my case from node-red. Its easy to add upp Emoncms or any other like Facebooks own React!

Meanwhile im digging into electricity meters. And in next video we will tackle the sonoff POW a little bit quick :)

 

tocan

Member
Joined
Sep 20, 2017
Messages
43
Suggestion for yours build to enable with a second Wifi Adapter the Wifi from beginning. Enable from beginning that you have access to the desktop with TinyVNC... It makes live in a headless System much more easy for beginners. I have no screen and do not plan to buy one. Today in a fast try i could not get access.

I personal did with the EPever RS485 Monitor not using a cable. I flashed to the ESP8266 ESP Link and did make a video and instructions... That way with socast and a cron job you are absolute independant from cabeling and finaly it cost you such a solution less than 10 Euros.

I request another port because i do use it for homeautomation in a boat including navigation and the Marine Server request port 3000. Additional you can install Alexa and can manage yours things by voice with simple scetches. with a TTS and STT Alexa can take acction to inform you in several ways mainly for warnings and other things. Because the boat is all 12 and 24 DCvolts and no 110 or 220V AC i use for example Sonoff SV, the only sonoff for battery DC Systems.

With Signal K Server you easy can share Grafana Dashboards via Internet for example if there is a problem for remote administration and reviews.

Just a view ideas. I did join here after i have seen some of yours videos and hope for help, because i could get grafana to run with influx... about node red and MQTT i still have no idea where to start. and i could not get RS485 Data in the influxdb.... Maybee we share some ideas that way because on a boat you have not the possibilities for big solutions. Some are happy with 50 Watt panels :)


image_eoliqa.jpg

image_jexslq.jpg


Last weekend we did take one of our 2 panels from the boat in netherlands. We do not have a car and was a heavy 7 km walk through the nature to reach the next train station. Taxidrivers deny to transport us..... So i take in next time the other panel at home to be able to develope a bit with the raspberry.

Here is the RS485 Wifi Box.


image_fbfvqw.jpg
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
Welcome m8!

Im not sure I understand about 2nd wifi? The Wifi is enabled by default but you need to set the network or are you talking about set it up as an AP?

Wireless for the RS458: Yes can do that. I dont need it since i have all devices in same cabinett and max 2meter of wires :) But possible.

Alexa is not added since this sits in a cabinet where the solar is. Wouldnt be usefull there. i run such things on a different system at home :)

SignalK have not been needed in my case since i host everything myself. I also can reach the dashboard from internet without anything.

Some answers to your question. It can be customized fully but note that the ISO is based on what I use at home. The software for the inverters itself are very very basic and not autostart. Its just ment as a "this can be done" im working on a better version of that software and that part will be auto start and all.

What have you done to get the data into influx? Do you have something fetching the data and how are you sending it to Influx?
 

tocan

Member
Joined
Sep 20, 2017
Messages
43
Ok i explain you a bit more the background. I use a blog and a lot of this is there in a description. I am not a programmer but i can see what is in general a good project and yours is a good project. You have a big solarshed and this is not possible to anyone. I publish in German and the page translate all in a lot of languages on the fly.

Background i bought a little boat and I got same time 2 used solarpanels with 240 W each.
Here i will describe mor how i do the things to have a remembering for me in case of need. The topic is DIY as most as possible

http://donau-grundel-schiff.de

For navigation i did decide for Openplotter what is alpha but have at least a good concept. Becaause my english i did translate the documentation what takes me 1 month
http://donau-grundel-schiff.de/2017...am-navigationshimmel-in-deutsch-erklaert.html

I did start with solar and maintainer seems not to much interest to implement it and so i did find you.

My online Demo is down because i need the SD card to try yours iso

http://donau-grundel-schiff.de/2017...iemonitor-nicht-nur-fuer-boote-mit-video.html

I am interest to implement grafana and influx but here i am at first steps. Was a horror 3 months ago to install both on raspberry pi on top of openplotter

I think for a lot of users it will be helpfull to do some addons for smaller systems. A lot live in rental like me and have to work with 1 or 2 panels and yours build is a lowcost alternate.

Signalk have some background. 30 Years ago there was no industry standard for marine and so did start NMEA 0183 as a standard. In USA then was build a New standard 20 years ago and mainly they use the modbus of IBM and Bosch but they close all in a consortium what makes marine electronics very expensiv. A netherland programmer did long years software reengeneering and made a nearly complete database of the hidden now named NMEA2000
this is 20 years ago and this standard mainly have no network and Internet compatibility... And here the Open Source scene reacts with Signal K exists a server that have such much power and inovations inside that the NMEA2000 consortium suggest their members to use Signal k in their implementations.

From Minute 5 he shows how he did implement the system. The wifi box he use same as i did describe.

but git he did mention in description will not work.

My idea is now https://www.wilhelmsk.com/ Scott is using for his app Signal Kserver.

Here he describe his implementation for victron and the code is in the blog. So i try because also phyton libery exist for my epever to go this way

https://www.wilhelmsk.com/single-po...olar-to-Wilhelm-and-getting-data-into-SignalK

My hope is now that i find help how to put data in influx to make it available for the system with epever and other hardware
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
As long as you know how to get the data in first place then inserting into influx its not a big deal and i can help you with that.
 

tocan

Member
Joined
Sep 20, 2017
Messages
43
daromer said:
As long as you know how to get the data in first place then inserting into influx its not a big deal and i can help you with that.

I am looking a little bit deeper in yours build and find out why i could not get access to the VNC Server. You use Real VNC and the maintainer comment of openplotter about this was:

RealVNCserver is not compatible with RDP and we need both methodsVNCand RDP running on the same system. We use x11vncinstead of RealVNCserver. I hope Raspbian developers fix this.

That way i use for VNC tinyVNC as client. I thought you did change the port from 5900 away but it seems that at the moment i do not get access and have to operate terminal based only.

I saw you use the old influx database what is no more supported because the Webpage administration is stripped out in future versions.
http://engineer.john-whittington.co.uk/2016/11/raspberry-pi-data-logger-influxdb-grafana/

i guess is this method and influx and grafana have now rasppberry builds.

http://arztde.dynvpn.de:61011/dashboard/snapshot/SnTleEALzDrYfQ7berkdtsaN45sX9dai

Its a snapshot of yours build for live demo. I check the things... first i have the wrong cables here to conect solar panel. They are to short need to order longer ones. i saw in yours videos a lot of good tips for beginners and be in good mood to get it. at least also without programming skills.

If you set the videos at you tube not in standard mode as in Creative Commons mode i can give the video a german voice :)

Thanks for yours offer to learn how to put data to influxdb That way is for beginners the most difficult step if they use different hardware or me in the future additional the Sun-GTIL 1000 22-65V inverter. I am happy that the chinese manager did aggree to make me a Modbus prepared version. I did not translate the chinese modbus protokoll right now for the inverter but it works with google translation good
And exists also a phyton modbus libary.

I have the same for the EPever series A Tracer in English -Can i not upload pdf files?


image_bzvbhz.jpg


View attachment 8
 

Attachments

  • Modbus RTU Protocol ????V100.pdf
    1.9 MB · Views: 514
  • Sun_series_invertor_Datasheet_v2.pdf
    601.1 KB · Views: 305

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
With Node red its also easy to get the data in Influx. Via built in palette nodes its easy to just drag and drop and get the data where its needed.

Yeah VNC and RDP is not the same thing :) I tested the VNC and it works fine. Im using VNC Viewer.

If you upgrade the ISO you have you will get latest.
This is the version of Influx im using here: Installed: 1.3.5-1

And latest on their webpage is 1.3.5.

Im about to update the ISO soon with new release fully upgraded. So if anything is needed i can add that. But I try to keep the ISO as minimal as possible
 

tocan

Member
Joined
Sep 20, 2017
Messages
43
daromer said:
With Node red its also easy to get the data in Influx. Via built in palette nodes its easy to just drag and drop and get the data where its needed.

Yeah VNC and RDP is not the same thing :) I tested the VNC and it works fine. Im using VNC Viewer.

If you upgrade the ISO you have you will get latest.
This is the version of Influx im using here: Installed: 1.3.5-1

And latest on their webpage is 1.3.5.

Im about to update the ISO soon with new release fully upgraded. So if anything is needed i can add that. But I try to keep the ISO as minimal as possible

I saw different libaries ... some in phyton and some in PHP and mixed projects...

As far i did understand as a beginner, the devices talk a lot with modbus and there is a complete pymodbus libery in phyton available and it seems there is a well done documentation with api there. I do nothing know about api and how to use it but programers love it... :)

https://github.com/riptideio/pymodbus


as far i understand this is a way to be independant from trademarks and products...

main seems to add more hardware if there is a modbus protokoll available. You do it for yours hrdware and hope that others use it... but in parts the hardware in yours links is no more available in ebay.

I did found a resource like someone did and using the pymodbus libary to push data via php in the raspberry pi...http://www.solarpoweredhome.co.uk/

and in the description he points also to the modbus protocol of the epever and it seems epsolar use this modbus in all their hardware old ones and new ones


http://www.solarpoweredhome.co.uk/1733_modbus_protocol.pdf

it looks similar to the modbus protokoll i got for the grit tie inverter with limiter from sun. I got only chinese description but translating some of them they use same adress system.

and i did compare with the victron modbus protocol and also here i saw is similar but victron make in parts different things. but its known they let produce their hardware in big parts from epsolar.... so main thing for this build i see that its a good idea to add different hardware and write a good documentation how to set up the transfer protokoll for beginners... hahaha my arguments are very egoistic ;)

Ok i run at the moment this installation but with node red i did fail...

https://randomsporadicprojects.blogspot.de/

here you see also in the videos how the wifi box is made...
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
What link isnt working?

Pymodbus is included on the ISO. Im using it for fetching data from SDMxxx meters for instance.
 

tocan

Member
Joined
Sep 20, 2017
Messages
43
This sounds promising. I will run in next days my EPever active and we can look how to fetch some data with pymodbus inside influxdb.... i do not understand for the moment the way how to use pymodbus and how to send the data to the right adress. from the modbus protocoll. Maybee some video with some example of configuration will be good exact at this point a step by step procedure. Collin talk in his video about pymodbus and than in the git link he use a php libary but no description. I saw only from the manufactorers given modbus protocol and i saw that pymodbus handle this somehow but its not clear the steps.

For this i am not educate...
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
UPDATE

Have done several changes to the ISO.
* Sorted better logging for the services including better log rotation
* Batrium service is now autostart and as a service
* The SDM630 meter service is also autostart as service
* Alot more coding done for the new npm package for the RS232 package for inverters are done. This will make it very easy for building your own reader/sender for any inverter or charger that runs normal RS232 text protocol. Like all MPP stuff including others like EPever.
* PIP + MPI hybrid is partly implemented in terms of the protocol in question


I will be uploading a new ISO soon but except the NPM package for the solar. That one need some more testing and tweaks first before i will release it.
 

tocan

Member
Joined
Sep 20, 2017
Messages
43
i did not got any news. Meanwhile the GTILV2 did arrive but i have only a smal sheet with just one panel and they did ship the bigger inverter with 1000W 45-90 V version.

I like to run maximum 24 V because of the epever that only can run 12 or 24 volts.
 

daromer

Moderator
Joined
Oct 8, 2016
Messages
5,659
It should work
 

tocan

Member
Joined
Sep 20, 2017
Messages
43
i think yes... but for me is not clear how to get the data from the phyton libary inside influx... in general needs not all parameters involved for an example but for a programmer noob like me 1 or to examples of data and more important is the way i think... most go the way with socat.

maybee you help with such a way description for people like me and act a bit as mentor than.

i did register a sourceforge place also for to store the image than but realy to start i need a mentor to learn first steps...

PS. Yours valence batteries where you get them used? i look arround europe because of shipping but nothing to get used...

The video below is a brand new boat what did have a little problem with LiIon batteries and i do not wish this happen...

 

Korishan

Moderator
Joined
Jan 7, 2017
Messages
6,522
Where does it say the boat had liions onboard? There is no audio nor any information in the description.
 

tocan

Member
Joined
Sep 20, 2017
Messages
43
Korishan said:
Where does it say the boat had liions onboard? There is no audio nor any information in the description.

Was in Germany and the Boat (solar driven)owner did describe in the boating forumfor his new boat some month old that that some problems did appear with the batteries. And was Liions. After the fireman did enter the boat because of smoke 16 where injured and if you youtube search minden boot explossion you find some videos. A drone owner did saw the firemen and did this illegal video (because its forbidden drone flights in the night and this complete explosion is impressing.... no gas or something else at the boat. Thread in the forum was suddenly blocked to prevent the owner in front of inshurance things. The thing was that in the forum discussion in the afternoonwas announced for the next day that a electision of the company that build the boat was ordered. to late as far we see.

I think lipo with used batteries in a boat where is not a good idea. so the idea for the valence batteries (used ones) can be reasonable. but in a small powerwall with just 2 batterieies maximum 4. if i get used 4 used ones for my steal boat each 130 or 138 AH can be reasonable. If i pay 250 Euros for one than the batteries have the double price i did pay for all the boat :)

lion powerwall i like to make first experience but if available valense with fe are the better choice i thing or i have to go ordinary AGM gel batteries for boat.

for the moment i focus just for the monitoring with the raspberry as long there is no decition ade.. same for home and for the boat
 

Korishan

Moderator
Joined
Jan 7, 2017
Messages
6,522
Sounds to me like the person who built the power setup didn't fully test each cell and potentially just threw cells together. Or, he had a failing/failed charger that over charged the cells. Or, the charger worked fine, but the packs where in the wrong series (ie. 24V setup but used 6s instead of 7s or something similar, which resulted in the charger overcharging the packs). Or didn't have a proper BMS installed. Or, the wiring wasn't separated enough and there became a short somehow and high amperage caused overheating.

These things don't just blow up without some sort of thing usually external causing them to do so. Someone could say "Well, the Samsung phones exploded". Yeah, but it was shown there some defect in the manufacturing process or they were damaged. Those were "new" cells.

The reason why I say something must have not been done correctly, is because several members on here have tried to force failures. And most have failed. I say most, because the ones that failed were super extreme; like taking a blow torch or air heating gun and heating the cell to well beyond what it was designed for.

However, in all things said, I hope the firemen were ok. It stinks for the boat, and the boats next to it.
 
Top