PV Monitor project

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

PV Monitor project

#1 Post by Ath » 17 May 2020, 17:55

Today I completed my PV display project.
It consists of a Wemos D1 clone, a 1.3" OLed display and a APDS-9960 gesture sensor.

The PV data is sent to the fixed IP address of the Wemos, and the string that is displaying the Start and Update times is also formatted and sent externally. Data is gathered by my RPi 3B, hosting Domoticz, Moquitto MQTT broker, and a script that reads the data every minute from the Zeversolar inverter.

SolarDisplayInside.jpg
SolarDisplayInside.jpg (1.18 MiB) Viewed 28245 times
SolarDisplayOutside.jpg
SolarDisplayOutside.jpg (1.03 MiB) Viewed 28245 times
GestureSensor.jpg
GestureSensor.jpg (327.1 KiB) Viewed 28245 times
Unfortunately, the hole has to be quite large or else the gesture sensor blocks the Wemos

SolarDisplayOutput.jpg
SolarDisplayOutput.jpg (872.85 KiB) Viewed 28245 times
Text is mostly in Dutch to conform to the WAF factor...

I'm using a self-built ESPEasy version, that includes my adjustments to the OLEDFramed and APDS-9960 plugins that are currently still in PR state. By default the APDS Gesture gain is set to a factor of 4, but it only works reliable when set to a lower gain.

There is only one rule for controlling the display by using the gesture sensor, as the display is set to turn off after 40 seconds to extend the lifetime of the display.

Code: Select all

