Nice(?) and cheap ESP32+Colour display

We have wormsign :slight_smile:

All MQTT based

So Arduino sketch on the CYD that sends pressure/x/y when touched

void printTouchToMQTT(TS_Point p) {
  Serial.print("Pressure = ");
  Serial.println(p.z);
  // doc previously declard as DynamicJsonDocument  doc(200);
  doc.clear();
  doc["pressure"] = p.z;
  doc["x"] = p.x;
  doc["y"] = p.y;
  char buffer[256];
  serializeJson(doc, buffer);
  client.publish("CYD1", buffer);
}

Also, decodes JSON received and checks for keys such as clear and writeText

void callback(char* topic, byte *payload, unsigned int length) {
  Serial.println("sub rcvd:");
  for (int i=0;i<length;i++) {
    Serial.print((char)payload[i]);
  }
  Serial.println();
  rcvdDoc.clear();
  deserializeJson(rcvdDoc, (const byte*)payload, length);
  
  if (rcvdDoc.containsKey("writeText")) {
    int x = rcvdDoc["x"];
    int y = rcvdDoc["y"];
    String temp = rcvdDoc["writeText"];
    word backgroundColour = 65535;
    if (rcvdDoc.containsKey("backgroundColour")) {
      backgroundColour = rcvdDoc["backgroundColour"];
    }
    tft.setTextColor(TFT_BLACK,backgroundColour);
    int fontSize = 4;
    if (rcvdDoc.containsKey("fontSize")) {
      fontSize = rcvdDoc["fontSize"];
    }
    tft.drawString(temp, x, y, fontSize);
  }
  if (rcvdDoc.containsKey("clear")) {
    tft.fillScreen(TFT_BLACK);
  }

}

NR

Just simply checking the x position received and

if <160 (left) then I send a clear message and then a writeText message saying "LIGHTS OFF" and put that over on right. Also get NR to send message to Alexa to turn my ceiling light on

then if x > 160 (right) I send clear message and then a writeText message saying "LIGHTS ON" and put that over on right. Also get NR to send message to Alexa to turn my ceiling light off

All very rough at moment but now I'm thinking I need to buy another one so I put one in living room for daughter who won't speak to Alexa on principle to turn stuff on/off :slight_smile:

[edit]Already changed my UI :slight_smile:

Click on name of light and it will toggle its state

4 Likes

Are there any more examples of successful applications for this?

Not wanting to copy anybody's homework of course...

1 Like

Just some tryouts mostly stolen from the web.
Nothing useful but more to get a grasp of openhasp.
So only some loose nodes to tryout.
I have the device on my desk and control some lights.
Working now for a couple of weeks
First the pages.jsonl on the device, not nessecary, you can do everything with mqtt.

I have a ESP32-8048S050C from the Sunton store (800x480)

{"comment":" ----------- Page 1 - Hoofd Menu ------------"}

{"page":0,"id":14,"obj":"line","points":[[670,0],[670,480]],"line_color":"#ffffff","enabled":false}
{"page":0,"id":13,"obj":"line","points":[[0,410],[800,410]],"line_color":"#ffffff","enabled":false}

{"page":0,"id":16,"obj":"label","x":690,"y":410,"w":100,"h":40,"border_width":0,"text_color":"#ffffff","text":"Tijd"}
{"page":0,"id":17,"obj":"label","x":690,"y":440,"w":100,"h":40,"border_width":0,"text_color":"#ffffff","text":"temp"}
{"page":0,"id":18,"obj":"led",  "x":750,"y":20,"w":40,"h":40,"border_color":"#ffffff","bg_color":"#1f87e8","tag":"LedCV"}
{"page":0,"id":19,"obj":"led",  "x":750,"y":80,"w":40,"h":40,"border_color":"#ffffff","bg_color":"#1f87e8","tag":"LedConvector"}
{"page":0,"id":1,"obj":"btn","action":{"up":"page 1"},"x":10,"y":415,"w":150,"h":65,"radius":5,"text":"Menu"}


