Git Product home page Git Product logo

domoticz-airly's People

Contributors

ajarzyn avatar chkdsk88 avatar lrybak avatar tschaban avatar z1mek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

domoticz-airly's Issues

segmentation fault on Raspbian Buster

hej
following the upgrade to Buster on Raspbian, domoticz is failing with segemnantion fault, see log:
2019-07-02 22:45:34.893 Error: Thread 4 (Thread 0x74d98220 (LWP 24290)):
2019-07-02 22:45:34.893 Error: #0 __waitpid (options=0, stat_loc=0x74d958b8, pid=24316) at ../sysdeps/unix/sysv/linux/waitpid.c:30
2019-07-02 22:45:34.893 Error: #1 __waitpid (pid=24316, stat_loc=0x74d958b8, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:25
2019-07-02 22:45:34.893 Error: #2 0x00112a10 in dumpstack_gdb(bool) ()
2019-07-02 22:45:34.893 Error: #3 0x00112ffc in signal_handler(int, siginfo_t*, void*) ()
2019-07-02 22:45:34.893 Error: #4
2019-07-02 22:45:34.893 Error: #5 raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:50
2019-07-02 22:45:34.893 Error: #6
2019-07-02 22:45:34.893 Error: #7 0x76de1a1c in __pthread_rwlock_wrlock_full (abstime=0x0, rwlock=0x0) at pthread_rwlock_common.c:576
2019-07-02 22:45:34.893 Error: #8 __GI___pthread_rwlock_wrlock (rwlock=0x0) at pthread_rwlock_wrlock.c:27
2019-07-02 22:45:34.893 Error: #9 0x6925fd58 in CRYPTO_THREAD_write_lock () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1
2019-07-02 22:45:34.894 Error: #10 0x6928bf40 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1
Segmentation fault

as per some analisys, issue is purly related to this plugin - see domoticz forum post

I've tried a little to analyze the code of plugin .. but no time for deeper investigation...

mozesz pomoc Kolego :)

pozdr
m.

PS. Airly is one of the important plugin, lovely working to provide data from system during bad air in the world

Better handling of exceptions

Better handling of exceptions in situation of invalid credentials (api key), api rate limit exceeded, json decode error

zaokrąglanie wartosci procentowych dla poprawnego exportu do influxdb

Przy uzyciu data push'a do influxdb wartosc procentowe UNIT_{PM10,PM25}_PERCENTAGE oraz UNIT_AIR_QUALITY_INDEX muszą być liczbami całkowitymi, influxdb dla percentage potrzebuje integera. Prosba o zmiane:

~/domoticz/plugins/domoticz-airly-v2 $ head -n 436 plugin.py |tail -1
self.variables[self.UNIT_PM10_PERCENTAGE]['sValue'] = str(round((values["PM10"]/self.UNIT_PM10_NORM) * 100))
~/domoticz/plugins/domoticz-airly-v2 $ head -n 442 plugin.py |tail -1
self.variables[self.UNIT_PM25_PERCENTAGE]['sValue'] = str(round((values["PM25"] / self.UNIT_PM25_NORM) * 100))
~/domoticz/plugins/domoticz-airly-v2 $ head -n 452 plugin.py |tail -1
self.variables[self.UNIT_AIR_QUALITY_INDEX]['sValue'] = str(round(res["indexes"][0]["value"]))

Błąd (Airly) Nierozpoznany błąd: type NoneType doesn't define __round__ method

Hej.
Otrzymuję w logach taki oto błąd: (Airly) Nierozpoznany błąd: type NoneType doesn't define round method
i dane się nie aktualizują.
Czym to może być spowodowane?
EDIT:
dzieję się to tylko na jednym czujniku (najbliżej mojej lokalizacji) 7938. Na stronie i w aplikacji airly jest online i pokazuje dane.
Na innych w dalszej okolicy np.: 7817 jest OK

Airly plugin "AttributeError" - Domoticz 4.10717, Python 3.7.3 Armbian Buster

2019-12-01 17:52:26.462 (Myslenicka) Debug logging mask set to: NONE
2019-12-01 17:52:26.458 Status: (Myslenicka) Entering work loop.
2019-12-01 17:52:26.458 Status: (Myslenicka) Initialized version 0.3.0, author 'fisher'
2019-12-01 17:52:26.857 Error: (Myslenicka) 301: Installation was replaced with another one
2019-12-01 17:52:26.859 Error: (Myslenicka) 'onStart' failed 'AttributeError'.
2019-12-01 17:52:26.859 Error: (Myslenicka) ----> Line 669 in '/home/domoticz/domoticz/plugins/domoticz-airly/plugin.py'
2019-12-01 17:52:26.859 Error: (Myslenicka) ----> Line 286 in '/home/domoticz/domoticz/plugins/domoticz-airly/plugin.py'
2019-12-01 17:52:26.859 Error: (Myslenicka) ----> Line 417 in '/home/domoticz/domoticz/plugins/domoticz-airly/plugin.py'

ID 6885 - Kraków Myślenicka
Nie dodaje żadnego czujnika IDX, tylko ten błąd w logach.

