Skip to content

2) Help

Jean-Marc Louviaux edited this page May 22, 2022 · 7 revisions

How to install

Check README ! Latest stable version is here

How to update ?

Use the updater and follow the procedure. You may also :
Stop 123Solar, remove everything but keep a copy of "data" & "config" directories.
Extract the latest archive on your web server's folder. (tar -xzvf 123solar*.tar.gz)
Import your previous "data" & "config" directories. Then, go into the 123Solar administration.

How to start 123solar on boot ?

Check if you use initd or systemd.
For sysvinit, edit /etc/rc.local file and add the line: /usr/bin/curl http://localhost/123solar/scripts/boot123s.php
If you use systemd: Download '123solar.service' in misc/ and put it in /etc/systemd/system then type : systemctl enable 123solar

I get many "Communication Error" in the event log

Please read the communication app manual. For aurora, try it alone and adjust the parameters (-Y, -R, -l, -P).
Change then the communication options in the admin. interface.

I can't get SBFspot for SMA working

Copy SBFspot.cfg to config/SBFspot_0.cfg, where 0 is your inverter's number.

Why, the "top value" on the main daily graph is different than "Max. instantaneous power" and "Power peak" in the dashboard ?

It show precisely the average power value during a 5min period. It is not an instant power.

Why, the "Max. instantaneous power" value on the main page aren't the same than the "Power peak" in the dashboard ?

The "Max. instantaneous power" shown bellow the main gauge is catched by 123solar.
It mean that it depend of the pooling time which can vary : according to the pooling frequency (have a slow serial communication connection), have several inverters to check... It isn't (nor will ever be) able to get real-time values.
The peak values shown in dashboard are, on the other hand, reported by the inverter (if available).

Telegram bot howto

Make your own bot with /newbot and keep your token private.
Add it to your group following the "find it at t.me/your_bot".
Then request curl -s -X POST https://api.telegram.org/bot<TOKEN>/getUpdates and get the "chat":{"id"} number.
Then, in 123s or mN use your private bot's token and chat ID.

If you wish to make a group : Go to Botfather and /setjoingroups, enable your bot.
Make a group add the persons you wish plus your bot.
Go in https://web.telegram.org/ open your group and retrieve the number (... g123456789)
Put the chat number with a negative value (-123456789) into 123s and mN interface

Persistent device naming

If you use several USB converters it's wiser to set a persistent naming.
Get device details with udevadm info -a -n /dev/ttyUSB0
You can assign a name via attibutes : SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="solar"
Or more conveniently via the physical place of the converter udevadm info -a -n /dev/ttyUSB0 | grep KERNELS. Obviously, you should keep the converter in the same USB port place.

Now create a rules file /etc/udev/rules.d/99-ttyUSB.rules

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="solar"
SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="8036", SYMLINK+="arduino"
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="uno"
SUBSYSTEM=="tty", KERNELS=="1-1.2", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="sdm"

udevadm control --reload then udevadm trigger
You can now call /dev/solar or /dev/whatever

php-fpm over 7.4.0 can't access devices

Due to the hardening options for systemd service units, you need to set PrivateDevices=false (In Arch, might be =no) in php-fpm.service.
Do so with systemctl edit --full php-fpm.service
Then systemctl daemon-reload & systemctl restart php-fpm
Now php-fpm have access to /dev but it can't write LCK files for com. apps. You also need to chmod 777 /var/lock/.

How to setup a SMTP client ?

Look for "Installation and configuration of SMTP" on the instruction guide.

MSMTP problem

The permission and ownership of /etc/msmtprc should be set -precisely- to -rw------- 1 http (or www-data root)
[root@plugpc ~]# chmod 600 /etc/msmtprc
[root@plugpc ~]# chown http:root /etc/msmtprc
Then restart you webserver and php-fpm

How to send temperature to PVoutput ?

Check config/pvoutput/temperature/ and edit the example or create your own script. It shall return $TEMP value.

How to send consumption to PVoutput ?

If you use meterN, you have to edit config/pvoutput/consumption/meterN.php wrapper. (Check details into the file)
If you use another source, your script shall return $CONSUMED_WHD (Daily Watt per hour) and $CONSUMED_W (Watt) values

How to send PVoutput extended data ?

Edit config/pvoutput/extended/extended1.php, where 1 is the first PVo system. ID
You can send $pvo_v7 up to $pvo_v12 values.
If you wish, you can send 123s lastest csv data using $array2. $array2[x] where x is the number in the row: [0] is Time, [27] is KWHT.
eg: If you want to send the second grid voltage (G2V), edit $pvo_v7=round($array2[16], 1);

I still can't get it to work or something still wrong

Use the latest release and always test your communication alone and make sure it is reliable before starting 123solar. Go to http://your_server/123solar/admin/ help page, it usually respond to common problems.
You could enable debug mode and restart 123solar, then check what the error log returns in the debugger. It usually contain many hints of what goes wrong.
Please only use github's issues for 123solar bugs and enhancements and not help, sorry i don't have much time for that.