{"page":1,"id":1, "obj":"btn","x":10, "y":20, "w":210,"h":80,"radius":5,"text":"Scenes"}
{"page":1,"id":2, "obj":"btn","x":230,"y":20, "w":210,"h":80,"radius":5,"text":"Verwarming"}
{"page":1,"id":3, "obj":"btn","x":450,"y":20, "w":210,"h":80,"radius":5,"text":"3"}
{"page":1,"id":4, "obj":"btn","x":10, "y":120,"w":210,"h":80,"radius":5,"text":"4"}
{"page":1,"id":5, "obj":"btn","x":230,"y":120,"w":210,"h":80,"radius":5,"text":"5"}
{"page":1,"id":6, "obj":"btn","x":450,"y":120,"w":210,"h":80,"radius":5,"text":"6"}
{"page":1,"id":7, "obj":"btn","x":10, "y":220,"w":210,"h":80,"radius":5,"text":"7"}
{"page":1,"id":8, "obj":"btn","x":230,"y":220,"w":210,"h":80,"radius":5,"text":"8"}
{"page":1,"id":9, "obj":"btn","x":450,"y":220,"w":210,"h":80,"radius":5,"text":"9"}
{"page":1,"id":10,"obj":"btn","x":10, "y":320,"w":210,"h":80,"radius":5,"text":"10"}
{"page":1,"id":11,"obj":"btn","x":230,"y":320,"w":210,"h":80,"radius":5,"text":"11"}
{"page":1,"id":12,"obj":"btn","x":450,"y":320,"w":210,"h":80,"radius":5,"text":"12"}