"AttributeError" - Domoticz 4.970, Python 3.5.3, Raspbian Stretch

2018-11-02 09:02:51.176 (Airly) onStop called
2018-11-02 09:02:51.176 (Airly) Debug logging mask set to: NONE
2018-11-02 09:02:51.771 (Airly) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2018-11-02 09:02:51.771 (Airly) 'Mode1':'IA1kIUtbdp44qBRqxVjlxh8CYfOCxmd3'
2018-11-02 09:02:51.771 (Airly) 'DomoticzHash':'a3a45906'
2018-11-02 09:02:51.771 (Airly) 'Key':'AIRLY'
2018-11-02 09:02:51.771 (Airly) 'Author':'fisher'
2018-11-02 09:02:51.771 (Airly) 'Name':'Airly'
2018-11-02 09:02:51.771 (Airly) 'Version':'0.3.0'
2018-11-02 09:02:51.771 (Airly) 'DomoticzVersion':'4.9700'
2018-11-02 09:02:51.771 (Airly) 'HomeFolder':'/home/pi/domoticz/plugins/domoticz-airly/'
2018-11-02 09:02:51.771 (Airly) 'HardwareID':'32'
2018-11-02 09:02:51.771 (Airly) 'DomoticzBuildTime':'2018-06-23 16:24:51'
2018-11-02 09:02:51.771 (Airly) 'Port':'0'
2018-11-02 09:02:51.771 (Airly) 'Mode3':'15'
2018-11-02 09:02:51.772 (Airly) 'Mode2':'i2531'
2018-11-02 09:02:51.772 (Airly) 'Mode6':'Debug'
2018-11-02 09:02:51.772 (Airly) Device count: 0
2018-11-02 09:02:51.772 (Airly) Pushing 'PollIntervalDirective' on to queue
2018-11-02 09:02:51.772 (Airly) onHeartbeat called
2018-11-02 09:02:51.772 (Airly) Processing 'PollIntervalDirective' message
2018-11-02 09:02:51.772 (Airly) Heartbeat interval set to: 20.
2018-11-02 09:02:51.157 Status: (Airly) Stop directive received.
2018-11-02 09:02:51.357 Status: (Airly) Stopping threads.
2018-11-02 09:02:51.410 Status: (Airly) Exiting work loop.
2018-11-02 09:02:51.410 Status: (Airly) Stopped.
2018-11-02 09:02:51.410 Status: (Airly) Started.
2018-11-02 09:02:51.769 Status: (Airly) Initialized version 0.3.0, author 'fisher'
2018-11-02 09:02:51.769 Status: (Airly) Entering work loop.
2018-11-02 09:02:51.772 Error: (Airly) 'onStart' failed 'AttributeError'.
2018-11-02 09:02:51.772 Error: (Airly) ----> Line 669 in /home/pi/domoticz/plugins/domoticz-airly/plugin.py, function onStart
2018-11-02 09:02:51.772 Error: (Airly) ----> Line 286 in /home/pi/domoticz/plugins/domoticz-airly/plugin.py, function onStart
2018-11-02 09:02:51.772 Error: (Airly) ----> Line 417 in /home/pi/domoticz/plugins/domoticz-airly/plugin.py, function onHeartbeat

Plugin will stop updating domoticz if Airly sensor is not reachable

If Airly sensor connection fails plugin will never update Domoticz since we set variable self.inProgress = True and never change it to False.

Proposed fix in function OnHeartbeat around line 360:
except SensorNotFoundException as snfe:
self.inProgress = False
Domoticz.Error(("Sensor id (%(sensor_id)d) not exists") % {'sensor_id': int(Parameters["Mode2"])})
except UnauthorizedException as ue:
self.inProgress = False
Domoticz.Error(
("Not authorized"))

As you can see I added "self.inProgress = False" when exception is caught.

Pobieranie danych ze: Stacja Państwowego Monitoringu Powietrza

Cześć,
na początek - świetna wtyczka - nie maiłem problemów z dodaniem i obsługą.
Mam natomiast pytanie odnośnie pobierania danych z innych czujników niż Airly : Stacje Państwowego Monitoringu Powietrza. Chodzi o NOx i SOx i O3. Jest szansa że takie stacje tez byłyby obsłużone?
Mam jeszcze mały problem z którym nie mogę sobie poradzić, może to tez nie jest dobre miejsce na takie pytania: jak pobrać dane z procentowych wskaźników przekroczenia normy? Próbowałem 'domoticz.devices('Airly - PM10 Norma').PM10_PERCENTAGE' ale bez rezultatu. Chciałem użyć w powiadomieniach, resztę danych udąło mi się odczytać.
z góry dzięki za odpowiedź.

Pobieranie pomiarów według najbliższej lokalizacji sensora

Witam,
W mojej okolicy jest kilka czujników smogu które są zarejestrowane w Airly,
często zdarza się że czujniki ulegają awarii i dane w domoticz są nie aktualne,
Czy można dodać np 3 stacje w konfiguracji i domoticz będzie sobie wybierał pierwszą która działa?
Lub aby przedstawiał średnią z 2/3 czujników Airly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.