I created this pv router to separate the power part of the analysis part. I wanted to be able to trace the information to domoticz and leave him the processing of information to redispatch the surplus power to different digital dimmer.
A circuit board has been created and is available ( tips )
- An ESP8266 ( Nodemcu or Wemos )
- 1 SCT013
- 1k resistors,
- a LED ( 3V ) ,
- a capacitor 150nf polypropylene ,
- a 5v regulator,
- connectors,
- a femelle Jack
- a 12V connector
- an oled Display
- and a recovery transformer.
Open the transformer and remove the diode bridge ( do not broke it )
plug the bridge at 12AC-out and 5-10DC-IN
plug 12V connector at 12AC - IN and female connector to SCT013 on board
Connect the Oled Display on the connector on board ( OLED )
change nothing on the program, make only modification on data/config.json if needed or upload the 2 bin files ( code and spiffs ) upload the program on the esp8266 and connect to the new wifi network ( password for OTA can be add on file data/config.json ) put information on your personal Wifi and reconnect.
the pv routeur will send information on your Domoticz server.
on the Oled display, the IP is on screen. you can use web explorer for seen mesures and tune your pv router, the oscilloscope mode is on
by default, send to domotic server is off ( for test ) you can activate it on the web page and don't miss to save /get?save the configuration
Dimmer_heater.lua is configuration file for send to the dimmer. Domoticz_pvrouter_script.lua is the main file for sending to the digital dimmer. put them in domoticz/scripts/lua folder on your raspberry. configure the config.json file for activate domoticz mode ( "UseDomoticz":true )
#autonome mode configure the config.json file for activate autonome mode ( "autonome":true ) and change the server IP the program will try to equilibrate power in the external numeric dimmer ( https://github.com/xlyric/Domoticz-control-with-esp8266-for-Robotdyn-AC-Light-dimmer-Module)
the full documentation is in the file Documentation.pdf ( in French )
bin files are added for easy installation. python ~/esptool.py --port /dev/ttyUSB4 --baud 115200 write_flash 0x00000 file.bin and for SPIFFS python ~/esptool.py --port /dev/ttyUSB4 --baud 115200 write_flash 0x200000 file.bin
and for windows : esptool.py --port com3 --baud 256000 write_flash 0x00000 pvrouter.nodemcu.bin
esptool.py --port com3 --baud 256000 write_flash 0x00200000 spiffs.img
Wifiautoconnect password : pvrouter
OTA update https://steve.fi/Hardware/ota-upload/ https://github.com/esp8266/Arduino/blob/master/tools/espota.py python espota.py -d -i 10.0.0.106 -f file.bin
Special commands
exemple : Ip:/get&cosphi=11
"send"; /// paramettre de retour sendmode "cycle"; /// paramettre de retour cycle "readtime"; /// paramettre de retour readtime "cosphi"; /// paramettre de retour cosphi "save"; /// paramettre de retour cosphi "dimmer"; /// paramettre de retour cosphi "server"; /// paramettre de retour server domotique "idx"; /// paramettre de retour idx "idxdimmer"; /// paramettre de retour idx "port"; /// paramettre de retour port server domotique "delta"; /// paramettre retour delta "deltaneg"; /// paramettre retour deltaneg "fuse"; /// paramettre retour fusible numérique "apiKey"; /// paramettre de retour apiKey "servermode"; /// paramettre de retour activation de mode server "POWER"; /// paramettre de retour activation de mode server "facteur"; /// paramettre retour delta "tmax"; /// paramettre retour delta "mqttserver"; /// paramettre retour mqttserver
BETA : /cosphi find up point /puissance indicate power of charge