by the way:
there is a problem if you just parse for “port” IF you use a plugin with “a port” like kodi
Holiday Script
by the way:
there is a problem if you just parse for “port” IF you use a plugin with “a port” like kodi
@dk00000 & @temp
The following construct in ‘pimaticAPI.sh’ should make it more reliable.
pimatic_pwd=$(grep -B 2 -A 2 -w “\“role\”: \“admin\”” $PIMATIC_CONFIG_FILE | grep -w “password” | awk ‘BEGIN{FS="\"";} {print $4;}’)
pimatic_port=$(grep -B 2 -A 2 -w “\“httpServer\”” $PIMATIC_CONFIG_FILE | grep “\“port\”” | awk ‘{print $2}’)
I`ve got some issues with pimaticand my new raspberry pi ,I changed from the borrowed one to my own one and realised today that the
rpi-update
command doesn’t work with raspberry-pi2 therefore I need to reinstall on monday my pi again first…sorry for the delay
just a quick hint:
the url is case sensitive and there is one F*** upper case letter:
http://www.ferienkalender.com/ferien_deutschland/Sachsen/2015-ferien-sachsen.htm
seems that there is a mistake while grepping the public holiday from the url:
this ist my result:
" - Buß- und Bettag</b></td><td align=right>Mittwoch 18.11.2015 "
could you help please
I remember that I faced similar problems while setting it up and changed the grepping.
here’s my phinfo for Hessen.
maybe it will help you when changing the string.
http://pastebin.com/C1HW5cru
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebook
make it so !
@leader21
thanks chris, i will test it
@leader21
looks a little bit better but it shows still ß
instead of ß
any ideas?
Not at the first glance.
seems to be the HTML format that is grepped and taken over 1:1 to the string variable of pimatic.
guess this will only happen at this holiday since I do not remember any other German holiday with special characters
edit: there’s Mariä Himmelfahrt and Heilige Drei Könige (sorry we don’t have them in Hessen therefore I wasn’t aware)
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebook
make it so !
@leader21 said:
seems to be the HTML format that is grepped and taken over 1:1 to the string variable of pimatic.
Yes, special caracters in HTML are escaped this way - see also http://designerzone.de/html-umlaute-und-sonderzeichen/
May be you can integrate some conversion tool, e.g. html2text
which is a package of its own with Debian, i.e. sudo apt-get install html2text
For the example above you will get the following:
pi@raspi2 ~ $ echo " - Buß- und Bettag</b></td><td align=right>Mittwoch 18.11.2015 " | html2text -utf8
- Buß- und Bettag
Mittwoch 18.11.2015
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law