{"page":3, "comment":"Scrolling text test"}
{"id":100, "obj":"tabview", "x":50, "y":200, "w":350, "h":200, "bg_color":"#444444", "bg_opa":128, "btn_pos":0}
{"id":101, "obj":"tab", "parentid":100}
{"id":102, "parentid":101, "obj":"label", "x":10, "y":10, "w":330, "text_color":"#eee6d1", "text": "This test device is #000080 located on my desk#. This is only a test, and this whole thing is to test how text will or won't scroll up and down or maybe sideways. Make sure to set click:false for the label object so the scroll touches hit the TAB instead of the LABEL.", "mode":"break", "click":"false"}
[{"id":"78702519da996257","type":"mqtt out","z":"27d6323ed6b7a6c0","name":"","topic":"hasp/plate/command","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b7b4fc84.41ca7","x":1040,"y":290,"wires":[]},{"id":"fe12f56f750de13d","type":"inject","z":"27d6323ed6b7a6c0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"page 1","payloadType":"str","x":230,"y":160,"wires":[["09819177dcf01872"]]},{"id":"5e19a889d5cf0822","type":"inject","z":"27d6323ed6b7a6c0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"antiburn on","payloadType":"str","x":240,"y":120,"wires":[["09819177dcf01872"]]},{"id":"973fcb951093073c","type":"mqtt in","z":"27d6323ed6b7a6c0","name":"","topic":"hasp/plate/state/#","qos":"2","datatype":"auto-detect","broker":"b7b4fc84.41ca7","nl":false,"rap":true,"rh":0,"inputs":0,"x":230,"y":30,"wires":[["2a40d1089c6f49bf"]]},{"id":"2a40d1089c6f49bf","type":"debug","z":"27d6323ed6b7a6c0","name":"debug 340","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":30,"wires":[]},{"id":"3a50643e1622d6c2","type":"debug","z":"27d6323ed6b7a6c0","name":"debug 351","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":980,"y":540,"wires":[]},{"id":"3c7ba024a6a14d01","type":"mqtt out","z":"27d6323ed6b7a6c0","name":"","topic":"","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b7b4fc84.41ca7","x":970,"y":480,"wires":[]},{"id":"e8ac6dc6c350c07d","type":"link in","z":"27d6323ed6b7a6c0","name":"MQTT Send","links":["6b9866dae24dbae0","3dee1d54ab4978c4","6ac2fd1ef16ff0d1","11fba29d2bd01acf","dc4cc948412aa7ea","452efc6a9a7b1537","30f7dcb067c6f0ce","ba88e701d190bb43","6e36443a397ad2c6","c23b1605938dd4e4"],"x":875,"y":480,"wires":[["3c7ba024a6a14d01","3a50643e1622d6c2"]]},{"id":"ffdd593a52db4455","type":"inject","z":"27d6323ed6b7a6c0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"page 2","payloadType":"str","x":230,"y":200,"wires":[["09819177dcf01872"]]},{"id":"ca8d131ebad10e37","type":"inject","z":"27d6323ed6b7a6c0","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"restart","payloadType":"str","x":230,"y":280,"wires":[["09819177dcf01872"]]},{"id":"0d425b85aba2c038","type":"inject","z":"27d6323ed6b7a6c0","name":"Page 3","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"page 3","payloadType":"str","x":220,"y":240,"wires":[["09819177dcf01872"]]},{"id":"e37c0eb15a21c263","type":"inject","z":"27d6323ed6b7a6c0","name":"Clear page ...","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"clearpage 2","payloadType":"str","x":230,"y":80,"wires":[["09819177dcf01872"]],"info":"/**clearpage~\naccepted parameters: [0-12] or all\nDeletes all objects on a given page. \nIf no page number is specified, it clears the current page. \nUse clearpage all to clear all objects on all pages.\n\nTo delete individual objects, you can issue the pXbY.delete command.\n */"},{"id":"09819177dcf01872","type":"junction","z":"27d6323ed6b7a6c0","x":350,"y":160,"wires":[["2b535b146f49db6a"]]},{"id":"2b535b146f49db6a","type":"junction","z":"27d6323ed6b7a6c0","x":400,"y":290,"wires":[["f127f11c00f00784"]]},{"id":"f127f11c00f00784","type":"junction","z":"27d6323ed6b7a6c0","x":870,"y":290,"wires":[["78702519da996257"]]},{"id":"79c9f23f1f486db2","type":"group","z":"27d6323ed6b7a6c0","name":"","style":{"fill":"#ffffbf","label":true},"nodes":["723dff211a826d58","85e4ee14683c874a","41691329f159374c","d333b8c90bdc942c","e50f64ce8cde1a4c"],"x":514,"y":539,"w":282,"h":132},{"id":"723dff211a826d58","type":"inject","z":"27d6323ed6b7a6c0","g":"79c9f23f1f486db2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"25","crontab":"","once":true,"onceDelay":"6","topic":"","payload":"","payloadType":"date","x":575,"y":580,"wires":[["41691329f159374c"]],"l":false},{"id":"85e4ee14683c874a","type":"mqtt out","z":"27d6323ed6b7a6c0","g":"79c9f23f1f486db2","name":"Tijd","topic":"hasp/plate/command/p0b16.text","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b7b4fc84.41ca7","x":720,"y":580,"wires":[]},{"id":"41691329f159374c","type":"moment","z":"27d6323ed6b7a6c0","g":"79c9f23f1f486db2","name":"","topic":"","input":"","inputType":"msg","inTz":"Europe/Berlin","adjAmount":0,"adjType":"days","adjDir":"add","format":"HH:mm","locale":"nl-NL","output":"","outputType":"msg","outTz":"Europe/Amsterdam","x":635,"y":580,"wires":[["85e4ee14683c874a"]],"l":false},{"id":"d333b8c90bdc942c","type":"link in","z":"27d6323ed6b7a6c0","g":"79c9f23f1f486db2","name":"WKTemp Openhasp","links":["6cf6c557a046112f"],"x":635,"y":630,"wires":[["e50f64ce8cde1a4c"]]},{"id":"e50f64ce8cde1a4c","type":"mqtt out","z":"27d6323ed6b7a6c0","g":"79c9f23f1f486db2","name":"Temp","topic":"hasp/plate/command/p0b17.text","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"b7b4fc84.41ca7","x":720,"y":630,"wires":[]},{"id":"1531b54368523ad7","type":"group","z":"27d6323ed6b7a6c0","name":"","style":{"fill":"#ffffbf","label":true},"nodes":["678261e518b57e7b","a900d5316cf9b94d","dc4cc948412aa7ea"],"x":474,"y":359,"w":372,"h":82},{"id":"678261e518b57e7b","type":"inject","z":"27d6323ed6b7a6c0","g":"1531b54368523ad7","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":535,"y":400,"wires":[["a900d5316cf9b94d"]],"l":false},{"id":"a900d5316cf9b94d","type":"function","z":"27d6323ed6b7a6c0","g":"1531b54368523ad7","name":"Backgroud Page ..  Color","func":"msg.topic = \"hasp/plate/command/jsonl\"\nmsg.payload = { \"page\": 2, \"id\": 0, \"bg_color\": \"#111\" }\nreturn msg;\n\n/**\n{\"id\":0,\"bg_color\":\"#111\"}\n{\"page\":1,\"id\":0,\"bg_color\":\"#111\"}\n{\"page\":2,\"id\":0,\"bg_color\":\"#111\"}\n{\"page\":3,\"id\":0,\"bg_color\":\"#111\"}\n{\"page\":4,\"id\":0,\"bg_color\":\"#111\"}\n */","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":400,"wires":[["dc4cc948412aa7ea"]]},{"id":"dc4cc948412aa7ea","type":"link out","z":"27d6323ed6b7a6c0","g":"1531b54368523ad7","name":"Backgroud Page","mode":"link","links":["e8ac6dc6c350c07d"],"x":805,"y":400,"wires":[]},{"id":"ebf53e92cf4f4cc1","type":"group","z":"27d6323ed6b7a6c0","name":"","style":{"fill":"#e3f3d3","label":true},"nodes":["cf8dc1a1ca094363","821cda605625f61f","9c8c1bfcfca0a524","2ea011cc9ac757b1","452efc6a9a7b1537","30f7dcb067c6f0ce"],"x":134,"y":359,"w":322,"h":122},{"id":"cf8dc1a1ca094363","type":"link in","z":"27d6323ed6b7a6c0","g":"ebf53e92cf4f4cc1","name":"WKTemp Openhasp","links":["ab7ebe5e8d281d35"],"x":175,"y":440,"wires":[["821cda605625f61f"]]},{"id":"821cda605625f61f","type":"function","z":"27d6323ed6b7a6c0","g":"ebf53e92cf4f4cc1","name":"CV On Led","func":"let status = msg.payload;\nmsg.topic = \"hasp/plate/command/jsonl\"\n\nif(status == \"ON\") {\n    msg.payload = { \"page\": 0, \"id\": 18, \"bg_color\": \"#d81b43\" }\n    } \nelse {\n    msg.payload = { \"page\": 0, \"id\": 18, \"bg_color\": \"#808080\" }\n    }\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":440,"wires":[["452efc6a9a7b1537"]]},{"id":"9c8c1bfcfca0a524","type":"link in","z":"27d6323ed6b7a6c0","g":"ebf53e92cf4f4cc1","name":"WKTemp Openhasp","links":["752575baab179965"],"x":175,"y":400,"wires":[["2ea011cc9ac757b1"]]},{"id":"2ea011cc9ac757b1","type":"function","z":"27d6323ed6b7a6c0","g":"ebf53e92cf4f4cc1","name":"Convector Led","func":"let status = msg.payload;\nmsg.topic = \"hasp/plate/command/jsonl\"\n\nif(status == \"ON\") {\n    msg.payload = { \"page\": 0, \"id\": 19, \"bg_color\": \"#d81b43\" }\n    } \nelse {\n    msg.payload = { \"page\": 0, \"id\": 19, \"bg_color\": \"#808080\" }\n    }\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":400,"wires":[["30f7dcb067c6f0ce"]]},{"id":"452efc6a9a7b1537","type":"link out","z":"27d6323ed6b7a6c0","g":"ebf53e92cf4f4cc1","name":"link out 11","mode":"link","links":["e8ac6dc6c350c07d"],"x":415,"y":440,"wires":[]},{"id":"30f7dcb067c6f0ce","type":"link out","z":"27d6323ed6b7a6c0","g":"ebf53e92cf4f4cc1","name":"link out 12","mode":"link","links":["e8ac6dc6c350c07d"],"x":415,"y":400,"wires":[]},{"id":"4dda5e85960d3138","type":"group","z":"27d6323ed6b7a6c0","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["2a9146b7cfb09c1f","3dee1d54ab4978c4","34a8317f129a07da","fa5905bf43e9e050","ba88e701d190bb43","e400ed406cc5ed20","e6a0e81fed5ca0cb","6e36443a397ad2c6","a7e02f5fc9774474","469abad14528b583","c23b1605938dd4e4","9e515a582b572839"],"x":134,"y":509,"w":272,"h":172},{"id":"2a9146b7cfb09c1f","type":"inject","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":195,"y":550,"wires":[["34a8317f129a07da"]],"l":false},{"id":"3dee1d54ab4978c4","type":"link out","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"CT-Slider","mode":"link","links":["e8ac6dc6c350c07d"],"x":365,"y":550,"wires":[]},{"id":"34a8317f129a07da","type":"function","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"CT Slider","func":"const send = {\n    \"page\": 2,\n    \"id\": 6,\n    \"obj\": \"slider\",\n    \"x\": 220,\n    \"y\": 80,\n    \"w\": 30,\n    \"h\": 260,\n    \"bg_color\": \"#fae578\",\n    \"bg_grad_color\": \"#95e9fc\",\n    \"bg_grad_dir\": 1,\n    \"bg_main_stop\": 0,\n    \"bg_grad_stop\": 255,\n    \"bg_color20\": \"#FA8072\",\n    \"bg_opa20\": 255,\n    \"bg_opa10\": 0,\n    \"min\": 0,\n    \"max\": 100\n}\nmsg.payload = send\nmsg.topic = \"hasp/plate/command/jsonl\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":550,"wires":[["3dee1d54ab4978c4"]]},{"id":"fa5905bf43e9e050","type":"inject","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":195,"y":580,"wires":[["e400ed406cc5ed20"]],"l":false},{"id":"ba88e701d190bb43","type":"link out","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"CT-Slider","mode":"link","links":["e8ac6dc6c350c07d"],"x":365,"y":580,"wires":[]},{"id":"e400ed406cc5ed20","type":"function","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"Color pick","func":"const send = {\n    \"id\": 2,\n    \"obj\": \"cpicker\",\n    \"x\": 400,\n    \"y\": 80,\n    \"w\": 300,\n    \"h\": 300,\n    \"border_width\": 0,\n    \"radius\": 0,\n    \"pad_top\": 5,\n    \"pad_right\": 5,\n    \"pad_left\": 5,\n    \"pad_bottom\": 5\n}\nmsg.payload = send\nmsg.topic = \"hasp/plate/command/jsonl\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":580,"wires":[["ba88e701d190bb43"]]},{"id":"e6a0e81fed5ca0cb","type":"inject","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":195,"y":610,"wires":[["a7e02f5fc9774474"]],"l":false},{"id":"6e36443a397ad2c6","type":"link out","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"CT-Slider","mode":"link","links":["e8ac6dc6c350c07d"],"x":365,"y":610,"wires":[]},{"id":"a7e02f5fc9774474","type":"function","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"Gauge","func":"const send = {\n    \"page\":2,\n    \"id\": 3,\n    \"obj\": \"gauge\",\n    \"x\": 400,\n    \"y\": 100,\n    \"w\": 280,\n    \"h\": 260,\n    \"radius\": 50\n}\nmsg.payload = send\nmsg.topic = \"hasp/plate/command/jsonl\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":270,"y":610,"wires":[["6e36443a397ad2c6"]]},{"id":"469abad14528b583","type":"inject","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":195,"y":640,"wires":[["9e515a582b572839"]],"l":false},{"id":"c23b1605938dd4e4","type":"link out","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"CT-Slider","mode":"link","links":["e8ac6dc6c350c07d"],"x":365,"y":640,"wires":[]},{"id":"9e515a582b572839","type":"function","z":"27d6323ed6b7a6c0","g":"4dda5e85960d3138","name":"Foto","func":"const send = {\n    \"page\": 2,\n    \"id\": 34,\n    \"obj\": \"img\",\n    \"src\": \"L:/IMG_4850.png\",\n    \"auto_size\": 1,\n    \"w\": 800\n}\nmsg.payload = send\nmsg.topic = \"hasp/plate/command/jsonl\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":270,"y":640,"wires":[["c23b1605938dd4e4"]]},{"id":"b7b4fc84.41ca7","type":"mqtt-broker","name":"Localhost","broker":"192.168.1.251","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]
4 Likes

Are people on the Forum still experimenting with the ESP32-2432S028R as things seem to have gone rather quiet? I must admit I've not done anything with mine (after plugging it in and checking it worked).

Sadly still in its box - not had time to look at it at all yet :frowning:

2 Likes

TouchƩ
Just like a lot of my "impulse buys".
I thought I'd try "talking to it" using Python - but (so far) have failed to find a Python library for it.

1 Like

Well, there are updated examples for a number of different firmwares now. Including ESPHome which is what I use for my ESP devices. If I can ever stop myself from working on UIBUILDER, I'll be doing that.

I really need to update all my ESPHome devices anyway.

Just poking this topic again so it doesn't get closed and in hope of more examples to crib from...

1 Like

I'm sure its supported by openHasp.

So if you get it flashed with that, I think I've seen something somewhere to get it working with NR :stuck_out_tongue_winking_eye:

So now I have scaling working in my "haspBoard" (TM) :rofl: project, I can test your little screen resolutions.

@jbudd this is running on my 480x480, but setup as 320x240. It's a bit small but quite usable.

image

image

So I would recommend you give openHASP a try on these screens.

PS I don't have shares in openHasp I just really like @fvanroie's project :wink:

Alas I have installed openHasp, it creates an access point HASP-9a6de0 but the screen is blank so I can't see the login password.

I expect the openHasp binary d1-mini-esp32_ili9341_full_4MB_v0.6.3_497f611.bin was the wrong one.

The documentation for this device says
ESP32-2432S024C uses ESP32-WROOM-32. Driver chip ILI9341

I'm sure someone could help out at -

The access point password is haspadmin I think, if you connect then you can setup the hasp via a browser interface.

As you say you may have the wrong binary if there is no display.

Thanks for the link @smcgann99.

From there I was able to find firmware at https://github.com/elik745i/ESP32-2432s024c/blob/master/build_output/firmware/esp32-2432s024c_full_4MB_v0.7.0-rc8_e6be9c9.bin which I flashed with Tasmota PyFlasher.

Now I have a dark screen with "Plate01" on it and a really irritating throbbing red LED
image
(screen capture courtesy of Hasp web interface)

A major step forward I feel...

This particular device is 2.4" capacitive touch and I was able to enter my wifi credentials using the on screen keyboard in portrait mode!

1 Like

Good news :wink:

You may have to ask "elik" about the LED as I assume that's a custom build they made ?

I feel sure I read that there is an official build for those screens, but can't seem to find where now.

Anyway, if you would like to give my flow a whirl let me know, it's not finished yet but functional enough for you to have a play.

@jbudd @dynamicdave I found the openHasp build for this screen its at nightly.openhasp

Use Full firmware for first flash or OTA firmware via hasp web gui.

1 Like

@jbudd @dynamicdave Did you have any luck with the "official" build ?

Since I got no volunteers :sob:, I just ordered the 7" 800*480 version so I can test at different resolutions.

Official OpenHasp?

I bought a slightly different board than the "Official" CYD.
Probably foolishly I traded 0.4" for a capacitive touch screen.
Mine fits the RGB LED on the front of the board, which may eventually be a positive feature.
It's the ESP32-2432S024C, not included in the 15 precompiled binaries at https://install.openhasp.com/
However I installed OpenHasp from the link I posted above.

In the OH File editor I can see pages.jsonl. With these contents

{
    "page": 1,
    "id": 10,
    "w": 240,
    "obj": "label",
    "text": "%hostname%"
}
{"page":1,"id":20,"obj":"btnmatrix","x":10,"y":20,"w":220,"h":150,"options":["#FF0000 Red Text#","#0000FF Cyan Text#","\n","#FFFF00 Yellow Text#"],"toggle":1,"one_check":1}

which gives this
image

That's as far as I have gone so far. It doesn't send MQTT yet. Touching a button changes it's appearance but touching again doesn't reset it. No doubt these are easily fixed if I get round to reading up on OH.

@yogy's example above looks very promising on an 800x480 board, I can no doubt crib from that for 320 x 480

I have a 800x480 sunton and I responded earlier in a thread from you with some remarks but I was in the wrong thread as you stated.
I want to try your code, but you have not published it here as far as I can see (possibly github?)

Because our "Chinese friends" often change firmware without notice or changing product codes, the result can be that you order a week later the same product on aliexpress, you have a good chance you get one from a new batch with altered firmware.
Many of projects such as openhasp rely on reverse engineering or scarce info and must add new compiled firmware.
If not, the user has to have the knowledge to do it him/herself.
Keep that also in mind.

I shared the hasp flow here, post any questions in that thread please :wink:

I know that you all have these screens collecting dust on your desks :grinning:

So put them to use !

Any volunteers to give my flow a try on these screens ? (requires openHASP firmware)

Would really appreciate some feedback, before I spend any more time on it :stuck_out_tongue_winking_eye:

1 Like