ntopng , fritzbox (fritzdump.sh) and geolocation

The latest browsers have removed the Geolocation API from unsecured Origins. If you still want to use Geo-API tools with fritzdump.sh ntopng needs to run secure, based on ssl (TLS).

ntopng has written a nice howto to use let’s encrypt-based certs.

But what needs to be adjusted on the firtzdump.sh script ?

if you want to run only ntopng with TLS on port 3001 and disable http the original line:

wget --no-check-certificate -qO- $FRITZIP/cgi-bin/capture_notimeout?ifaceorminor=$IFACE\&snaplen=\&capture=Start\&sid=$SID | ntopng -i -

should be adjusted to:

wget --no-check-certificate -qO- $FRITZIP/cgi-bin/capture_notimeout?ifaceorminor=$IFACE\&snaplen=\&capture=Start\&sid=$SID | ntopng --https-port=3001 --http-port=0 -i -

Done 🙂

Integration of Tradfri and Netatmo on Openhab2

Prerequisites:

add Tradfri Binding

add Netatmo Binding

content of default.items:

[html] Switch Wz_Lampe "Wohnzimmer Lampe" <light> { channel="tradfri:0220:gwdcefcabd0899:65566:brightness" } Number:Temperature Netatmo_Indoor_Temperature "Temperatur [%.1f %unit%]" <temperature> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:Temperature" } Number:Dimensionless Netatmo_Indoor_Humidity "Luftfeuchtigkeit [%d %unit%]" <humidity> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:Humidity" } Number Netatmo_Indoor_Humidex "Hitze-Index [%.0f]" <temperature_hot> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:Humidex" } Number:Temperature Netatmo_Indoor_HeatIndex "Maximal-Temperatur [%.1f %unit%]" <temperature_hot> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:HeatIndex" } Number:Dimensionless Netatmo_Indoor_Co2 "Co2 [%d %unit%]" <carbondioxide> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:Co2" } Number:Pressure Netatmo_Indoor_Pressure "Luftdruck [%.1f %unit%]" <pressure> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:Pressure" } Number:Pressure Netatmo_Indoor_AbsolutePressure "Absoluter Luftdruck [%.1f %unit%]" <pressure> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:AbsolutePressure" } Number:Dimensionless Netatmo_Indoor_Noise "Geräusche [%d %unit%]" <soundvolume> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:Noise" } Number Netatmo_Indoor_WifiStatus "WifiStatus [%s]" <signal> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:WifiStatus" } DateTime Netatmo_Indoor_TimeStamp "TimeStamp [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" <calendar> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:TimeStamp" } DateTime Netatmo_Indoor_LastStatusStore "LastStatusStore [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" <text> { channel = "netatmo:NAMain:2091c6dc:70ee5018ff12:LastStatusStore" } Number Out_Temp "Temperature [%.1f °C]" {channel="netatmo:NAModule1:2091c6dc:02000019da1a:Temperature"} Number Out_Luft "Luftfeuchtigkeit [%d %unit%]" {channel="netatmo:NAModule1:2091c6dc:02000019da1a:Humidity"} Number Wz_Fb "Batterie Wohnzimmer [1f]" {channel="tradfri:0830:gwdcefcabd0899:65565:battery_level"} Switch Wz_Fbb { channel="tradfri:0830:gwdcefcabd0899:65565:battery_low" } Number Ku_Fb "Batterie Kueche [1f]" {channel="tradfri:0830:gwdcefcabd0899:65562:battery_level"} Switch Ku_Fbb { channel="tradfri:0830:gwdcefcabd0899:65562:battery_low" } Number Ul_Fb "Batterie Uli [1f]" {channel="tradfri:0830:gwdcefcabd0899:65536:battery_level"} Switch Ul_Fbb { channel="tradfri:0830:gwdcefcabd0899:65536:battery_low" } Number Ma_Fb "Batterie Marie [1f]" {channel="tradfri:0830:gwdcefcabd0899:65555:battery_level"} Switch Ma_Fbb { channel="tradfri:0830:gwdcefcabd0899:65555:battery_low" } Number Eg_Bm "" {channel="tradfri:0107:gwdcefcabd0899:65558:battery_level"} Switch Eg_Bmb { channel="tradfri:0107:gwdcefcabd0899:65558:battery_low" } Number Og_Bm "" {channel="tradfri:0107:gwdcefcabd0899:65553:battery_level"} Switch Og_Bmb { channel="tradfri:0107:gwdcefcabd0899:65553:battery_low" } [/html]

content of default.sitemap

[html] sitemap default label="KS23" { Frame label="Wohnzimmer" { Switch item=Wz_Lampe label="Wohnzimmer Lampe" Text item=Netatmo_Indoor_Temperature Text item=Netatmo_Indoor_Humidity Text item=Netatmo_Indoor_Humidex valuecolor=[<20.1="green",<29.1="blue",<28.1="yellow",<45.1="orange",<54.1="red",>54.1="maroon"] Text item=Netatmo_Indoor_HeatIndex Text item=Netatmo_Indoor_Co2 valuecolor=[<800="green",<1000="orange",<1400="red",>1399="maroon"] Text item=Netatmo_Indoor_Pressure Text item=Netatmo_Indoor_AbsolutePressure Text item=Netatmo_Indoor_Noise Text item=Netatmo_Indoor_WifiStatus Text item=Netatmo_Indoor_TimeStamp Text item=Netatmo_Indoor_LastStatusStore } Frame label="Aussen" { Text item=Out_Temp label="Temperatur [%.1f °C]" icon="temperature" Text item=Out_Luft } Frame label="Battery" { Text item=Wz_Fb label="Wohnzimmer Fernbedienung [%d %%] " icon="battery" Switch item=Wz_Fbb label="Battery low warning" Text item=Ku_Fb label="Kueche Fernbedienung [%d %%]" icon="battery" Switch item=Ku_Fbb label="Battery low warning" Text item=Ul_Fb label="Uli Fernbedienung [%d %%]" icon="battery" Switch item=Ul_Fbb label="Battery low warning" Text item=Ma_Fb label="Marie Fernbedienung [%d %%]" icon="battery" Switch item=Ma_Fbb label="Battery low warning" Text item=Og_Bm label="Obergeschoss Bewegungsmelder [%d %%]" icon="battery" Switch item=Og_Bmb label="Battery low warning" Text item=Eg_Bm label="Erdgeschoss Bewegungsmelder [%d %%]" icon="battery" Switch item=Eg_Bmb label="Battery low warning" } } [/html]

Gui looks like: