diff options
Diffstat (limited to 'pkgs/servers/home-assistant')
| -rw-r--r-- | pkgs/servers/home-assistant/appdaemon.nix | 106 | ||||
| -rw-r--r-- | pkgs/servers/home-assistant/component-packages.nix | 82 | ||||
| -rw-r--r-- | pkgs/servers/home-assistant/default.nix | 378 | ||||
| -rw-r--r-- | pkgs/servers/home-assistant/frontend.nix | 4 |
4 files changed, 410 insertions, 160 deletions
diff --git a/pkgs/servers/home-assistant/appdaemon.nix b/pkgs/servers/home-assistant/appdaemon.nix index f805d45b2124..7b100b692a32 100644 --- a/pkgs/servers/home-assistant/appdaemon.nix +++ b/pkgs/servers/home-assistant/appdaemon.nix @@ -3,79 +3,61 @@ , fetchFromGitHub }: -let - python = python3.override { - packageOverrides = self: super: { - astral = super.astral.overridePythonAttrs (oldAttrs: rec { - version = "1.10.1"; - src = oldAttrs.src.override { - inherit version; - sha256 = "1wbvnqffbgh8grxm07cabdpahlnyfq91pyyaav432cahqi1p59nj"; - }; - }); - - bcrypt = super.bcrypt.overridePythonAttrs (oldAttrs: rec { - version = "3.1.7"; - src = oldAttrs.src.override { - inherit version; - sha256 = "CwBpx1LsFBcsX3ggjxhj161nVab65v527CyA0TvkHkI="; - }; - }); - - yarl = super.yarl.overridePythonAttrs (oldAttrs: rec { - version = "1.4.2"; - src = oldAttrs.src.override { - inherit version; - sha256 = "WM2cRp7O1VjNgao/SEspJOiJcEngaIno/yUQQ1t+90s="; - }; - }); - }; - }; - -in python.pkgs.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "appdaemon"; - version = "4.0.5"; - disabled = python.pythonOlder "3.6"; + version = "4.0.8"; + disabled = python3.pythonOlder "3.6"; src = fetchFromGitHub { owner = "AppDaemon"; repo = pname; rev = version; - sha256 = "7o6DrTufAC+qK3dDfpkuQMQWuduCZ6Say/knI4Y07QM="; + sha256 = "04a4qx0rbx2vpkzpibmwkpy7fawa6dbgqlrllryrl7dchbrf703q"; }; - propagatedBuildInputs = with python.pkgs; [ - daemonize astral requests websocket_client aiohttp yarl jinja2 - aiohttp-jinja2 pyyaml voluptuous feedparser iso8601 bcrypt paho-mqtt setuptools - deepdiff dateutil bcrypt python-socketio pid pytz sockjs pygments - azure-mgmt-compute azure-mgmt-storage azure-mgmt-resource azure-keyvault-secrets azure-storage-blob - ]; - - # no tests implemented - doCheck = false; - + # relax dependencies postPatch = '' substituteInPlace requirements.txt \ - --replace "pyyaml==5.3" "pyyaml" \ - --replace "pid==2.2.5" "pid" \ - --replace "Jinja2==2.11.1" "Jinja2" \ - --replace "pytz==2019.3" "pytz" \ - --replace "aiohttp==3.6.2" "aiohttp>=3.6" \ - --replace "iso8601==0.1.12" "iso8601>=0.1" \ - --replace "azure==4.0.0" "azure-mgmt-compute - azure-mgmt-storage - azure-mgmt-resource + --replace "deepdiff==5.2.3" "deepdiff" \ + --replace "pygments==2.8.1" "pygments" + sed -i 's/==/>=/' requirements.txt + ''; + + propagatedBuildInputs = with python3.pkgs; [ + aiodns + aiohttp + aiohttp-jinja2 + astral azure-keyvault-secrets - azure-storage-blob" \ - --replace "sockjs==0.10.0" "sockjs" \ - --replace "deepdiff==4.3.1" "deepdiff" \ - --replace "voluptuous==0.11.7" "voluptuous" \ - --replace "python-socketio==4.4.0" "python-socketio" \ - --replace "feedparser==5.2.1" "feedparser>=5.2.1" \ - --replace "aiohttp_jinja2==1.2.0" "aiohttp_jinja2>=1.2.0" \ - --replace "pygments==2.6.1" "pygments>=2.6.1" \ - --replace "paho-mqtt==1.5.0" "paho-mqtt>=1.5.0" \ - --replace "websocket-client==0.57.0" "websocket-client>=0.57.0" + azure-mgmt-compute + azure-mgmt-resource + azure-mgmt-storage + azure-storage-blob + bcrypt + cchardet + deepdiff + feedparser + iso8601 + jinja2 + paho-mqtt + pid + pygments + python-dateutil + python-engineio + python-socketio + pytz + pyyaml + requests + sockjs + uvloop + voluptuous + websocket_client + yarl + ]; + + # no tests implemented + checkPhase = '' + $out/bin/appdaemon -v | grep -q "${version}" ''; meta = with lib; { diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index cf8c0641bc74..afdf3be0acdf 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2021.4.6"; + version = "2021.5.5"; components = { "abode" = ps: with ps; [ abodepy ]; "accuweather" = ps: with ps; [ accuweather ]; @@ -40,7 +40,7 @@ "apcupsd" = ps: with ps; [ ]; # missing inputs: apcaccess "api" = ps: with ps; [ aiohttp-cors ]; "apns" = ps: with ps; [ ]; # missing inputs: apns2 - "apple_tv" = ps: with ps; [ aiohttp-cors netdisco pyatv zeroconf ]; + "apple_tv" = ps: with ps; [ aiohttp-cors netdisco pyatv pyroute2 zeroconf ]; "apprise" = ps: with ps; [ apprise ]; "aprs" = ps: with ps; [ geopy ]; # missing inputs: aprslib "aqualogic" = ps: with ps; [ aqualogic ]; @@ -89,7 +89,7 @@ "bloomsky" = ps: with ps; [ ]; "blueprint" = ps: with ps; [ ]; "bluesound" = ps: with ps; [ xmltodict ]; - "bluetooth_le_tracker" = ps: with ps; [ ]; # missing inputs: pygatt[GATTTOOL] + "bluetooth_le_tracker" = ps: with ps; [ pygatt ]; "bluetooth_tracker" = ps: with ps; [ bt_proximity pybluez ]; "bme280" = ps: with ps; [ smbus-cffi ]; # missing inputs: i2csense "bme680" = ps: with ps; [ bme680 smbus-cffi ]; @@ -109,8 +109,8 @@ "caldav" = ps: with ps; [ caldav ]; "calendar" = ps: with ps; [ aiohttp-cors ]; "camera" = ps: with ps; [ aiohttp-cors ]; - "canary" = ps: with ps; [ ha-ffmpeg ]; # missing inputs: py-canary - "cast" = ps: with ps; [ aiohttp-cors hass-nabucasa mutagen plexapi plexauth plexwebsocket PyChromecast zeroconf ]; + "canary" = ps: with ps; [ ha-ffmpeg py-canary ]; + "cast" = ps: with ps; [ aiohttp-cors hass-nabucasa mutagen plexapi plexauth plexwebsocket PyChromecast pyroute2 zeroconf ]; "cert_expiry" = ps: with ps; [ ]; "channels" = ps: with ps; [ pychannels ]; "circuit" = ps: with ps; [ ]; # missing inputs: circuit-webhook @@ -133,6 +133,7 @@ "comed_hourly_pricing" = ps: with ps; [ ]; "comfoconnect" = ps: with ps; [ pycomfoconnect ]; "command_line" = ps: with ps; [ ]; + "compensation" = ps: with ps; [ numpy ]; "concord232" = ps: with ps; [ ]; # missing inputs: concord232 "config" = ps: with ps; [ aiohttp-cors ]; "configurator" = ps: with ps; [ ]; @@ -155,28 +156,28 @@ "deconz" = ps: with ps; [ pydeconz ]; "decora" = ps: with ps; [ bluepy ]; # missing inputs: decora "decora_wifi" = ps: with ps; [ ]; # missing inputs: decora_wifi - "default_config" = ps: with ps; [ pynacl aiodiscover aiohttp-cors async-upnp-client defusedxml distro emoji hass-nabucasa netdisco pillow scapy sqlalchemy zeroconf ]; - "delijn" = ps: with ps; [ ]; # missing inputs: pydelijn + "default_config" = ps: with ps; [ pynacl aiodiscover aiohttp-cors async-upnp-client defusedxml distro emoji hass-nabucasa netdisco pillow pyroute2 scapy sqlalchemy zeroconf ]; + "delijn" = ps: with ps; [ pydelijn ]; "deluge" = ps: with ps; [ deluge-client ]; "demo" = ps: with ps; [ aiohttp-cors ]; "denon" = ps: with ps; [ ]; - "denonavr" = ps: with ps; [ denonavr getmac ]; + "denonavr" = ps: with ps; [ denonavr ]; "derivative" = ps: with ps; [ ]; "deutsche_bahn" = ps: with ps; [ schiene ]; "device_automation" = ps: with ps; [ ]; "device_sun_light_trigger" = ps: with ps; [ aiohttp-cors pillow ]; "device_tracker" = ps: with ps; [ ]; - "devolo_home_control" = ps: with ps; [ aiohttp-cors devolo-home-control-api zeroconf ]; + "devolo_home_control" = ps: with ps; [ aiohttp-cors devolo-home-control-api pyroute2 zeroconf ]; "dexcom" = ps: with ps; [ pydexcom ]; "dhcp" = ps: with ps; [ aiodiscover scapy ]; - "dht" = ps: with ps; [ ]; # missing inputs: Adafruit-DHT + "dht" = ps: with ps; [ ]; # missing inputs: adafruit-circuitpython-dht "dialogflow" = ps: with ps; [ aiohttp-cors ]; "digital_ocean" = ps: with ps; [ digital-ocean ]; "digitalloggers" = ps: with ps; [ ]; # missing inputs: dlipower "directv" = ps: with ps; [ ]; # missing inputs: directv "discogs" = ps: with ps; [ discogs_client ]; "discord" = ps: with ps; [ discordpy ]; - "discovery" = ps: with ps; [ aiohttp-cors netdisco zeroconf ]; + "discovery" = ps: with ps; [ aiohttp-cors netdisco pyroute2 zeroconf ]; "dlib_face_detect" = ps: with ps; [ face_recognition ]; "dlib_face_identify" = ps: with ps; [ face_recognition ]; "dlink" = ps: with ps; [ ]; # missing inputs: pyW215 @@ -196,7 +197,7 @@ "dwd_weather_warnings" = ps: with ps; [ dwdwfsapi ]; "dweet" = ps: with ps; [ ]; # missing inputs: dweepy "dynalite" = ps: with ps; [ ]; # missing inputs: dynalite_devices - "dyson" = ps: with ps; [ aiohttp-cors libpurecool zeroconf ]; + "dyson" = ps: with ps; [ aiohttp-cors libpurecool pyroute2 zeroconf ]; "eafm" = ps: with ps; [ aioeafm ]; "ebox" = ps: with ps; [ ]; # missing inputs: pyebox "ebusd" = ps: with ps; [ ]; # missing inputs: ebusdpy @@ -218,6 +219,7 @@ "emby" = ps: with ps; [ pyemby ]; "emoncms" = ps: with ps; [ ]; "emoncms_history" = ps: with ps; [ ]; + "emonitor" = ps: with ps; [ aioemonitor ]; "emulated_hue" = ps: with ps; [ aiohttp-cors ]; "emulated_kasa" = ps: with ps; [ ]; # missing inputs: sense_energy "emulated_roku" = ps: with ps; [ ]; # missing inputs: emulated_roku @@ -232,13 +234,13 @@ "epson" = ps: with ps; [ ]; # missing inputs: epson-projector "epsonworkforce" = ps: with ps; [ ]; # missing inputs: epsonprinter "eq3btsmart" = ps: with ps; [ construct ]; # missing inputs: python-eq3bt - "esphome" = ps: with ps; [ aioesphomeapi aiohttp-cors zeroconf ]; + "esphome" = ps: with ps; [ aioesphomeapi aiohttp-cors pyroute2 zeroconf ]; "essent" = ps: with ps; [ ]; # missing inputs: PyEssent "etherscan" = ps: with ps; [ ]; # missing inputs: python-etherscan-api "eufy" = ps: with ps; [ ]; # missing inputs: lakeside "everlights" = ps: with ps; [ pyeverlights ]; "evohome" = ps: with ps; [ evohome-async ]; - "ezviz" = ps: with ps; [ pyezviz ]; + "ezviz" = ps: with ps; [ ha-ffmpeg pyezviz ]; "faa_delays" = ps: with ps; [ faadelays ]; "facebook" = ps: with ps; [ ]; "facebox" = ps: with ps; [ ]; @@ -280,7 +282,7 @@ "free_mobile" = ps: with ps; [ ]; # missing inputs: freesms "freebox" = ps: with ps; [ freebox-api ]; "freedns" = ps: with ps; [ ]; - "fritz" = ps: with ps; [ fritzconnection ]; + "fritz" = ps: with ps; [ fritzconnection xmltodict ]; "fritzbox" = ps: with ps; [ pyfritzhome ]; "fritzbox_callmonitor" = ps: with ps; [ fritzconnection ]; "fritzbox_netmonitor" = ps: with ps; [ fritzconnection ]; @@ -292,7 +294,6 @@ "garmin_connect" = ps: with ps; [ ]; # missing inputs: garminconnect "gc100" = ps: with ps; [ ]; # missing inputs: python-gc100 "gdacs" = ps: with ps; [ ]; # missing inputs: aio_georss_gdacs - "geizhals" = ps: with ps; [ ]; # missing inputs: geizhals "generic" = ps: with ps; [ ]; "generic_thermostat" = ps: with ps; [ ]; "geniushub" = ps: with ps; [ ]; # missing inputs: geniushub-client @@ -315,7 +316,7 @@ "google_assistant" = ps: with ps; [ aiohttp-cors ]; "google_cloud" = ps: with ps; [ google-cloud-texttospeech ]; "google_domains" = ps: with ps; [ ]; - "google_maps" = ps: with ps; [ ]; # missing inputs: locationsharinglib + "google_maps" = ps: with ps; [ locationsharinglib ]; "google_pubsub" = ps: with ps; [ google-cloud-pubsub ]; "google_translate" = ps: with ps; [ gtts ]; "google_travel_time" = ps: with ps; [ googlemaps ]; @@ -354,8 +355,8 @@ "home_connect" = ps: with ps; [ aiohttp-cors homeconnect ]; "home_plus_control" = ps: with ps; [ aiohttp-cors homepluscontrol ]; "homeassistant" = ps: with ps; [ ]; - "homekit" = ps: with ps; [ HAP-python pyqrcode pyturbojpeg aiohttp-cors base36 fnvhash ha-ffmpeg zeroconf ]; - "homekit_controller" = ps: with ps; [ aiohomekit aiohttp-cors zeroconf ]; + "homekit" = ps: with ps; [ HAP-python pyqrcode pyturbojpeg aiohttp-cors base36 fnvhash ha-ffmpeg pyroute2 zeroconf ]; + "homekit_controller" = ps: with ps; [ aiohomekit aiohttp-cors pyroute2 zeroconf ]; "homematic" = ps: with ps; [ pyhomematic ]; "homematicip_cloud" = ps: with ps; [ homematicip ]; "homeworks" = ps: with ps; [ ]; # missing inputs: pyhomeworks @@ -374,6 +375,7 @@ "hvv_departures" = ps: with ps; [ ]; # missing inputs: pygti "hydrawise" = ps: with ps; [ hydrawiser ]; "hyperion" = ps: with ps; [ hyperion-py ]; + "ialarm" = ps: with ps; [ pyialarm ]; "iammeter" = ps: with ps; [ ]; # missing inputs: iammeter "iaqualink" = ps: with ps; [ iaqualink ]; "icloud" = ps: with ps; [ pyicloud ]; @@ -398,20 +400,20 @@ "intent" = ps: with ps; [ aiohttp-cors ]; "intent_script" = ps: with ps; [ ]; "intesishome" = ps: with ps; [ pyintesishome ]; - "ios" = ps: with ps; [ aiohttp-cors zeroconf ]; + "ios" = ps: with ps; [ aiohttp-cors pyroute2 zeroconf ]; "iota" = ps: with ps; [ ]; # missing inputs: pyota "iperf3" = ps: with ps; [ ]; # missing inputs: iperf3 "ipma" = ps: with ps; [ ]; # missing inputs: pyipma "ipp" = ps: with ps; [ pyipp ]; "iqvia" = ps: with ps; [ numpy pyiqvia ]; "irish_rail_transport" = ps: with ps; [ ]; # missing inputs: pyirishrail - "islamic_prayer_times" = ps: with ps; [ ]; # missing inputs: prayer_times_calculator + "islamic_prayer_times" = ps: with ps; [ prayer-times-calculator ]; "iss" = ps: with ps; [ ]; # missing inputs: pyiss "isy994" = ps: with ps; [ ]; # missing inputs: pyisy "itach" = ps: with ps; [ ]; # missing inputs: pyitachip2ir "itunes" = ps: with ps; [ ]; "izone" = ps: with ps; [ ]; # missing inputs: python-izone - "jewish_calendar" = ps: with ps; [ ]; # missing inputs: hdate + "jewish_calendar" = ps: with ps; [ hdate ]; "joaoapps_join" = ps: with ps; [ ]; # missing inputs: python-join-api "juicenet" = ps: with ps; [ ]; # missing inputs: python-juicenet "kaiterra" = ps: with ps; [ ]; # missing inputs: kaiterra-async-client @@ -427,6 +429,7 @@ "knx" = ps: with ps; [ xknx ]; "kodi" = ps: with ps; [ pykodi ]; "konnected" = ps: with ps; [ aiohttp-cors ]; # missing inputs: konnected + "kostal_plenticore" = ps: with ps; [ ]; # missing inputs: kostal_plenticore "kulersky" = ps: with ps; [ ]; # missing inputs: pykulersky "kwb" = ps: with ps; [ ]; # missing inputs: pykwb "lacrosse" = ps: with ps; [ pylacrosse ]; @@ -492,6 +495,7 @@ "meraki" = ps: with ps; [ aiohttp-cors ]; "message_bird" = ps: with ps; [ ]; # missing inputs: messagebird "met" = ps: with ps; [ pymetno ]; + "met_eireann" = ps: with ps; [ pymeteireann ]; "meteo_france" = ps: with ps; [ ]; # missing inputs: meteofrance-api "meteoalarm" = ps: with ps; [ ]; # missing inputs: meteoalertapi "metoffice" = ps: with ps; [ ]; # missing inputs: datapoint @@ -517,6 +521,7 @@ "monoprice" = ps: with ps; [ ]; # missing inputs: pymonoprice "moon" = ps: with ps; [ ]; "motion_blinds" = ps: with ps; [ ]; # missing inputs: motionblinds + "motioneye" = ps: with ps; [ motioneye-client ]; "mpchc" = ps: with ps; [ ]; "mpd" = ps: with ps; [ mpd2 ]; "mqtt" = ps: with ps; [ aiohttp-cors paho-mqtt ]; @@ -526,6 +531,7 @@ "mqtt_statestream" = ps: with ps; [ aiohttp-cors paho-mqtt ]; "msteams" = ps: with ps; [ pymsteams ]; "mullvad" = ps: with ps; [ mullvad-api ]; + "mutesync" = ps: with ps; [ mutesync ]; "mvglive" = ps: with ps; [ PyMVGLive ]; "my" = ps: with ps; [ aiohttp-cors pillow ]; "mychevy" = ps: with ps; [ ]; # missing inputs: mychevy @@ -576,8 +582,8 @@ "nx584" = ps: with ps; [ pynx584 ]; "nzbget" = ps: with ps; [ ]; # missing inputs: pynzbgetapi "oasa_telematics" = ps: with ps; [ ]; # missing inputs: oasatelematics - "obihai" = ps: with ps; [ ]; # missing inputs: pyobihai - "octoprint" = ps: with ps; [ aiohttp-cors netdisco zeroconf ]; + "obihai" = ps: with ps; [ pyobihai ]; + "octoprint" = ps: with ps; [ aiohttp-cors netdisco pyroute2 zeroconf ]; "oem" = ps: with ps; [ ]; # missing inputs: oemthermostat "ohmconnect" = ps: with ps; [ defusedxml ]; "ombi" = ps: with ps; [ ]; # missing inputs: pyombi @@ -598,7 +604,7 @@ "openhome" = ps: with ps; [ openhomedevice ]; "opensensemap" = ps: with ps; [ opensensemap-api ]; "opensky" = ps: with ps; [ ]; - "opentherm_gw" = ps: with ps; [ ]; # missing inputs: pyotgw + "opentherm_gw" = ps: with ps; [ pyotgw ]; "openuv" = ps: with ps; [ pyopenuv ]; "openweathermap" = ps: with ps; [ pyowm ]; "opnsense" = ps: with ps; [ pyopnsense ]; @@ -608,7 +614,7 @@ "orvibo" = ps: with ps; [ orvibo ]; "osramlightify" = ps: with ps; [ ]; # missing inputs: lightify "otp" = ps: with ps; [ pyotp ]; - "ovo_energy" = ps: with ps; [ ]; # missing inputs: ovoenergy + "ovo_energy" = ps: with ps; [ ovoenergy ]; "owntracks" = ps: with ps; [ pynacl aiohttp-cors hass-nabucasa paho-mqtt ]; "ozw" = ps: with ps; [ aiohttp-cors paho-mqtt python-openzwave-mqtt ]; "panasonic_bluray" = ps: with ps; [ ]; # missing inputs: panacotta @@ -620,9 +626,10 @@ "pencom" = ps: with ps; [ ]; # missing inputs: pencompy "persistent_notification" = ps: with ps; [ ]; "person" = ps: with ps; [ aiohttp-cors pillow ]; - "philips_js" = ps: with ps; [ ]; # missing inputs: ha-philipsjs + "philips_js" = ps: with ps; [ ha-philipsjs ]; "pi4ioe5v9xxxx" = ps: with ps; [ ]; # missing inputs: pi4ioe5v9xxxx "pi_hole" = ps: with ps; [ hole ]; + "picnic" = ps: with ps; [ python-picnic-api ]; "picotts" = ps: with ps; [ ]; "piglow" = ps: with ps; [ ]; # missing inputs: piglow "pilight" = ps: with ps; [ ]; # missing inputs: pilight @@ -653,7 +660,7 @@ "pushover" = ps: with ps; [ pushover-complete ]; "pushsafer" = ps: with ps; [ ]; "pvoutput" = ps: with ps; [ jsonpath xmltodict ]; - "pvpc_hourly_pricing" = ps: with ps; [ ]; # missing inputs: aiopvpc + "pvpc_hourly_pricing" = ps: with ps; [ aiopvpc ]; "pyload" = ps: with ps; [ ]; "python_script" = ps: with ps; [ restrictedpython ]; "qbittorrent" = ps: with ps; [ ]; # missing inputs: python-qbittorrent @@ -708,7 +715,7 @@ "ruckus_unleashed" = ps: with ps; [ pyruckus ]; "russound_rio" = ps: with ps; [ ]; # missing inputs: russound_rio "russound_rnet" = ps: with ps; [ ]; # missing inputs: russound - "sabnzbd" = ps: with ps; [ aiohttp-cors netdisco zeroconf ]; # missing inputs: pysabnzbd + "sabnzbd" = ps: with ps; [ aiohttp-cors netdisco pyroute2 zeroconf ]; # missing inputs: pysabnzbd "safe_mode" = ps: with ps; [ aiohttp-cors hass-nabucasa pillow ]; "saj" = ps: with ps; [ ]; # missing inputs: pysaj "samsungtv" = ps: with ps; [ samsungctl samsungtvws ]; @@ -748,7 +755,7 @@ "sinch" = ps: with ps; [ ]; # missing inputs: clx-sdk-xms "sisyphus" = ps: with ps; [ ]; # missing inputs: sisyphus-control "sky_hub" = ps: with ps; [ ]; # missing inputs: pyskyqhub - "skybeacon" = ps: with ps; [ ]; # missing inputs: pygatt[GATTTOOL] + "skybeacon" = ps: with ps; [ pygatt ]; "skybell" = ps: with ps; [ skybellpy ]; "slack" = ps: with ps; [ slackclient ]; "sleepiq" = ps: with ps; [ sleepyq ]; @@ -767,7 +774,6 @@ "snips" = ps: with ps; [ aiohttp-cors paho-mqtt ]; "snmp" = ps: with ps; [ pysnmp ]; "sochain" = ps: with ps; [ ]; # missing inputs: python-sochain-api - "socialblade" = ps: with ps; [ ]; # missing inputs: socialbladeclient "solaredge" = ps: with ps; [ solaredge stringcase ]; "solaredge_local" = ps: with ps; [ ]; # missing inputs: solaredge-local "solarlog" = ps: with ps; [ ]; # missing inputs: sunwatcher @@ -779,7 +785,7 @@ "songpal" = ps: with ps; [ ]; # missing inputs: python-songpal "sonos" = ps: with ps; [ aiohttp-cors plexapi plexauth plexwebsocket pysonos ]; "sony_projector" = ps: with ps; [ ]; # missing inputs: pysdcp - "soundtouch" = ps: with ps; [ aiohttp-cors libsoundtouch zeroconf ]; + "soundtouch" = ps: with ps; [ aiohttp-cors libsoundtouch pyroute2 zeroconf ]; "spaceapi" = ps: with ps; [ aiohttp-cors ]; "spc" = ps: with ps; [ ]; # missing inputs: pyspcwebgw "speedtestdotnet" = ps: with ps; [ speedtest-cli ]; @@ -790,7 +796,7 @@ "sql" = ps: with ps; [ sqlalchemy ]; "squeezebox" = ps: with ps; [ pysqueezebox ]; "srp_energy" = ps: with ps; [ ]; # missing inputs: srpenergy - "ssdp" = ps: with ps; [ aiohttp-cors async-upnp-client defusedxml netdisco zeroconf ]; + "ssdp" = ps: with ps; [ aiohttp-cors async-upnp-client defusedxml netdisco pyroute2 zeroconf ]; "starline" = ps: with ps; [ ]; # missing inputs: starline "starlingbank" = ps: with ps; [ ]; # missing inputs: starlingbank "startca" = ps: with ps; [ xmltodict ]; @@ -840,7 +846,7 @@ "telnet" = ps: with ps; [ ]; "temper" = ps: with ps; [ ]; # missing inputs: temperusb "template" = ps: with ps; [ ]; - "tensorflow" = ps: with ps; [ numpy pillow tensorflow ]; # missing inputs: pycocotools tf-models-official + "tensorflow" = ps: with ps; [ numpy pillow pycocotools tensorflow ]; # missing inputs: tf-models-official "tesla" = ps: with ps; [ teslajsonpy ]; "tfiac" = ps: with ps; [ ]; # missing inputs: pytfiac "thermoworks_smoke" = ps: with ps; [ stringcase ]; # missing inputs: thermoworks_smoke @@ -958,7 +964,7 @@ "xbox_live" = ps: with ps; [ xboxapi ]; "xeoma" = ps: with ps; [ pyxeoma ]; "xiaomi" = ps: with ps; [ ha-ffmpeg ]; - "xiaomi_aqara" = ps: with ps; [ pyxiaomigateway aiohttp-cors netdisco zeroconf ]; + "xiaomi_aqara" = ps: with ps; [ pyxiaomigateway aiohttp-cors netdisco pyroute2 zeroconf ]; "xiaomi_miio" = ps: with ps; [ construct python-miio ]; "xiaomi_tv" = ps: with ps; [ pymitv ]; "xmpp" = ps: with ps; [ slixmpp ]; @@ -966,7 +972,7 @@ "yale_smart_alarm" = ps: with ps; [ yalesmartalarmclient ]; "yamaha" = ps: with ps; [ rxv ]; "yamaha_musiccast" = ps: with ps; [ ]; # missing inputs: pymusiccast - "yandex_transport" = ps: with ps; [ ]; # missing inputs: aioymaps + "yandex_transport" = ps: with ps; [ aioymaps ]; "yandextts" = ps: with ps; [ ]; "yeelight" = ps: with ps; [ yeelight ]; "yeelightsunflower" = ps: with ps; [ ]; # missing inputs: yeelightsunflower @@ -974,10 +980,10 @@ "zabbix" = ps: with ps; [ ]; # missing inputs: py-zabbix "zamg" = ps: with ps; [ ]; "zengge" = ps: with ps; [ ]; # missing inputs: zengge - "zeroconf" = ps: with ps; [ aiohttp-cors zeroconf ]; + "zeroconf" = ps: with ps; [ aiohttp-cors pyroute2 zeroconf ]; "zerproc" = ps: with ps; [ pyzerproc ]; "zestimate" = ps: with ps; [ xmltodict ]; - "zha" = ps: with ps; [ aiohttp-cors bellows pyserial-asyncio pyserial zeroconf zha-quirks zigpy-cc zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp zigpy ]; + "zha" = ps: with ps; [ aiohttp-cors bellows pyroute2 pyserial-asyncio pyserial zeroconf zha-quirks zigpy-cc zigpy-deconz zigpy-xbee zigpy-zigate zigpy-znp zigpy ]; "zhong_hong" = ps: with ps; [ ]; # missing inputs: zhong_hong_hvac "ziggo_mediabox_xl" = ps: with ps; [ ]; # missing inputs: ziggo-mediabox-xl "zodiac" = ps: with ps; [ ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index cb4557380801..194569924c99 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -2,6 +2,7 @@ , lib , fetchFromGitHub , python3 +, inetutils , nixosTests # Look up dependencies of specified components in component-packages.nix @@ -22,24 +23,6 @@ let defaultOverrides = [ # Override the version of some packages pinned in Home Assistant's setup.py - # Pinned due to API changes in astral>=2.0, required by the sun/moon plugins - # https://github.com/home-assistant/core/pull/48573; Remove >= 2021.5 - (mkOverride "astral" "1.10.1" - "d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1") - - # Pinned due to API changes in brother>=1.0, remove >= 2021.5 - (self: super: { - brother = super.brother.overridePythonAttrs (oldAttrs: rec { - version = "0.2.2"; - src = fetchFromGitHub { - owner = "bieniu"; - repo = "brother"; - rev = version; - sha256 = "sha256-vIefcL3K3ZbAUxMFM7gbbTFdrnmufWZHcq4OA19SYXE="; - }; - }); - }) - # Pinned due to API changes in iaqualink>=2.0, remove after # https://github.com/home-assistant/core/pull/48137 was merged (self: super: { @@ -56,26 +39,15 @@ let }) # Pinned due to API changes in pyjwt>=2.0 - (mkOverride "pyjwt" "1.7.1" - "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd") - - # Pinned due to API changes in pykmtronic>=0.2.0 - (mkOverride "pykmtronic" "0.0.3" - "sha256-8bxn27DU1XUQUxQFJklEge29DHx1DMu7pJG4hVE1jDU=") - - # Pinned due to API changes in pylilterbot>=2021.3.0 - # https://github.com/home-assistant/core/pull/48300; Remove >= 2021.5 (self: super: { - pylitterbot = super.pylitterbot.overridePythonAttrs (oldAttrs: rec { - version = "2021.2.8"; - src = fetchFromGitHub { - owner = "natekspencer"; - repo = "pylitterbot"; - rev = version; - sha256 = "142lhijm51v11cd0lhcfdnjdd143jxi2hjsrqdq0rrbbnmj6mymp"; + pyjwt = super.pyjwt.overridePythonAttrs (oldAttrs: rec { + version = "1.7.1"; + src = oldAttrs.src.override { + sha256 = "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"; }; - # had no tests before 2021.3.0 - doCheck = false; + disabledTests = [ + "test_ec_verify_should_return_false_if_signature_invalid" + ]; }); }) @@ -84,6 +56,46 @@ let (mkOverride "ring-doorbell" "0.6.2" "fbd537722a27b3b854c26506d894b7399bb8dc57ff36083285971227a2d46560") + # Pinned due to API changes in pyflunearyou>=2.0 + (self: super: { + pyflunearyou = super.pyflunearyou.overridePythonAttrs (oldAttrs: rec { + version = "1.0.7"; + src = fetchFromGitHub { + owner = "bachya"; + repo = "pyflunearyou"; + rev = version; + sha256 = "0hq55k298m9a90qb3lasw9bi093hzndrah00rfq94bp53aq0is99"; + }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "poetry.masonry.api" "poetry.core.masonry.api" \ + --replace 'msgpack = "^0.6.2"' 'msgpack = "*"' \ + --replace 'ujson = "^1.35"' 'ujson = "*"' + ''; + }); + }) + + # Pinned due to API changes in pylast 4.2.1 + (mkOverride "pylast" "4.2.0" + "0zd0dn2l738ndz62vpa751z0ldnm91dcz9zzbvxv53r08l0s9yf3") + + # Pinned due to API changes in pyopenuv>=1.1.0 + (self: super: { + pyopenuv = super.pyopenuv.overridePythonAttrs (oldAttrs: rec { + version = "1.0.13"; + src = fetchFromGitHub { + owner = "bachya"; + repo = "pyopenuv"; + rev = version; + sha256 = "1gx9xjkyvqqy8410lnbshq1j5y4cb0cdc4m505g17rwdzdwb01y8"; + }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "poetry.masonry.api" "poetry.core.masonry.api" + ''; + }); + }) + # Pinned due to API changes in pyruckus>0.12 (self: super: { pyruckus = super.pyruckus.overridePythonAttrs (oldAttrs: rec { @@ -97,6 +109,19 @@ let }); }) + # Remove after https://github.com/NixOS/nixpkgs/pull/121854 has passed staging-next + (self: super: { + sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec { + version = "1.4.13"; + src = oldAttrs.src.override { + inherit version; + sha256 = "0npsg38d11skv04zvsi90j93f6jdgm8666ds2ri7shr1pz1732hx"; + }; + patches = []; + propagatedBuildInputs = [ python3.pkgs.greenlet ]; + }); + }) + # hass-frontend does not exist in python3.pkgs (self: super: { hass-frontend = self.callPackage ./frontend.nix { }; @@ -130,7 +155,7 @@ let extraBuildInputs = extraPackages py.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2021.4.6"; + hassVersion = "2021.5.5"; in with py.pkgs; buildPythonApplication rec { pname = "homeassistant"; @@ -149,7 +174,7 @@ in with py.pkgs; buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = version; - sha256 = "1s1slwcqls2prz9kgyhggs8xi3x7ghwdi33j983kvpg0gva7d2f0"; + sha256 = "1vdxygjik1ay58xgyr1rk12cgy63raqi4fldnd4mlhs4i21c7ff8"; }; # leave this in, so users don't have to constantly update their downstream patch handling @@ -162,8 +187,6 @@ in with py.pkgs; buildPythonApplication rec { --replace "bcrypt==3.1.7" "bcrypt" \ --replace "cryptography==3.3.2" "cryptography" \ --replace "pip>=8.0.3,<20.3" "pip" \ - --replace "pytz>=2021.1" "pytz" \ - --replace "pyyaml==5.4.1" "pyyaml" \ --replace "ruamel.yaml==0.15.100" "ruamel.yaml" substituteInPlace tests/test_config.py --replace '"/usr"' '"/build/media"' ''; @@ -200,70 +223,132 @@ in with py.pkgs; buildPythonApplication rec { doCheck = stdenv.isLinux; checkInputs = [ - # test infrastructure - asynctest + # test infrastructure (selectively from requirement_test.txt) pytest-aiohttp + pytest-mock pytest-rerunfailures pytest-xdist pytestCheckHook requests-mock - # component dependencies - pyotp + jsonpickle respx + # required by tests/auth/mfa_modules + pyotp ] ++ lib.concatMap (component: getPackages component py.pkgs) componentTests; # We can reasonably test components that don't communicate with any network # services. Before adding new components to this list make sure we have all # its dependencies packaged and listed in ./component-packages.nix. componentTests = [ + "abode" "accuweather" + "acmeda" + "adguard" + "advantage_air" + "agent_dvr" + "air_quality" "airly" - "analytics" + "airnow" + "airvisual" + "alarm_control_panel" + "alarmdecoder" "alert" + "alexa" + "almond" + "ambiclimate" + "ambient_station" + "analytics" + "androidtv" + "apache_kafka" "api" + "apple_tv" + "apprise" + "arlo" + "asuswrt" + "august" + "aurora" "auth" "automation" + "awair" + "aws" "axis" "bayesian" "binary_sensor" + "blackbird" + "blueprint" + "bluetooth_le_tracker" + "braviatv" + "broadlink" "brother" + "bsblan" "caldav" "calendar" "camera" + "canary" "cast" + "cert_expiry" + "climacell" "climate" "cloud" + "cloudflare" "comfoconnect" "command_line" + "compensation" "config" "configurator" "conversation" + "coronavirus" "counter" "cover" + "daikin" + "darksky" + "datadog" "deconz" "default_config" "demo" + "denonavr" "derivative" "device_automation" "device_sun_light_trigger" "device_tracker" "devolo_home_control" + "dexcom" "dhcp" + "dialogflow" "discovery" "dsmr" + "dte_energy_bridge" + "duckdns" + "dyson" + "eafm" "econet" + "efergy" + "emonitor" "emulated_hue" "esphome" - "fan" + "everlights" + "ezviz" "faa_delays" + "facebook" + "facebox" + "fail2ban" + "fan" + "feedreader" "ffmpeg" + "fido" "file" "filesize" "filter" + "firmata" + "flo" + "flume" + "flunearyou" "flux" "folder" "folder_watcher" "freebox" + "freedns" + "fritz" "fritzbox" "fritzbox_callmonitor" "frontend" @@ -271,162 +356,329 @@ in with py.pkgs; buildPythonApplication rec { "generic_thermostat" "geo_json_events" "geo_location" + "geofency" + "glances" + "google" + "google_assistant" + "google_domains" + "google_pubsub" + "google_translate" + "google_travel_time" + "google_wifi" + "gpslogger" + "graphite" "group" + "guardian" + "harmony" + "hassio" "hddtemp" "history" "history_stats" "home_connect" "home_plus_control" + "homeassistant" "homekit" "homekit_controller" - "homeassistant" "homematic" "homematicip_cloud" "html5" "http" "hue" + "humidifier" "hyperion" + "ialarm" "iaqualink" + "icloud" "ifttt" "image" "image_processing" + "imap_email_content" "influxdb" "input_boolean" "input_datetime" - "input_text" "input_number" "input_select" + "input_text" + "insteon" + "integration" "intent" "intent_script" + "ios" "ipp" + "iqvia" + "islamic_prayer_times" + "jewish_calendar" + "kira" "kmtronic" "knx" "kodi" + "lastfm" + "lcn" "light" "litterrobot" "local_file" "local_ip" + "locative" "lock" "logbook" "logentries" "logger" + "london_air" "lovelace" + "luftdaten" "lutron_caseta" + "lyric" + "mailbox" "manual" "manual_mqtt" "mazda" "media_player" "media_source" + "meraki" "met" + "met_eireann" + "microsoft_face" + "microsoft_face_detect" + "microsoft_face_identify" + "mikrotik" + "min_max" "minecraft_server" + "minio" "mobile_app" "modbus" + "mold_indicator" "moon" + "motioneye" "mqtt" "mqtt_eventstream" "mqtt_json" "mqtt_room" "mqtt_statestream" "mullvad" + "mutesync" + "my" + "myq" + "mysensors" + "namecheapdns" + "neato" + "netatmo" "nexia" + "no_ip" "notify" "notion" + "nuki" "number" + "nws" "nx584" "omnilogic" + "onboarding" "ondilo_ico" + "openalpr_cloud" + "openalpr_local" "openerz" + "openhardwaremonitor" + "opentherm_gw" + "openuv" + "openweathermap" + "opnsense" + "ovo_energy" + "owntracks" "ozw" "panel_custom" "panel_iframe" "persistent_notification" "person" + "philips_js" + "pi_hole" + "picnic" + "ping" "plaato" + "plant" + "plex" + "plugwise" + "poolsense" + "profiler" "prometheus" "proximity" "push" + "pushbullet" + "pvpc_hourly_pricing" "python_script" + "rachio" + "radarr" + "rainmachine" "random" + "recollect_waste" "recorder" + "reddit" + "remote" "rest" "rest_command" + "ring" + "risco" "rituals_perfume_genie" "rmvtransport" "roku" + "roomba" "rss_feed_template" "ruckus_unleashed" "safe_mode" + "samsungtv" "scene" "screenlogic" "script" "search" + "season" + "sensor" + "sentry" + "sharkiq" "shell_command" + "shelly" "shopping_list" + "sigfox" + "sighthound" "simplisafe" "simulated" + "slack" "sleepiq" "sma" - "smhi" - "sensor" - "slack" + "smappee" "smartthings" "smarttub" + "smhi" "smtp" - "smappee" + "snips" "solaredge" + "soma" + "somfy" "sonos" + "soundtouch" + "spaceapi" + "speedtestdotnet" "spotify" "sql" + "squeezebox" "ssdp" + "startca" + "statistics" + "statsd" "stream" + "stt" "subaru" "sun" + "surepetcare" "switch" + "switcher_kis" "system_health" "system_log" + "tado" "tag" "tasmota" "tcp" + "telegram" + "tellduslive" "template" + "tesla" "threshold" + "tile" "time_date" "timer" "tod" + "tomato" + "toon" + "tplink" "trace" + "transmission" + "trend" "tts" + "tuya" + "twentemilieu" + "twilio" + "twinkly" + "twitch" + "uk_transport" + "unifi" + "unifi_direct" "universal" "updater" "upnp" "uptime" + "usgs_earthquakes_feed" + "utility_meter" + "uvc" "vacuum" + "velbus" + "vera" "verisure" + "version" + "vesync" + "vizio" + "voicerss" + "volumio" + "vultr" + "wake_on_lan" + "water_heater" + "waze_travel_time" "weather" "webhook" + "webostv" "websocket_api" "wemo" + "wiffi" + "wilight" "wled" "workday" "worldclock" + "wsdot" + "wunderground" + "xiaomi" + "xiaomi_aqara" + "xiaomi_miio" + "yamaha" + "yandex_transport" + "yandextts" "yeelight" "zeroconf" + "zerproc" "zha" + "zodiac" "zone" "zwave" "zwave_js" + ] ++ lib.optionals (builtins.any (s: s == stdenv.hostPlatform.system) debugpy.meta.platforms) [ + "debugpy" ]; pytestFlagsArray = [ - # limit amout of runners to reduce race conditions - "-n auto" + # parallelize test run + "--numprocesses auto" + # assign tests grouped by file to workers + "--dist loadfile" # retry racy tests that end in "RuntimeError: Event loop is closed" "--reruns 3" "--only-rerun RuntimeError" - # assign tests grouped by file to workers - "--dist loadfile" - # tests are located in tests/ - "tests" + # enable full variable printing on error + "--showlocals" # screenlogic/test_config_flow.py: Tries to send out UDP broadcasts "--deselect tests/components/screenlogic/test_config_flow.py::test_form_cannot_connect" + # asuswrt/test_config_flow.py: Sandbox network limitations, fails with unexpected error + "--deselect tests/components/asuswrt/test_config_flow.py::test_on_connect_failed" + # shelly/test_config_flow.py: Tries to join multicast group + "--deselect tests/components/shelly/test_config_flow.py::test_form" + "--deselect tests/components/shelly/test_config_flow.py::test_title_without_name" + "--deselect tests/components/shelly/test_config_flow.py::test_form_auth" + "--deselect tests/components/shelly/test_config_flow.py::test_form_errors_test_connection" + "--deselect tests/components/shelly/test_config_flow.py::test_user_setup_ignored_device" + "--deselect tests/components/shelly/test_config_flow.py::test_form_auth_errors_test_connection" + "--deselect tests/components/shelly/test_config_flow.py::test_form_auth_errors_test_connection" + "--deselect tests/components/shelly/test_config_flow.py::test_form_auth_errors_test_connection" + "--deselect tests/components/shelly/test_config_flow.py::test_zeroconf" + "--deselect tests/components/shelly/test_config_flow.py::test_zeroconf_sleeping_device" + "--deselect tests/components/shelly/test_config_flow.py::test_zeroconf_sleeping_device_error" + "--deselect tests/components/shelly/test_config_flow.py::test_zeroconf_sleeping_device_error" + "--deselect tests/components/shelly/test_config_flow.py::test_zeroconf_require_auth" + # tests are located in tests/ + "tests" # dynamically add packages required for component tests ] ++ map (component: "tests/components/" + component) componentTests; @@ -451,6 +703,13 @@ in with py.pkgs; buildPythonApplication rec { "test_fetching_url_with_verify_ssl" # util/test_package.py: AssertionError on package.is_installed('homeassistant>=999.999.999') "test_check_package_version_does_not_match" + # homeassistant/util/thread.py:51: SystemError + "test_executor_shutdown_can_interrupt_threads" + # {'theme_color': '#03A9F4'} != {'theme_color': 'blue'} + "test_webhook_handle_get_config" + # onboarding tests rpi_power component, for which we are lacking rpi_bad_power library + "test_onboarding_core_sets_up_rpi_power" + "test_onboarding_core_no_rpi_power" ]; preCheck = '' @@ -459,6 +718,9 @@ in with py.pkgs; buildPythonApplication rec { # the tests require the existance of a media dir mkdir /build/media + # put ping binary into PATH, e.g. for wake_on_lan tests + export PATH=${inetutils}/bin:$PATH + # error out when component test directory is missing, otherwise hidden by xdist execution :( for component in ${lib.concatStringsSep " " (map lib.escapeShellArg componentTests)}; do test -d "tests/components/$component" || { diff --git a/pkgs/servers/home-assistant/frontend.nix b/pkgs/servers/home-assistant/frontend.nix index 83af5b85c87c..bd490654420b 100644 --- a/pkgs/servers/home-assistant/frontend.nix +++ b/pkgs/servers/home-assistant/frontend.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { # the frontend version corresponding to a specific home-assistant version can be found here # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json pname = "home-assistant-frontend"; - version = "20210407.3"; + version = "20210504.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-ucewS193kbvlk4Q+5IEYT6sfJ/H006uy0iIi8UHOzPo="; + sha256 = "sha256-rNdqflWT8bmGHtAGGfq4xVxDcnK+EZU9qejRWQPJmUI="; }; # there is nothing to strip in this package |
