Skip to content

ScanIt, ad hoc sensor data acquisition for Tasmota controlled devices

License

Notifications You must be signed in to change notification settings

Wintespe/ScanIt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

ScanIt, ad hoc sensor data acquisition and control for Tasmota related devices

ScanIt is a Windows application for ad hoc acquisition of data from Tasmota controlled devices. ScanIt provides a graphical user interface for this purpose. It does not communicate with Tasmota via MQTT, it uses the HTTP interface. Alternatively, the serial COM port can be used. No other software tools like Influxdb or Prometheus are required. ScanIt communicates autonomously with Tasmota via the HTTP or COM interface.

ScanIt also includes a console environment. This can be used to control your device directly. A text file can be included here to control and automate the process. This is very useful for setting up your application, especially via the serial port.

The ScanIt application uses the DotNet framework on Windows. This makes it easy to port it to Linux. Design and development refer to the VisualStudio 2022 Community Edition. This IDE is free of charge. ScanIt consists of two main parts: Logging and Console.

Logging part to collect data

An example of a data scan for temperature logging is shown below:

Status 10 : DS18B20>Temperature, BMP280>Temperature#0

The corresponding output in the log window is:

20.03.2023 14:41:08 DS18B20 Temperature = 15.6 BMP280 Temperature = 15

20.03.2023 14:41:18 DS18B20 Temperature = 15.6 BMP280 Temperature = 15

At the same time, ScanIt writes the log data to a file in CSV format. Each entry is separated by a tab. This makes it easy to import the file into LibreOffice-Calc or Excel.

The following diagram was created from a temperature measurement using LibreOffice:

­

image

Console part

The Console may be used for direct communication between the user and the Tasmota firmware. For example, to change the setpoint, when a temperature control is acquired.

A text file can be included to control and automate the process. This is very useful for setting up your application, especially via the serial port.

ScanIt specific commands are not sent directly. They are interpreted and specially processed by the console. These commands begin with the "@" character. The following table provides a brief overview.

­

Command Brief Description
Batch related
@­batch Execute commands from a text file
@­delay Delay inserted between commands
@­echo Turns the command echo from batch on or off
@­edit Edit batch file
@­saveparameter Save parameter on exit
@­shutdown Exits ScanIt
@­wait Waits H:M:S between commands
@­rem Output a comment
Tasmota related
@­driver Active drivers
@­feature Active features
@­gpio Active GPIOs
@­gpioa All GPIOs
@­i2c I2c drivers
@­option Option settings
@­optiona All option settings
@­sensor Active sensors
@­status Status from 1 to 11
Main Window related
@­append Append the data to the log file
@­execution Starts a scan with the parameters set
@­interval Set the interval time in the main window
@­ip-address IP address of the hardware
@­logfile Set the filename for the log file
@­scan Scans to be executed in the main window
@­show Display data sets in the main window
COM related
@­com List all the serial ports on your computer
@­cominfo List the properties of all the serial ports on your computer
@­comconfig List / set the configuration of the serial port

­

Example:

@­Feature offers among others

...
Feature 7 bit vector 00C01000
Bit 12 = USE_SHELLY_DIMMER
Bit 22 = USE_TIMEPROP
Bit 23 = USE_PID
...

A command sequences from a text file can be executed with @­Batch

<BatchID>
@Interval 10
@Ip-Address NodeMcu2
@Execution Start
PidSp 25
@Wait 0:20:0
PidSp 27
@Wait 0:20::0
PidSp 25
@Wait 600
@Execution Stop

Windows command line interface

ScanIt has a Windows command line interface. This can be used to activate a batch file e.g. time-controlled by the Windows Task Scheduler. This feature allows an automated collection of data without further user intervention.

A Windows command line might look like this:

C:\ScanIt\ScanIt.exe Batch:C:\ScanIt\Batch.txt

Batch Example:

<BatchID>
@Scan "Status 10 : PidSp#1, PidPv#2, PidPower, PidTi#0, PidTc, PidTd",  "Power2", "Power1"
@Interval 10
@Ip-Address NodeMcu2
@Logfile C:\Tasmota Batch Files\Batch.csv
@Show 0
@Append 1
@Execution Start
PidSp 25
@Wait 0:10: 0
PidSp 27
@Wait 10: 0
PidSp 25
@Wait 600
@Execution Stop
@ShutDown

Language extensions

The ScanIt application is not bound to a specific language. It is possible to change the language at run time. This is done using external language packages. These can be modified using a simple text editor such as Notepad. This makes it easy to add new languages to ScanIt.

Installation

ScanIt does not need to be specially installed on Windows. It is sufficient to extract the contents of ScanIt.zip to a common folder.

BlueBulb20

Windows may blocks ZIP files from the Internet to protect the system. Please remember to unblock the ZIP file using the Windows Explorer.

You must enable the HTTP API in your Tasmota application.

­

About

ScanIt, ad hoc sensor data acquisition for Tasmota controlled devices

Resources

License

Stars

Watchers

Forks

Packages

No packages published