Wetterstation HB-UNI-SEN-WEA

Entwicklung und Bau von Hardware aller Art, die im HM-Umfeld eingesetzt werden kann

Moderator: Co-Administratoren

chka
Beiträge: 2483
Registriert: 13.02.2012, 20:23
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 302 Mal
Danksagung erhalten: 116 Mal

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von chka » 05.08.2018, 10:25

ok danke dir
RaspberryMatic - CuL 868mHz- CuxDemon - PioTek Tracker - Velux mit KLF200 und Somfy Anbindung- io.Broker auf Proxmox NUC6I3SYH i3-6100U RAM: 40Gig Crucial 8GB DDR4 CT2K8G4SFS824A + 32GB DDR4CT32G4SFD8266

jp112sdl
Beiträge: 12116
Registriert: 20.11.2016, 20:01
Hat sich bedankt: 849 Mal
Danksagung erhalten: 2150 Mal
Kontaktdaten:

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von jp112sdl » 05.08.2018, 10:33


VG,
Jérôme ☕️

---
Support for my Homebrew-Devices: Download JP-HB-Devices Addon

chka
Beiträge: 2483
Registriert: 13.02.2012, 20:23
System: Alternative CCU (auf Basis OCCU)
Hat sich bedankt: 302 Mal
Danksagung erhalten: 116 Mal

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von chka » 05.08.2018, 10:43

läuft!
RaspberryMatic - CuL 868mHz- CuxDemon - PioTek Tracker - Velux mit KLF200 und Somfy Anbindung- io.Broker auf Proxmox NUC6I3SYH i3-6100U RAM: 40Gig Crucial 8GB DDR4 CT2K8G4SFS824A + 32GB DDR4CT32G4SFD8266

Boru
Beiträge: 6
Registriert: 05.08.2018, 20:05

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von Boru » 05.08.2018, 20:18

Hello, please forgive me, but I do not not speak German and have to use English.
I'm was looking to possibility add english translation to HB-UNI-SEN-WEA addon and found multiple "stringTableWeatherAnemometerRadius" assignment in install_hb-uni-sen-wea file. Is it correct?

Code: Alles auswählen

stringtable_deInsert="WEATHER|ANEMOMETER_RADIUS	\${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|ANEMOMETER_RADIUS"`" ]; then
    sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi

stringtable_deInsert="WEATHER|ANEMOMETER_CALIBRATION_FACTOR	\${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|ANEMOMETER_CALIBRATION_FACTOR"`" ]; then
    sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi

