UPS PIco on LibreELEC [RTC and i2c issue]

Support for the UPS PIco HV3.0A

UPS PIco on LibreELEC [RTC and i2c issue]

Postby dudesque » Mon Jul 10, 2017 4:16 pm

Dear all,

I'm struggling to install the UPS PIco HV3.0A "Top end" on the RPI3 running libreelec...
I tried to follow the instructions provided there:
UPS PIco HV3.0A Stack Plus on LibreELEC - olausson.de
but I still can't make the UPS work properly. Here are the points I'm having issue

So I have the RPi running with libreelec properly, I installed the rpi-tools and system-tools addons
I plugged the UPS and the battery

1st issue: nevertheless how to check that
rtc-ds1307 is available as module
i2c-dev is compiled into the Kernel
i2c-bcm2708 is compiled into the Kernel

2nd issue: RTC is giving issues and hwclock does not respond properly:
PortableKodi:~ # hwclock -s
hwclock: can't open '/dev/misc/rtc': No such file or directory

here is what I added to /flash/config.txt (depending on several website:
dtparam=i2c_arm=on
enable_uart=1
dtoverlay=i2c-rtc,ds1307
# Since LibreELEC 8 is running Kernel 4.9.8 we need to add the below
# See <a href="http://www.forum.pimodules.com/viewtopic.php?f=20&amp;t=3442">http://www.forum.pimodules.com/viewtopic.php?f=20&amp;t=3442</a> for an explanation
dtparam=i2c1_baudrate=10000

3rd issue: modification of picofssd
the tutorial recommend to modify the "top picofssd", I have no idea what file I should modify
then I guess I'm stuck there and need to solve those issue before to continue to install the UPS PIco

I have also posted this post on the libreelec forum https://forum.libreelec.tv/thread/9223- ... i2c-issue/ and email the author of the tutorial, but if anyone has some hint on those issue I'll be very gratefull to read it!

Thanks in advance
Jeremie
dudesque
 
Posts: 1
Joined: Mon Jul 10, 2017 4:12 pm

Re: UPS PIco on LibreELEC [RTC and i2c issue]

Postby mivo » Tue Jul 11, 2017 10:48 am

Hi,

some time ago, I get it work inspired by steps from post on olausson.de. I make some things simpler, because PicoFSSD has functions, which require unnecessary dependencies for me (mail notifications...).

Below is my setup on LibreELEC (8.0.2 currently), PIco FSSD (heartbeat), i2c and RTC working. Regarding your questions:

LibreELEC (Kodi) Addons:
  • rpi-tools
  • system-tools

1st issue: nevertheless how to check that
rtc-ds1307 is available as module
i2c-dev is compiled into the Kernel
i2c-bcm2708 is compiled into the Kernel



On my LibreELEC works out of the box

2nd issue: RTC is giving issues and hwclock does not respond properly:

On my setup works OK after complete configuration

3rd issue: modification of picofssd

I am attaching modified PicoFSSD in "mini" variant with less dependencies - and less fuctionality ;) (removed email notifications)

/flash/config.txt - added i2c and RTC config
Code: Select all
...
################################################################################
# End of default configuration
################################################################################

# i2c
dtparam=i2c_arm=on
dtparam=i2c1_baudrate=10000

# RTC
dtoverlay=i2c-rtc,ds1307

################################################################################
# Include distribution specific config file if it exists.
################################################################################
...


Reboot RPi

Create directory - for example: /storage/upspico

Copy picofssd-mini from attachment to /storage/upspico
Copy pico_status_hv3.0-kodi.py from attachment to /storage/upspico

Try to start manually /storage/upspico/picofssd-mini. It should run without errors, it will not output probably anything. LED named "UPS" on PIco should start to blink.

Create SystemD unit for starting daemon:
/storage/.config/system.d/picofssd-mini.service
Code: Select all
[Unit]
Description=UPS PIco file-safe shutdown MINI daemon

[Service]
ExecStart=/storage/upspico/picofssd-mini

[Install]
WantedBy=multi-user.target


Reboot LibreELEC

After reboot, i2cdetect should see PIco on i2c bus:
Code: Select all
LibreELEC:~ # i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU 69 6a 6b 6c 6d 6e 6f
70: -- -- -- -- -- -- -- --
Attachments
upspico-kodi.zip
UPS PIco scripts modified for Kodi
(3.47 KiB) Downloaded 24 times
My toys:
Raspberry Pi 3 + UPS PIco HV3.0 A Stack
Minibian (Raspbian Jessie) + Domoticz beta

RaZberry module + 2x Comet Z-Wave + Z-wave socket
WeMo Switch
mivo
 
Posts: 25
Joined: Fri Apr 21, 2017 9:11 pm
Location: Czechia

Re: UPS PIco on LibreELEC [RTC and i2c issue]

Postby skinlayers » Tue Jul 25, 2017 7:45 pm

Thank you!
This was exactly what I needed!

skinlayers
skinlayers
 
Posts: 7
Joined: Sat Apr 11, 2015 11:10 pm

Re: UPS PIco on LibreELEC [RTC and i2c issue]

Postby Siewert30SW » Fri Aug 11, 2017 9:01 pm

First of all, i'm not a LibreELEC user.
But the issues on why the PIco can't run under LiberELEC.
This week i wanted to support LibreELEC in my new updated UPS Toolkit.
After a few days fiddling i got it to work, was easier then i thought with a little inspiration from mivo .
Don't how much LibreELEC user there are with a PIco ups but i can give support in my upcoming toolkit
Setup:
1x RPi3 - PIco hv3.0A Plus / Domoticz / RFXtrx433E
1x RPi3 - PiHole / logging gas,elec
3x FI9803P Cam
2x Youless Elec/Gas
4x KD101 detectors
a lot of KaKu/CoCo stuff

Domoticz scripts: @ GitHub
pico_installer: @ GitHub
pico_status: @ GitHub
User avatar
Siewert30SW
 
Posts: 190
Joined: Fri Jan 06, 2017 8:06 pm
Location: The Netherlands


Return to UPS PIco HV3.0A

Who is online

Users browsing this forum: No registered users and 2 guests