Skip to content

Commit

Permalink
Merge pull request #43 from vortigont/resources
Browse files Browse the repository at this point in the history
Resources
  • Loading branch information
vortigont authored Apr 27, 2024
2 parents 424cbca + 04475e9 commit d3a81e7
Show file tree
Hide file tree
Showing 22 changed files with 15 additions and 7 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ for [Peacefair](https://peacefair.aliexpress.com/store/1773456/) PZEM-004Tv30 Po

<img src="/examples/espemembui.png" alt="espem ui" width="50%"/>

## ESPEM on Mobile phone

| <img src="/examples/mobile02_res.webp" alt="espem mobile ui" width="30%"/> | <img src="/examples/mobile03_res.webp" alt="espem mobile ui" width="30%"/> | <img src="/examples/mobile04_res.webp" alt="espem mobile ui" width="30%"/> | <img src="/examples/mobile05_res.webp" alt="espem mobile ui" width="30%"/> |


To find EspEM in your WiFi network you can use [mDNS Discovey](https://play.google.com/store/apps/details?id=com.mdns_discovery.app&hl=ja&gl=US) app for Android or any other that can work with mDNS or `Bonjour` for iPhone.
Just find `http` enabled service in the app and open with a browser.


## MQTT
MQTT server publishing and connection could be configured via "Settings" - "MQTT".
It will publish pzem metrics to topic `~/pub/pzem/jmetrics` on each update cycle. Where `~` is topic prefix, default is `EmbUI/[DeviceID]/`.
Expand Down
Binary file modified data/css/pure.css.gz
Binary file not shown.
Binary file modified data/css/style.css.gz
Binary file not shown.
Binary file modified data/css/style_dark.css.gz
Binary file not shown.
Binary file modified data/css/style_light.css.gz
Binary file not shown.
Binary file added data/css/wp_dark.svg.gz
Binary file not shown.
Binary file removed data/css/wp_dark.webp
Binary file not shown.
Binary file added data/css/wp_light.svg.gz
Binary file not shown.
Binary file removed data/css/wp_light.webp
Binary file not shown.
Binary file modified data/index.html.gz
Binary file not shown.
Binary file modified data/js/embui.js.gz
Binary file not shown.
Binary file modified data/js/espem.js.gz
Binary file not shown.
Binary file modified data/js/espem.ui.json.gz
Binary file not shown.
Binary file modified data/js/tz.json.gz
Binary file not shown.
Binary file modified data/js/ui_sys.json.gz
Binary file not shown.
Binary file added examples/mobile01_res.webp
Binary file not shown.
Binary file added examples/mobile02_res.webp
Binary file not shown.
Binary file added examples/mobile03_res.webp
Binary file not shown.
Binary file added examples/mobile04_res.webp
Binary file not shown.
Binary file added examples/mobile05_res.webp
Binary file not shown.
11 changes: 5 additions & 6 deletions resources/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<button id="{{id}}" {{#if2 color}}style="background-color: {{color}}"{{/if2}} class="pure-u-1 pure-button pure-button-primary mr"
{{#if2 type == 0}}{{onevent "click", "on_change", id, value}}{{/if2}}
{{#if2 type == 1}}{{onevent "click", "on_submit", id, value}}{{/if2}}
{{#if2 type == 2}}{{onevent "click", "on_js", id, value}}{{/if2}}
{{#if2 type == 2}}{{onevent "click", "on_js", function}}{{/if2}}
{{#if2 type == 3}} onclick="location.href='{{value}}'" type="button"{{/if2}}
>{{label}}</button>
{{/if}}
Expand All @@ -116,11 +116,10 @@
{{/if}}
{{#if html == "div" && type == "js"}}
<!-- Custom div element, on create 'div' calls user js-function with a name passed in {{value}} parameter
id - becomes div ID and name
params: id - becomes div ID and name
class - becomes css class selector
value - becomes js-function name to call
label - becomes span "comment" element
params - becomes function argument
-->
{{#if2 label}}<span id="{{id}}-lbl" class="comment">{{label}}</span>{{/if2}}
<div id="{{id}}" {{#if2 class}}class="{{class}}"{{/if2}}><img src onerror='{{value}}("{{id}}","{{params.arg1}}")'></div>
Expand Down Expand Up @@ -157,10 +156,10 @@
<div class="frame"><iframe id="{{id}}" name="{{id}}" src="{{value}}" class="iframe">iframe does not supported</iframe></div>
{{/if}}
{{#if html == "input" && type != "checkbox"}}
<span id="{{id}}-lbl">{{label}}</span>
<span>{{label}}</span>
{{#if2 type == "range" || type == "color"}}<span id="{{id}}-val">: {{value}}</span>{{/if2}}
{{#if2 type == "text" || type == "password"}}<span id="{{id}}-val"> ({{calc value.length || 0}})</span>{{/if2}}
<input type="{{type}}" id="{{id}}" name="{{id}}" class="pure-u-1 mr" value="{{value}}"
{{#if2 type == "text" || type == "password"}}<span id="{{id}}-val"> ({{calc value.length || 0}})</span>{{/if2}}
<input type="{{type}}" id="{{id}}" name="{{id}}" class="pure-u-1" value="{{value}}"
{{#if2 (min || min === 0)}}min="{{min}}"{{/if2}}
{{#if2 (max || max === 0)}}max="{{max}}"{{/if2}}
{{#if2 (step || step === 0)}}step="{{step}}"{{/if2}}
Expand Down
2 changes: 1 addition & 1 deletion resources/respack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USAGE="Usage: `basename $0` [-h] [-t embuitag] [-f]"

# embui branch/tag name to fetch
embuirepo='https://github.com/vortigont/EmbUI'
embuitag="v3.1"
embuitag="v3.1.2"

#####
# no changes below this point!
Expand Down

0 comments on commit d3a81e7

Please sign in to comment.