Sonoff Th10 Tasmota Temp Reader in Ionic Stencil PWA Application

I am beer maker, and I am using sonoff all the time just for this purpose. In some steps before beer is ready I am using sonoff to keep an eye on my temperature.

It was annoying for me to open web page all the time, I wanted to have it always on top.

So this is my simple attempt to achieve that.

thermometer picture

Features

  • Setting url for Th10 local network
  • Setting min & max temperature
  • Simple "Console" for errors
  • Windows notification when temperature is to low or To High
  • App is set to be always on Top
  • App theme changes from black theme to white depending on Window's preferences

Prerequisites

Getting Started

npm install

to run server locally:

npm start

to create package ready to be passed on to create installer

npx tsc ./electron/app.ts
npm run-script packager

To create msi installer run (package needs to be already created)

npx tsc ./electron/createInstaller.ts
node Electron/createInstaller.js

Gotchas

For Running Electron with stencilJs

  • Notice that electron-serve & electron-store are in package.json dependencies
  • Notice Types folder in src directory
  • Generally Electron/main.ts is quite a thing
  • Notice src/global/globalScript.ts which is workaround not working ionic icons
  • in package.json main script "main": "Electron/app.js" is for electron-packager this should be changed to "main": "build/app.js" if you want to run pure stencil

Tasmota

  • Go to your local Tasmota home page (of device you are gonna use for this application) and to wifi settings, configure CORS Domain

Thanks

TODO

  • Installer is slow as hell and kinda big (big is maybe not that much fixable because of electron)