{"id":20963401,"url":"https://github.com/thorsten-l/esp8266-wifi-socket-ii","last_synced_at":"2025-05-14T08:34:53.347Z","repository":{"id":106382021,"uuid":"163313219","full_name":"thorsten-l/ESP8266-WiFi-Socket-II","owner":"thorsten-l","description":"Alternative Firmware for https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-weiss/p/4077806","archived":false,"fork":false,"pushed_at":"2020-03-20T16:30:39.000Z","size":9609,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T15:42:50.080Z","etag":null,"topics":["alexa","arduino","esp8266","esp8266-arduino","mqtt","mqtt-client","obi","openhab","platformio","socket","wifi"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thorsten-l.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-27T16:04:24.000Z","updated_at":"2020-07-14T18:32:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc127005-5961-47f0-9525-7479e0f25465","html_url":"https://github.com/thorsten-l/ESP8266-WiFi-Socket-II","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorsten-l%2FESP8266-WiFi-Socket-II","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorsten-l%2FESP8266-WiFi-Socket-II/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorsten-l%2FESP8266-WiFi-Socket-II/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thorsten-l%2FESP8266-WiFi-Socket-II/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thorsten-l","download_url":"https://codeload.github.com/thorsten-l/ESP8266-WiFi-Socket-II/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254105160,"owners_count":22015602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alexa","arduino","esp8266","esp8266-arduino","mqtt","mqtt-client","obi","openhab","platformio","socket","wifi"],"created_at":"2024-11-19T02:44:46.726Z","updated_at":"2025-05-14T08:34:53.333Z","avatar_url":"https://github.com/thorsten-l.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP8266-WiFi-Socket-II\n\n## Alternative Firmware for\n\n- Shelly 1 OS, [https://shelly.cloud/shelly1-open-source/](https://shelly.cloud/shelly1-open-source/)\n\n- BlitzWolf SHP6, [https://www.blitzwolf.com/2300W-EU-WIFI-Smart-Socket-p-300.html](https://www.blitzwolf.com/2300W-EU-WIFI-Smart-Socket-p-300.html)\n\n- BlitzWolf SHP6 (V.1.1, 15A, 3450W), [https://www.blitzwolf.com/3450W-EU-WIFI-Smart-Socket-p-412.html](https://www.blitzwolf.com/3450W-EU-WIFI-Smart-Socket-p-412.html)\n\n- OBI Version 2, [https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-weiss/p/4077806](https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-weiss/p/4077806)\n\n- OBI Version 1, [https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706](https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706)\n\n## Precompiled Firmware\n\n### Attention - update OTA from 1.1.x to 2.x for OBI Version 1 only\n\n\u003e If you like to update from firmware 1.1.x (OBI Version 1) to 2.x over the air (OTA) please first flash firmware version 1.2.0migration.\n\u003e\n\u003e If you try to update direct from 1.1.x to the current 2.x firmware\n\u003e version you will get an \"out of memory\" error\n\u003e\n\u003e Due to a new memory model the firmware will reset all settings to the default values\n\nFind the precompiled firmware in the [firmware](https://github.com/thorsten-l/ESP8266-WiFi-Socket-II/tree/master/firmware) directory.\n\n## Compile\n\nThis is a [PlatformIO](https://platformio.org/) project.\n\n## Firmware Reset\n\n1. Power on the WiFi Socket (plug in)\n2. Press down and hold the Power-Button during the first 5s\n3. Release Power-Button when the WiFi LED starts rapidly fast blinking\n4. The firmware reset ends after about 30s indicated by a permanent WiFi LED on.\n\n## Default Settings\n\nAfter a firmware reset the following values are set.\n\n|                            | value                 | description                           |\n| -------------------------- | --------------------- | ------------------------------------- |\n| Admin password             | admin                 | Setup admin password                  |\n| WiFi Mode                  | AP                    | Accesspoint- or Station-Mode          |\n| WiFi SSID                  | WifiSocketII-`esp id` | SSID in accesspoint mode              |\n| WiFi Password              | 12345678              | Default WiFi password                 |\n| Network Mode               | DHCP                  | Network mode STATIC or DHCP \\*1       |\n| Network IP-Address         | 192.168.192.1         | device ip address \\*2                 |\n| Network Mask               | 255.255.255.0         | Subnet mask \\*2                       |\n| Network Gateway            | 192.168.192.1         | Default gateway \\*2                   |\n| Network DNS                | 192.168.192.1         | DNS server address \\*2                |\n| OTA Hostname               | wifi-socket-1         | *O*ver *T*he *A*ir hostname           |\n| OTA Password               | otapass               | OTA firmware upload password          |\n| OpenHAB Callback Enabled   | **false**             |                                       |\n| OpenHAB Version            | 1                     | Callback for OpenHAB version 1 or 2   |\n| OpenHAB Item Voltage       | PowerMeter1Voltage    | ('-' = disables this item)            |\n| OpenHAB Item Current       | PowerMeter1Current    | ('-' = disables this item)            |\n| OpenHAB Item Power         | PowerMeter1Power      | ('-' = disables this item)            |\n| OpenHAB Item Name          | WifiSocket1           |                                       |\n| OpenHAB Host               | 192.168.1.1           |                                       |\n| OpenHAB Port               | 80                    |                                       |\n| OpenHAB Use Authentication | false                 |                                       |\n| OpenHAB User               | user                  |                                       |\n| OpenHAB Password           | password              |                                       |\n| OpenHAB SendingInterval    | 60                    | interval time in seconds (0=disable)  |\n| Alexa enabled              | **false**             |                                       |\n| Alexa devicename           | Socket                | Devicename for Alexa HA               |\n| MQTT Enabled               | **false**             |                                       |\n| MQTT ClientId              | WifiSocket1           |                                       |\n| MQTT Host                  | 192.168.1.1           |                                       |\n| MQTT Port                  | 1883                  |                                       |\n| MQTT Use Authentication    | false                 |                                       |\n| MQTT User                  | user                  |                                       |\n| MQTT Password              | password              |                                       |\n| MQTT In Topic              | socket1/in            |  receiving commands                   |\n| MQTT Out Topic             | socket1/out           |  sending callback                     |\n| MQTT Topic Voltage         | powermeter1/voltage   |  ('-' = disables this topic)          |\n| MQTT Topic Current         | powermeter1/current   |  ('-' = disables this topic)          |\n| MQTT Topic Power           | powermeter1/power     |  ('-' = disables this topic)          |\n| MQTT Topic JSON            | powermeter1/json      |  sending all values in JSON format    |\n| MQTT Sending Interval      | 60                    |  interval time in seconds (0=disable) |\n| Syslog Enabled             | **false**             |                                       |\n| Syslog Host                | 192.168.1.1           |                                       |\n| Syslog Port (TCP)          | 514                   |                                       |\n| Syslog App Name            | gateway-doorbell      |                                       |\n\n\\*1 In WiFi Station-Mode only\n\n\\*2 will be overwritten from DHCP-Response\n\n## Hardware\n\n- [BlitzWolf SHP6](https://www.blitzwolf.com/2300W-EU-WIFI-Smart-Socket-p-300.html)\n\n- [OBI Wifi Stecker Schuko - Version 2](https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-weiss/p/4077806)\n\n- [OBI Wifi Stecker Schuko - Version 1](https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706)\n\n## OpenHAB\n\n### OpenHAB - HTTP Binding sample\n\n```t\nSwitch LivingRoom_Power \"Living Room Outlet\" {http=\"\u003e[ON:GET:http://wifi-socket.ip/on] \u003e[OFF:GET:http://wifi-socket.ip/off]\"}\n```\n\nIf you like to read the state of the socket by OpenHAB. First create a file `getState.js` in the `transform` directory with the following content:\n\n```javascript\nJSON.parse(input).state;\n```\n\nadd\n\n```t\n\u003c[http://wifi-socket.ip/state:30000:JS(getState.js)]\n```\n\nto the `Switch` definition. Every 30s the state of the socket will be checked.\n\n### OpenHAB - MQTT binding sample for the switch and the energy monitor values\n\n#### MQTT Binding Version 1.x\n\n```t\nSwitch WifiSocketBwShp6 \"BW SHP6 Ein / Aus\" {mqtt=\"\u003e[mosquitto:socket-bw/in:command:ON:1],\u003e[mosquitto:socket-bw/in:command:OFF:0],\u003c[mosquitto:socket-bw/out:state:default]\"}\n\nNumber WifiSocketBwShp6Voltage \"BW SHP6 Voltage [%.1fV]\" {mqtt=\"\u003c[mosquitto:socket-bw/voltage:state:default]\"}\n\nNumber WifiSocketBwShp6Current \"BW SHP6 Current [%.2fA]\" {mqtt=\"\u003c[mosquitto:socket-bw/current:state:default]\"}\n\nNumber WifiSocketBwShp6Power \"BW SHP6 Power [%.1fW]\" {mqtt=\"\u003c[mosquitto:socket-bw/power:state:default]\"}\n```\n\n#### MQTT Binding Version 2.x\n\nFor the Binding Version 2.x it is necessary to configure the MQTT Thing and according to that the items.\n\nmqtt.things:\n\n```t\nBridge mqtt:broker:mosquitto \"Mosquitto\" [ host=\"127.0.0.1\", secure=false, clientID=\"MotherShip\", username=\"$MQTT_USERNAME\", password=\"$MQTT_PASSWORD\"]\n{\n   Thing topic socket-bw \"BW SHP6\" {\n    Channels:\n     Type switch : state \"BW SHP6 Ein / Aus\" [ stateTopic=\"wsocket-bw/out\", on=\"ON\", off=\"OFF\", commandTopic=\"socket-bw/in\", on=\"ON\", off=\"OFF\" ]\n     Type string : voltage [ stateTopic=\"wsocket-bw/voltage\" ]\n     Type string : current [ stateTopic=\"wsocket-bw/current\" ]\n     Type string : power [ stateTopic=\"wsocket-bw/power\" ]\n   }\n\n}\n```\n\nmqtt.items:\n\n```t\nSwitch WifiSocketBwShp6 \"BW SHP6 Ein / Aus\" { channel=\"mqtt:topic:mosquitto:socket-bw:state\" }\n\nNumber WifiSocketBwShp6Voltage \"BW SHP6 Voltage [%.1fV]\" { channel=\"mqtt:topic:mosquitto:socket-bw:voltage\" }\n\nNumber WifiSocketBwShp6Current \"BW SHP6 Current [%.2fA]\" { channel=\"mqtt:topic:mosquitto:socket-bw:current\" }\n\nNumber WifiSocketBwShp6Power \"BW SHP6 Power [%.1fW]\" { channel=\"mqtt:topic:mosquitto:socket-bw:power\" }\n```\n\n## References\n\n- [PlatformIO](https://platformio.org/)\n- [Arduino core for ESP8266 WiFi chip](https://github.com/esp8266/Arduino)\n- [Async TCP Library for ESP8266](https://github.com/me-no-dev/ESPAsyncTCP)\n- [Async Web Server for ESP8266 and ESP32](https://github.com/me-no-dev/ESPAsyncWebServer)\n- [FauxmoESP - Amazon Alexa support for ESP8266 and ESP32 devices](https://bitbucket.org/xoseperez/fauxmoesp)\n- [Arduino-pubsubclient - A client library for the ESP8266 that provides support for MQTT](https://github.com/knolleary/pubsubclient)\n- [Pure.CSS - A nice CSS, as GZIP it is less than 4k so it is useful for embedded devices](https://purecss.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthorsten-l%2Fesp8266-wifi-socket-ii","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthorsten-l%2Fesp8266-wifi-socket-ii","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthorsten-l%2Fesp8266-wifi-socket-ii/lists"}