https://wiki.hackerspace.gent/index.php?title=Control_Space&feed=atom&action=history
Control Space - Revision history
2024-03-28T19:40:37Z
Revision history for this page on the wiki
MediaWiki 1.29.1
https://wiki.hackerspace.gent/index.php?title=Control_Space&diff=157&oldid=prev
Thequux at 01:14, 1 June 2018
2018-06-01T01:14:27Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 01:14, 1 June 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l101" >Line 101:</td>
<td colspan="2" class="diff-lineno">Line 101:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Note the suffix after DVES in the first line and after sonoff- in the second. Make a label containing those suffixes separated by a slash, e.g., for the above lines, the label would be <code>8E52C7/4807</code>.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Note the suffix after DVES in the first line and after sonoff- in the second. Make a label containing those suffixes separated by a slash, e.g., for the above lines, the label would be <code>8E52C7/4807</code>.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">For raw ESP8266 devices (such as a wemos), go to sonoff-4807.0x20 (replacing the suffix with the second part of the label), go to "Configure/Configure module", set the device type to "18 Generic", then go back to that menu and configure the pins as desired. Note that, in order to get separate outputs per button/switch, you need to put a relay the same channel as the button. (''shakes fist at cloud'')</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>I found the following messages useful:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>I found the following messages useful:</div></td></tr>
</table>
Thequux
https://wiki.hackerspace.gent/index.php?title=Control_Space&diff=156&oldid=prev
Thequux: /* Configuration */
2018-06-01T01:09:59Z
<p><span dir="auto"><span class="autocomment">Configuration</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 01:09, 1 June 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l109" >Line 109:</td>
<td colspan="2" class="diff-lineno">Line 109:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>cmnd/DVES_189EE1/SwitchTopic DVES_1141BC</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>cmnd/DVES_189EE1/SwitchTopic DVES_1141BC</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Control target device from buttons</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Control target device from buttons</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>cmnd/DVES_189EE1/ButtonTopic <del class="diffchange diffchange-inline">-m '</del>DVS_1141BC<del class="diffchange diffchange-inline">'</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>cmnd/DVES_189EE1/ButtonTopic DVS_1141BC</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Set relay status (also try ON and OFF)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Set relay status (also try ON and OFF)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>cmnd/DVES_189EE1/POWER1 TOGGLE</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>cmnd/DVES_189EE1/POWER1 TOGGLE</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></pre></code></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></pre></code></div></td></tr>
</table>
Thequux
https://wiki.hackerspace.gent/index.php?title=Control_Space&diff=155&oldid=prev
Thequux: Created page with "Category:Projects ===== Building the firmware ===== Start from https://github.com/arendst/Sonoff-Tasmota. Apply the following patch, fixing the contents of STA_PASS1...."
2018-06-01T01:09:26Z
<p>Created page with "<a href="/Category:Projects" title="Category:Projects">Category:Projects</a> ===== Building the firmware ===== Start from https://github.com/arendst/Sonoff-Tasmota. Apply the following patch, fixing the contents of STA_PASS1...."</p>
<p><b>New page</b></p><div>[[Category:Projects]]<br />
<br />
<br />
===== Building the firmware =====<br />
<br />
Start from https://github.com/arendst/Sonoff-Tasmota. Apply the following patch, fixing the contents of STA_PASS1.<br />
<br />
<code><pre><br />
diff --git a/platformio.ini b/platformio.ini<br />
index cb5da39..2fde240 100644<br />
--- a/platformio.ini<br />
+++ b/platformio.ini<br />
@@ -65,7 +65,7 @@ monitor_speed = 115200<br />
;upload_speed = 115200<br />
upload_speed = 512000<br />
upload_resetmethod = nodemcu<br />
-upload_port = COM5<br />
+upload_port = /dev/ttyUSB0<br />
; *** Fix Esp/Arduino core 2.4.x induced Tasmota unused floating point includes<br />
extra_scripts = pio/strip-floats.py<br />
<br />
@@ -331,3 +331,20 @@ monitor_speed = ${common.monitor_speed}<br />
upload_speed = ${common.upload_speed}<br />
upload_port = ${common.upload_port}<br />
extra_scripts = ${common.extra_scripts}<br />
+<br />
+[env:wemos-d1-mini]<br />
+platform = espressif8266<br />
+framework = arduino<br />
+board = esp01_1m<br />
+board_flash_mode = dout<br />
+build_flags = -Wl,-Tesp8266.flash.1m0.ld -DMQTT_MAX_PACKET_SIZE=1000<br />
+lib_deps = PubSubClient, NeoPixelBus, IRremoteESP8266, ArduinoJSON<br />
+extra_scripts = pio/strip-floats.py<br />
+<br />
+; *** Serial Monitor options<br />
+monitor_baud = 115200<br />
+<br />
+; *** Upload Serial reset method for Wemos and NodeMCU<br />
+upload_resetmethod = nodemcu<br />
+upload_speed = 115200<br />
+;upload_port = COM6<br />
diff --git a/sonoff/user_config.h b/sonoff/user_config.h<br />
index 8cc07d3..a09444b 100644<br />
--- a/sonoff/user_config.h<br />
+++ b/sonoff/user_config.h<br />
@@ -59,8 +59,8 @@<br />
#define WIFI_SUBNETMASK "255.255.255.0" // [IpAddress3] If not using DHCP set Network mask<br />
#define WIFI_DNS "192.168.2.27" // [IpAddress4] If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)<br />
<br />
-#define STA_SSID1 "" // [Ssid1] Wifi SSID<br />
-#define STA_PASS1 "" // [Password1] Wifi password<br />
+#define STA_SSID1 "0x20" // [Ssid1] Wifi SSID<br />
+#define STA_PASS1 "[redacted]" // [Password1] Wifi password<br />
#define STA_SSID2 "" // [Ssid2] Optional alternate AP Wifi SSID<br />
#define STA_PASS2 "" // [Password2] Optional alternate AP Wifi password<br />
#define WIFI_CONFIG_TOOL WIFI_WPSCONFIG // [WifiConfig] Default tool if wifi fails to connect<br />
@@ -79,7 +79,7 @@<br />
// -- MQTT ----------------------------------------<br />
#define MQTT_USE 1 // [SetOption3] Select default MQTT use (0 = Off, 1 = On)<br />
<br />
-#define MQTT_HOST "" // [MqttHost]<br />
+#define MQTT_HOST "buzz.0x20" // [MqttHost]<br />
#define MQTT_FINGERPRINT1 "A5 02 FF 13 99 9F 8B 39 8E F1 83 4F 11 23 65 0B 32 36 FC 07" // [MqttFingerprint1]<br />
#define MQTT_FINGERPRINT2 "A5 02 FF 13 99 9F 8B 39 8E F1 83 4F 11 23 65 0B 32 36 FC 07" // [MqttFingerprint2]<br />
#define MQTT_PORT 1883 // [MqttPort] MQTT port (10123 on CloudMQTT)<br />
@@ -121,7 +121,7 @@<br />
// -- HTTP ----------------------------------------<br />
#define WEB_SERVER 2 // [WebServer] Web server (0 = Off, 1 = Start as User, 2 = Start as Admin)<br />
#define WEB_PASSWORD "" // [WebPassword] Web server Admin mode Password for WEB_USERNAME (empty string = Disable)<br />
-#define FRIENDLY_NAME "Sonoff" // [FriendlyName] Friendlyname up to 32 characters used by webpages and Alexa<br />
+#define FRIENDLY_NAME "Sonoff SV" // [FriendlyName] Friendlyname up to 32 characters used by webpages and Alexa<br />
#define EMULATION EMUL_NONE // [Emulation] Select Belkin WeMo (single relay/light) or Hue Bridge emulation (multi relay/light) (EMUL_NONE, EMUL_WEMO or EMUL_HUE)<br />
<br />
// -- Time - Up to three NTP servers in your region<br />
@@ -232,7 +232,7 @@<br />
// -- HTTP ----------------------------------------<br />
#define USE_WEBSERVER // Enable web server and wifi manager (+66k code, +8k mem)<br />
#define WEB_PORT 80 // Web server Port for User and Admin mode<br />
- #define WEB_USERNAME "admin" // Web server Admin mode user name<br />
+ #define WEB_USERNAME "0x20" // Web server Admin mode user name<br />
#define USE_EMULATION // Enable Belkin WeMo and Hue Bridge emulation for Alexa (+16k code, +2k mem)<br />
<br />
// -- mDNS ----------------------------------------<br />
</pre></code><br />
<br />
Follow the instructions on the above project's wiki to build and install the firmware.<br />
<br />
== Configuration ==<br />
<br />
Watch the MQTT channels <code>tele/sonoff/INFO1</code> and <code>tele/sonoff/INFO2</code> on buzz (username pi/password ''[redacted]''). <br />
(e.g., <code>mosquitto_sub -h buzz.0x20 -v -t "tele/sonoff/#"</code>) while the device is first booted.<br />
<br />
You will see:<br />
<code><pre><br />
tele/sonoff/INFO1 {"Module":"Sonoff Basic","Version":"5.14.0b","FallbackTopic":"DVES_8E52C7","GroupTopic":"sonoffs"}<br />
tele/sonoff/INFO2 {"WebServerMode":"Admin","Hostname":"sonoff-4807","IPAddress":"10.20.1.127"}<br />
</pre></code><br />
<br />
There may be other lines between these.<br />
<br />
Note the suffix after DVES in the first line and after sonoff- in the second. Make a label containing those suffixes separated by a slash, e.g., for the above lines, the label would be <code>8E52C7/4807</code>.<br />
<br />
I found the following messages useful:<br />
<code><pre><br />
# Set switches to send both transitions. 2 is the same but inverted<br />
cmnd/DVES_189EE1/SwitchMode 1<br />
# Set target device to control from switches. No message controls itself<br />
cmnd/DVES_189EE1/SwitchTopic DVES_1141BC<br />
# Control target device from buttons<br />
cmnd/DVES_189EE1/ButtonTopic -m 'DVS_1141BC'<br />
<br />
# Set relay status (also try ON and OFF)<br />
cmnd/DVES_189EE1/POWER1 TOGGLE<br />
</pre></code></div>
Thequux