Git Product home page Git Product logo

hass-blueair's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hass-blueair's Issues

Fan Speed Discrepancies

Hello! Thanks for your work on this! I noticed with the 411i Max and 311i Max there is a discrepancy between the fan speed reported in the Blueair app and the attribute reported in HA. For example, when the fan is running at full speed, it is shown as only 91% in HA.

Here is what I found:

App -> HA
0 -> 0
12 -> 11
16 -> 15
21 -> 19
25 -> 23
30 -> 27
34 -> 31
38 -> 35
43 -> 39
47 -> 43
52 -> 47
56 -> 51
60 -> 55
65 -> 59
69 -> 63
74 -> 67
78 -> 71
82 -> 75
87 -> 79
91 -> 83
96 -> 87
100 -> 91

HA version 2023.5.0 yields: AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Looks like this integration ran into the dreaded:

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for using this method at , line XXX: hass.config_entries.async_setup_platforms(entry, PLATFORMS)

message. :(

Now on HA version 2023.5.0 it fail to start with:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/blueair/init.py", line 50, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Can't turn on BlueAir Air Purifier on Home Assistant 2023.12.3

When I try to turn on my BlueAir Classic 205 and 405, I got this error

  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 305, in async_handle_turn_on_service
    await self.async_turn_on(percentage, preset_mode, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BlueairFan.async_turn_on() takes 1 positional argument but 3 were given```

However, I can turn off both of them though.

Failed to setup - SSL VERIFY ERROR

File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.blueair.io', port=443): Max retries exceeded with url: /v2/user/[email protected] /homehost/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')))

/config # openssl s_client -connect api.blueair.io:443 -showcerts
CONNECTED(00000003)
depth=0 C = SE, L = Stockholm, O = Blueair AB, CN = *.blueair.io
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = SE, L = Stockholm, O = Blueair AB, CN = *.blueair.io
verify error:num=21:unable to verify the first certificate
verify return:1
depth=0 C = SE, L = Stockholm, O = Blueair AB, CN = *.blueair.io
verify return:1

Certificate chain
0 s:C = SE, L = Stockholm, O = Blueair AB, CN = *.blueair.io
i:C = US, O = DigiCert Inc, CN = DigiCert Global G2 TLS RS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FAAOCAQEAbjXIueV5
lbWt5022F3H7tng6rfD8RMksfc5xhn8JMwJuO97XX5Z3lvYEl3Tkt6KIQICy7Npn
8kYMyoAXb7a4y9A/c/3xnxWiSB/tUxv98U/mGYyJThibIju1vCTCly2X8pdB88mI
mrPp+RiMOE3K9nfkA+oMKw5flPWd8DhTYl3r9UosItqOKJp4Brwh99WjC3XcETsa
IN+z8/gu5ZsK6/zUX5gglxu2UNitrWg7pTPb0YxPZeLtrA5IXacoYWO4/rOJyiAY
8a4q9eduR7utmo+3hSYkEqPqr+a6s8IY6klSoE5vsiEdeSsqdFLkVYWTn22xdlJK
9TPEPzPQ1mWEtg==
-----END CERTIFICATE-----
1 s:C = SE, L = Stockholm, O = Blueair AB, CN = *.blueair.io
i:C = US, O = DigiCert Inc, CN = DigiCert Global G2 TLS RSA SHA256 2020 CA1
a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256
v:NotBefore: Jan 29 00:00:00 2024 GMT; NotAfter: Feb 28 23:59:59 2025 GMT
-----BEGIN CERTIFICATE-----
MIIGxjCCBa6gAwIBAgIQB04AXrFp3sYZybjPjTohbjANBgkqhkiG9w0BAQsFADBZ
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMTMwMQYDVQQDEypE
aWdpQ2VydCBHbG9iYWwgRzIgVExTIFJTQSBTSEEyNTYgMjAyMCBDQTEwHhcNMjQw
MTI5MDAwMDAwWhcNMjUwMjI4MjM1OTU5WjBNMQswCQYDVQQGEwJTRTESMBAGA1UE
BxMJU3RvY2tob2xtMRMwEQYDVQQKEwpCbHVlYWlyIEFCMRUwEwYDVQQDDAwqLmJs
dWVhaXIuaW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9kwm7Gue6
iKuM7djk/jovQ5SHwjhUsxtr2BNcYZRNrIiZiWgu/MFQ7isC9lztpT7BN9lA+aQ2
7v1L9+QQnD0tVPxm4GUz7MDc2nzjlDStYQLFjU2k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AABjVU6RsEAAAQDAEcw
RQIhAJplDDjZpT6Y5bID4B/vc+JMTbDUhZQBA3647VUQWDpHAiB5SwMvq0IYpp72
phADF0V/VbCJII0MkFGIXxVsB9sDqgB1AH1ZHhLheCp7HGFnfF79+NCHXBSgTpWe
uQMv2Q6MLnm4AAABjVU6RnoAAAQDAEYwRAIgXM9WjhbCFrPPL56PyeJacCIsePPg
tgQ58rcWe3yu8z8CIH70KZ821B45Mdg8aOCabuA1112ltDoUwqq30hJnnVwBAHcA
5tIxY0B3jMEQQQbXcbnOwdJA9paEhvu6hzId/R43jlAAAAGNVTpGnwAABAMASDBG
AiEAiZjs1jwYmA492C9Sd/gkK+9g48koDt/PiODaci7yX1sCIQDzeImI2RJliGlT
E7aZRxPVfep5q8x1ItUcA05X8Ied/jANBgkqhkiG9w0BAQsFAAOCAQEAbjXIueV5
lbWt5022F3H7tng6rfD8RMksfc5xhn8JMwJuO97XX5Z3lvYEl3Tkt6KIQICy7Npn
8kYMyoAXb7a4y9A/c/3xnxWiSB/tUxv98U/mGYyJThibIju1vCTCly2X8pdB88mI
mrPp+RiMOE3K9nfkA+oMKw5flPWd8DhTYl3r9UosItqOKJp4Brwh99WjC3XcETsa
IN+z8/gu5ZsK6/zUX5gglxu2UNitrWg7pTPb0YxPZeLtrA5IXacoYWO4/rOJyiAY
8a4q9eduR7utmo+3hSYkEqPqr+a6s8IY6klSoE5vsiEdeSsqdFLkVYWTn22xdlJK
9TPEPzPQ1mWEtg==
-----END CERTIFICATE-----

Server certificate
subject=C = SE, L = Stockholm, O = Blueair AB, CN = *.blueair.io
issuer=C = US, O = DigiCert Inc, CN = DigiCert Global G2 TLS RSA SHA256 2020 CA1

No client certificate CA names sent
Peer signing digest: SHA512
Peer signature type: RSA
Server Temp Key: ECDH, prime256v1, 256 bits

SSL handshake has read 3986 bytes and written 442 bytes
Verification error: unable to verify the first certificate

New, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES128-GCM-SHA256
Session-ID: EFFDB5FE168693F2715BC0C121C65B32ED534272F079A9088B41930F3624CF78
Session-ID-ctx:
Master-Key: 7132444DB8F2831A715AEB6D64B70C16D3CFDF82FC5D1AADB0832CE2E51E899CF6572D0533AD3BC669920825677A6DB1
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1707551872
Timeout : 7200 (sec)
Verify return code: 21 (unable to verify the first certificate)
Extended master secret: no

closed

SSL Certificate Validation Failure talking to API

Hey Folks,

I have HAOS installed under Virtualbox and one of the integrations is to my BlueAir 480i. Until about a few hours ago, it's been great.

I just recently (as in a few hours ago) updated from 2023.2.1 to 2023.2.2. About the same time I noticed that my sensor information wasn't updating with new detail (happens occasionally and I need to restart the device - meh) but I believe the updates stopped coming in from before the update to HAOS.

After restarting both HAOS and the 480i, the integration didn't continue like it normally does. Instead, I got an error about the entity being unavailable. I've since tried to remove and re-add the device but I'm getting the below error showing an SSL Verification error when trying to add my device back and a similar one appears from before I removed the device:

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/blueair/blueair/blueair.py:81
Integration: BlueAir (documentation, issues)
First occurred: 10:38:43 AM (2 occurrences)
Last logged: 12:12:04 PM

Error setting up entry BlueAir [redacted] for blueair
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.blueair.io', port=443): Max retries exceeded with url: /v2/user/[redacted]/homehost/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/blueair/__init__.py", line 28, in async_setup_entry
    client = await hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/blueair/__init__.py", line 29, in <lambda>
    lambda: blueair.BlueAir(
  File "/config/custom_components/blueair/blueair/blueair.py", line 66, in __init__
    self.home_host = self.get_home_host()
  File "/config/custom_components/blueair/blueair/blueair.py", line 81, in get_home_host
    response = requests.get(
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.blueair.io', port=443): Max retries exceeded with url: /v2/user/[redacted]/homehost/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))

Something worthy of note is that if you access the URL yourself ( https://api.blueair.io/v2/user/[redacted]/homehost/ ) and look at the SSL certificate, it looks like it was created four days ago. Is this addon doing certificate pinning? If so it might need an update. Otherwise, I'm open to suggestions to get HA to talk to the BlueAir API again.

Meep

error on setup

hi, i get this issue when i try and set my integration up, nyome know why? Thanks!

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/blueair/init.py:50
Integration: BlueAir (documentation, issues)
First occurred: 7:31:00 PM (1 occurrences)
Last logged: 7:31:00 PM

Error setting up entry BlueAir

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/blueair/init.py", line 50, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Additional purifier API

For what it is worth, there has been significant work on the models not supported in HA in the HomeKit plugin. See this issue where they dissected the API. This is only an FYI in case you can benefit from the work they have already done.

DustMagnet

I have a few dustmagnets and am happy to provide whatever API responses you need to add support.

[enhancement] Expose remaining device attributes

There are a bunch of attributes returned from the API which we are not exposing, these include filter status, wifi status which strike me as immediately useful.

self._device_information:
{'brightness': '4',
 'child_lock': '0',
 'fan_speed': '2',
 'fan_usage': '8;4;6561;0;6565;45275',
 'filterType': 'row',
 'filter_status': 'OK',
 'mode': 'manual',
 'wifi_status': '1'}

self._attributes:
{'uuid': 'XXXX',
 'name': 'Office',
 'timezone': 'America/Los_Angeles',
 'compatibility': 'classic_280i',
 'model': '1.0.9',
 'mac': '98D863XXXXXX',
 'firmware': '1.1.38',
 'mcuFirmware': '1.0.35',
 'wlanDriver': 'V10',
 'lastSyncDate': 1631550455,
 'installationDate': 1600350827,
 'lastCalibrationDate': 1600350827,
 'initUsagePeriod': 25629788,
 'rebootPeriod': 10975,
 'aimSerialNumber': 'S0000000000',
 'aimUpdateDate': 1600350827,
 'roomLocation': 'office'}

```

Fan Speed not shown on device control (but is present on entity control)

Thanks for this integration. I'd like to have the BlueAir turn on higher based on air sensor readings. However, the automation UI doesn't show fan speed, just on/off control. This matches what is seen in the UI:
Screen Shot 2022-06-11 at 2 14 58 PM

However, it does look like the speed is available in the entity detail:
Screen Shot 2022-06-11 at 2 17 32 PM

Ideally, the fan speed would also show for the device controls

Thanks again

480i missing sensors

Added my 480i without any headaches, but the sensors didn't include the set I expected:
image

blueair HealthProtect 7440i

Hi, thanks for sharing this project, I love it!
I purchased 2 blueair HealthProtect 7440i in China. How can I use the ha plug-in and add it? ?
I'm using a plugin and can't view the entities after logging in,
`git clone [email protected]:aijayadams/hass-blueair.git
Cloning into 'hass-blueair'...
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
`

Non i models are unsupported

Just wants to inform you that I've tested with both of my Classic 205 and 405 non i model (No sensor and auto mode). All of them are unsupported. All entities shown as unavailable.

Failed to set up Check the logs

Integration stopped working after update.

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/Blueair/init.py:50
Integration: Blueair
First occurred: 16:31:04 (3 occurrences)
Last logged: 18:11:25

Error setting up entry BlueAir [email protected] for blueair
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/Blueair/init.py", line 50, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Home Assistant 2023.5.4
Supervisor 2023.04.1
Operating System 10.1
Frontend 20230503.3 - latest

[bug] List index out of range when only an air filter is registered

In a configuration where there are no air quality sensors (only an air filter is registered), the component raises an exception during initialization:

2021-07-28 23:40:04 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up blueair platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/blueair/sensor.py", line 23, in setup_platform
BlueAirFilter(config=config, uuid=dev["uuid"], name=dev["name"], api=api)
File "/config/custom_components/blueair/sensor.py", line 41, in __init__
self.update()
File "/config/custom_components/blueair/sensor.py", line 67, in update
self._ba_attrs = self._api.get_current_data_point(self._ba_uuid)
File "/config/custom_components/blueair/blueair/blueair.py", line 185, in get_current_data_point
return results[-1]
IndexError: list index out of range

Call to the API returns the following record: {'uuid': <uuid>, 'start': 0, 'end': 0, 'sensors': ['time', 'pm', 'tmp', 'hum', 'co2', 'voc', 'allpollu'], 'units': ['s', 'ugm3', 'C', 'pc', 'ppm', 'ppb', '%'], 'datapoints': []}

results variable returned by transform_data_point is an empty list.

blueair command from the blueair python package returns the following list of device attributes:

auto_mode_dependency: pm
brightness: 4
child_lock: 0
fan_speed: 0
fan_usage: 2271;158;14196;269;14624;37216
filter_status: OK
mode: manual
wifi_status: 1

Support for Blue Pure 411i Max

Hi does this integration support the smaller air purifiers? Specifically I’m looking at the Blue Pure 411i Max.

Thank you!

BlueAir Protect 7470i

I have a three of the Protect 7470i and am happy to provide whatever API responses you need to add support.

VOC sensor using incorrect device_class - reported in HA logs

I have noticed in the Home Assistant system logs that my blueair VOC sensor shows up because the units are ppb instead of µg/m³. The log entries look like this:

Entity sensor.blueair_office_voc (<class 'custom_components.blueair.sensor.BlueairVOCSensor'>) is using native unit of measurement 'ppb' which is not a valid unit for the device class ('volatile_organic_compounds') it is using; expected one of ['µg/m³']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

I have had this same warning on a few ESPHome devices that I created with a ccs811 sensor and I fixed those by assigning the device_class to volatile_organic_compound_parts (which allows for ppm or ppb units) instead of the default: volatile_organic_compound (which only has the µg/m³ units).

See the valid Home Assistant device_classes here: https://www.home-assistant.io/integrations/sensor/

[question] Are non-ascii characters home-assistant best practice?

I don't know the answer, so please don't interpret the question as being opposed to the correct units, I just noticed that there is some translation to ascii happening in other components and couldn't quickly find guidance on the homeassistant developer page.

eg, µg/m³ becomes u0xb5g_per_mu0xb3 on export through the Prometheus integration (presumably because on the Prometheus side the Unicode characters arn't supported?)

image

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.