stringtable_deInsert="WEATHER|LD_CAPACITOR	\${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|LD_CAPACITOR"`" ]; then
    sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi

stringtable_deInsert="WEATHER|LD_DISTURBER_DETECTION	\${stringTableWeatherAnemometerRadius} \n"
if [ -z "`cat $stringtable_deFile | grep \"WEATHER|LD_DISTURBER_DETECTION "`" ]; then
    sed -i "1s/^/\1$stringtable_deInsert/" $stringtable_deFile
fi
Boru

jp112sdl
Beiträge: 12116
Registriert: 20.11.2016, 20:01
Hat sich bedankt: 849 Mal
Danksagung erhalten: 2150 Mal
Kontaktdaten:

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von jp112sdl » 05.08.2018, 20:28

Hi!

In fact, there is only a file stringtable_de.txt in /www/config which contains references to the german translation list.
I don't know why there is only that one file for german language at this place.
But that's not the problem.
Take a look at the section

Code: Alles auswählen

### Edit translate.lang.stringtable.js ###

translate_deFile="/www/webui/js/lang/de/translate.lang.stringtable.js"
...
There you will find the translated german descriptions.
If you want to put your english description, you have to do it in /www/webui/js/lang/en/translate.lang.stringtable.js.

All you have to do, is changing the path to it:

Code: Alles auswählen

### Edit translate.lang.stringtable.js ###

translate_deFile="/www/webui/js/lang/en/translate.lang.stringtable.js"
...
and change the german translation to your english one, i.e.:

Code: Alles auswählen

translate_deInsert="\n    \"stringTableWeatherGustSpeed\" : \"Boe-Geschwindigkeit\","
gets to

Code: Alles auswählen

translate_deInsert="\n    \"stringTableWeatherGustSpeed\" : \"Gust Speed\","
.

And if you want to do it exact, you can also change every variable, that starts with "translate_de..." to "translate_en...".
translate_enFile, translate_enInsert and so on.

VG,
Jérôme ☕️

---
Support for my Homebrew-Devices: Download JP-HB-Devices Addon

Boru
Beiträge: 6
Registriert: 05.08.2018, 20:05

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von Boru » 05.08.2018, 20:38

Thank you! I will do it in this way.
By the way, amazing job... appreciate.

Boru

jp112sdl
Beiträge: 12116
Registriert: 20.11.2016, 20:01
Hat sich bedankt: 849 Mal
Danksagung erhalten: 2150 Mal
Kontaktdaten:

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von jp112sdl » 05.08.2018, 21:16

Thanks a lot!

And if you want, you can send me your translated values so that I can put it into the addon.

VG,
Jérôme ☕️

---
Support for my Homebrew-Devices: Download JP-HB-Devices Addon

Boru
Beiträge: 6
Registriert: 05.08.2018, 20:05

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von Boru » 05.08.2018, 21:28

It would be great, because for me harder part is find, how to execute sh script in homematic console.

Code: Alles auswählen

### Edit english translate.lang.stringtable.js ###

translate_enFile="/www/webui/js/lang/en/translate.lang.stringtable.js"
translate_enSearch="\"dummy\" : \"\","

translate_enInsert="\n    \"stringTableHbWeaAltitude\" : \"Height Above Sea Level\","
if [ -z "`cat $translate_enFile | grep \"stringTableHbWeaAltitude\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherGustSpeed\" : \"Gust-Speed\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherGustSpeed\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherUvIndex\" : \"UV-Index\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherUvIndex\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherLightningCounter\" : \"Lightning-Counter\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningCounter\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherLightningDistance\" : \"Lightning-Distance\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningDistance\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherAnemometerRadius\" : \"Anemometer Radius\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherAnemometerRadius\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherAnemometerCalibrationFactor\" : \"Anemometer Calibration Factor\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherAnemometerCalibrationFactor\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherLightningDetectorCapacitor\" : \"Lightning Detector Capacitor\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningDetectorCapacitor\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherLightningDetectorDisturberDetection\" : \"Lightning Detector Disturber Detection\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherLightningDetectorDisturberDetection\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherGustThresholdExtraMessage\" : \"Gust Threshold Extra Message\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherGustThresholdExtraMessage\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherRdHeating\" : \"Rain Detector Heating\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherRdHeating\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherRdHeatingTrue\" : \"Rain Detector Heating ON\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherRdHeatingTrue\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi

translate_enInsert="\n    \"stringTableWeatherRdHeatingFalse\" : \"Rain Detector Heating OFF\","
if [ -z "`cat $translate_enFile | grep \"stringTableWeatherRdHeatingFalse\"`" ]; then
	sed -i "s/\($translate_enSearch\)/\1$translate_enInsert/g" $translate_enFile
fi
Thanks again.
Boru

jp112sdl
Beiträge: 12116
Registriert: 20.11.2016, 20:01
Hat sich bedankt: 849 Mal
Danksagung erhalten: 2150 Mal
Kontaktdaten:

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von jp112sdl » 05.08.2018, 22:14

There is one small mistake in the screenshot:
Bildschirmfoto 2018-08-05 um 22.07.36.png
But I have already fixed it in the code.

The english descriptions are now available in Addon Version 1.12

And don't bother, if there are not all parameters availabe in your current device settings.

The last 5 are new and will appear with the next release of HB-UNI-SEN-WEA sketch, version 1.4 in a few days.

VG,
Jérôme ☕️

---
Support for my Homebrew-Devices: Download JP-HB-Devices Addon

Boru
Beiträge: 6
Registriert: 05.08.2018, 20:05

Re: Wetterstation HB-UNI-SEN-WEA

Beitrag von Boru » 05.08.2018, 22:30

Wow, its working!

Antworten

Zurück zu „Hardwareentwicklung und Selbstbau von Aktoren und Sensoren“