Outils pour utilisateurs

Outils du site


serialkiller-plugins-sunshine

Installation plugin sunshine

sudo pip install pyephem
#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
import os
import time
 
from skplugins import addValuePlugin, addEventPlugin, addValue, addEvent
from skplugins.weather.sunshine import sunshine
 
server = '192.168.1.1'
while True:
 
    # Check sunshine
    result = sunshine(latitude="43:36:43", longitude="3:53:38", elevation=8)
    addValuePlugin(server, 'city:weather:sunshine', result)
 
    #Sleep
    time.sleep(5)
serialkiller-plugins-sunshine.txt · Dernière modification: 2015/08/12 22:29 (modification externe)