on Gesture#Gesture do
  if %eventvalue% != [Variables#Gesture]
    TaskValueSet,10,2,%eventvalue%  // Store last value
    if %eventvalue% != 4
      oledframedcmd,frame,0  // Next frame, turns on and selects first frame when off
    endif
    if %eventvalue% = 4  // 'Down' gesture
      oledframedcmd,display,off  // Turn off
    endif
  endif
endon
/Ton (PayPal.me)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: PV Monitor project

#2 Post by grovkillen » 17 May 2020, 18:55

Nice setup! Thanks for sharing. :D
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

2007-i
Normal user
Posts: 18
Joined: 10 Oct 2020, 22:34

Re: PV Monitor project

#3 Post by 2007-i » 30 Oct 2020, 23:11

Well done!
Could you tell me how you catch signals in the settings, how do you debug? Where in ESP Easy is the APDS-9960 gesture module setting in the device? I did not find it there, although this module is included in plugins.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: PV Monitor project

#4 Post by Ath » 31 Oct 2020, 11:03

2007-i wrote: 30 Oct 2020, 23:11 Could you tell me how you catch signals in the settings, how do you debug? Where in ESP Easy is the APDS-9960 gesture module setting in the device? I did not find it there, although this module is included in plugins.
The gestures are handled in the rules only, an event is fired for every change that is detected, see my rule in the initial message of this thread. Other measured values (Proximity/Light or R/G/B depending on settings) also trigger events as usual. All values can also be sent out via Controllers.

Settings are available from the normal ESPEasy web UI, this plugin is available in the test builds, though at the time I built it, the PR I made wasn't merged yet, so I was using a custom build.
Documentation is here: https://espeasy.readthedocs.io/en/lates ... /P064.html

Debugging is mostly done during development, via the serial log (as then I connect it via USB to my laptop), but the only logging that is available is sent out at INFO level.
/Ton (PayPal.me)

2007-i
Normal user
Posts: 18
Joined: 10 Oct 2020, 22:34

Re: PV Monitor project

#5 Post by 2007-i » 31 Oct 2020, 13:52

Thanks.
Tell me how the module itself works, gestures and approximation work adequately? Did they write that in the beginning there were problems with him as well as id?
I tested my module but with a different firmware, it worked more or less normally, the distance is about 10 cm.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: PV Monitor project

#6 Post by Ath » 31 Oct 2020, 14:43

It works rather flaky, I'd say, in this setup. The gesture recognition is rather poor because it is built into a case so I'm waving at it a lot from a close range to get the desired result :roll:
Seems quite dependent on the things that are within 'visible range' of the sensor, as I wrote above about the size of the hole, initially that was around 12mm, but I had to enlarge it quite a bit to around 16mm, and with a slope, to let it have a 'good view' out of the case. The actual 'view port' is a kind of a cone, and anything that is blocking the view disturbs proper operation. BTW, this all explained in the documentation about the sensor, so I guess I was a bit too optimistic.
Might I want to do movement detection again for a project, I'll probably stick to an IR sensor-switch, as that seems much more reliable.

In this project I used the gesture sensor because I had bought a couple, and I wanted to experiment with it. My initial buys from Ali didn't work very well with the default settings, so I took up the project to make that more configurable. Later I ordered a 'branded' one locally (RobotDyn) that works much more consistent. And without a case it works pretty ok, with a 'tuned' configuration, but that's not within the WAF scale :D

The sensor detects movement by emitting IR light, and based on reflection and speed calculates the movement.
You won't be able to get any kind of reliable proximity value from it, that seems either way too sensitive or quite insensitive despite the 'enhanced' configuration options, but I didn't investigate much on that sensor value.
/Ton (PayPal.me)

JanAtHome
New user
Posts: 5
Joined: 23 Nov 2021, 14:43

Re: PV Monitor project

#7 Post by JanAtHome » 23 Nov 2021, 14:52

Hey
I read that you have a zeversolar solar inverter, linked to a domoticz system.
Do you also have a plugin, for zerversolar to domoticz.
Or how did you configure this inverter in domoticz.
Please comment
Greetings Jan

Hallo
Ik lees dat u een zeversolar zonne inverter heeft , gekoppeld aan een domoticz systeem.
Heeft u ook een plugin, voor zerversolar naar domoticz.
Of hoe heeft u deze inverter in domoticz geconfigureerd.
Gaarne reactie
Groet Jan

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: PV Monitor project

#8 Post by Ath » 23 Nov 2021, 15:09

Hey Jan,

I'm reading my Zeversolar inverter using a script on my Raspberry Pi, that also hosts my Domoticz installation. (cron job)
The script also pushes the data into Domoticz and to a list of configured ESPEasy nodes (if they can be found on the network == switched on).

I'll share my script later today, as I'm not at my home computer atm.
/Ton (PayPal.me)

JanAtHome
New user
Posts: 5
Joined: 23 Nov 2021, 14:43

Re: PV Monitor project

#9 Post by JanAtHome » 23 Nov 2021, 22:04

Great, I'm eagerly waiting for the script, also running with pi3 and domoticz. thank you for sharing this knowledge.

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: PV Monitor project

#10 Post by Ath » 23 Nov 2021, 22:06

I had to do some cleaning, but here are my scripts and crontab settings for retrieving data from Zeversolar (Zeverlution) PV Inverter, send the data to Domoticz and to ESPEasy based OLed displays.

The .sh scripts have to use Linux line-feeds when saved, and are expected to be in the /home/pi directory, and set the executable bit using "chmod -x ....sh". Some temp/working files will be created as well. The crontab lines have to be added/edited using "sudo crontab -e". The schedule is to avoid 'hammering' the inverter if it is offline, and it will run every minute to retrieve data.
pv-monitor-scripts.zip
(2.39 KiB) Downloaded 202 times
NB: Had to clean up a bit, removing my pi credentials, and some no longer used parts of the scripts, so couldn't test it before packing it all up.

Edit: Be sure to use a proper editor when on Windows, like Notepad++ or VSCode, I've saved the files using Linux line-ends, but plain Windows Notepad will mess that up badly!
/Ton (PayPal.me)

JanAtHome
New user
Posts: 5
Joined: 23 Nov 2021, 14:43

Re: PV Monitor project

#11 Post by JanAtHome » 23 Nov 2021, 22:51

ok tks i will test tomorrow en let you now.

JanAtHome
New user
Posts: 5
Joined: 23 Nov 2021, 14:43

Re: PV Monitor project

#12 Post by JanAtHome » 23 Nov 2021, 23:02

Can you make a screenshot , hardware counter cofig in domoticz, isit a counter or 4 teks ?

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: PV Monitor project

#13 Post by Ath » 23 Nov 2021, 23:22

I've put a description of the domoticz dummy tasks in the getzeverlution.sh script
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: PV Monitor project

#14 Post by Ath » 24 Nov 2021, 11:25

JanAtHome wrote: 23 Nov 2021, 23:02 Can you make a screenshot , hardware counter cofig in domoticz, isit a counter or 4 teks ?
Screenshot - 24-11-2021 , 11_16_51.png
Screenshot - 24-11-2021 , 11_16_51.png (105.04 KiB) Viewed 10614 times
/Ton (PayPal.me)

JanAtHome
New user
Posts: 5
Joined: 23 Nov 2021, 14:43

Re: PV Monitor project

#15 Post by JanAtHome » 24 Nov 2021, 19:08

tks working on it.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests