File domoticz-buienradar-plugin.spec of Package domoticz-buienradar-plugin

%define   plugin_name   domoticz-buienradar

Name:     %{plugin_name}-plugin
Version:  0
Release:  0
Summary:  Domoticz Buienradar.nl Weather Lookup Plugin
License:  MIT
Group:    Productivity/Networking/Web/Servers
URL:      https://github.com/ffes/domoticz-buienradar
Source0:  %{plugin_name}-%{version}.tar.xz
Requires: domoticz
Requires: python3-requests


%description
This is a virtual hardware plugin to add weather information from Buienradar.nl to your Domoticz interface.

It gets the xml weather feed from http://xml.buienradar.nl, finds the weather station nearby your location and add the relevant weather information to your Domoticz interface.

Since it uses buienradar.nl it only works for locations in The Netherlands.

Set your location in the Domoticz settings:

* Den Haag
lat_dh = 52.095556
lon_dh = 4.316389
* Maastricht
lat_mt = 50.849722
lon_mt = 5.693056
* Schiermonnikoog
lat_so = 53.489167
lon_so = 6.202222
* Cadzand (Zeeuws Vlaanderen)
lat_cd = 51.367778
lon_cd = 3.408056
* Berlijn
lat_be = 52.516667
lon_be = 13.416667


%prep
%setup -q -n %{plugin_name}-%{version}


%build


%install
mkdir -p %{buildroot}%{_datadir}/domoticz/plugins/%{plugin_name}
cp -r . %{buildroot}%{_datadir}/domoticz/plugins/%{plugin_name}/



%pre


%post
%systemd_post domoticz.service


%preun
%systemd_preun domoticz.service


%postun
%systemd_postun_with_restart domoticz.service



%files
%license LICENSE.md
%doc ReadMe.md ChangeLog.md
%dir %{_datadir}/domoticz
%dir %{_datadir}/domoticz/plugins
%defattr(-,domoticz,domoticz)
%{_datadir}/domoticz/plugins/%{plugin_name}


%changelog
openSUSE Build Service is sponsored by