K interpreter release notes

Smick v.13.32.89 (last version)

  1. Modified command new to reset I/O PINs.
  2. When a timed command generates an error (nok) it is removed from crontab.
  3. Added new Wifiip command that returns the local IP assigned by DHCP.
  4. Added Telnet network serial interface and 3 configuration parameters to handle it: telnet, distel and Telnetcon.

The telnet parameter can take the following values:

    • 0: Telnet disabled
    • 1: Telnet enabled with login
    • 2: Telnet enabled without login.

With the distel parameter set the idle time (in minutes) for automatic deactivation of the Telnet interface. If distel is zero no automatic deactivation is set.

The Telnetcon event indicates whether Telnet is active. It can be used to know, for example, when someone connects or disconnects via Telnet.

    • Telnetcon -> led = 1
    • !Telnetcon -> led = 0

5. Added bell dynamic configuration parameter that enables or disables sending the BELL code to the Serial and Telnet interfaces:

    • 0: sending BELL disabled
    • 1: sending BELL enabled.

Sending BELL is performed at the same time as reading the bell parameter (when it is 1). To hear the bell on the Serial or Telnet client, you must configure it on the client.

6. Added new reboot command to reinitialize the system without resetting.

7. Added new fota command to force the OTA update with the latest available version. This command replaces the forced OTA update procedure described in release notes Smick v.10.29.80, step 1.

Smick v.11.31.85

  1. Removed boot command.
  2. Replaced ver parameter with read-only Ver.
  3. Replaced sn parameter with read-only Sn.
  4. Added the new parameter dhtype to handle different types of temperature and humidity sensors DHT: 0 (none) is the default setting, 11 (DHT11), 22 (DHT22), 21 (DHT21). The parameter must be set to use Temp, Hum, Temperr, Humerr events.
  5. Added ultrasonic distance sensor HC-SR04. It has two PINs: trigger (output) and Echo (input). To define the connections use
sonar :: <trigger PIN>
Sonar :: <Echo PIN>

To set the maximum visibility distance use

sonar = <maximum distance> (3, .., 250) expressed in cm



returns the distance of the obstacle. The value 0 indicates no obstacle.

6. Added Wemos motor shield to handle two engines: motor1 and motor2. The shield uses the I2C serial interface via the D1 and D2 PINs and it is not necessary to define the connection. The motor1 and motor2 parameters can take between -100 and +100.

7. Added pressure and temperature sensor BMP180. It uses the I2C serial interface (addr. 0x77) via the D1 and D2 PINs and it is not necessary to define the connection. The press parameter must be set with the pressure, expressed in hPa (default=1013.25), at the current sea level and its area available from any weather forecast site. You can consult, for example http://www.weatheronline.co.uk, search for your city, view the 'SL pressure' map and read the isobara from the map. If, for example, you read 1026, you have to set

press = 1026

The sensor provides the following parameters:

  • Press: pressure, in hPA.
  • Tempb: temperature (in degrees Celsius)
  • Alt: altitude (in meters).

8. Removing sub-commands limitation up to three levels. Subcommands can be leveled as long as the system's memory resources allow it.

Smick v.10.29.80

  1. Forced Firmware update

To force the firmware update through OTA:

    • set otaupd with a positive value (i.e. otaupd=1440)
    • set trace=1
    • request the firmware update with ota command
] otaupd=1440, trace=1, ota
OTA  Check firmware update

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset

2. Added new read-only variables to manage calendar-based events:

    • Cal indicates that the calendar has been updated
    • Year year of date
    • Month month of date
    • Day day of date
    • WDay day of the week of the date (1=Sunday, 2=Monday,...,7=Saturday)
    • Hour hour time
    • Min minutes of the hour
    • Sec secondss of the hour
    • Secs number of seconds elapsed since power up

3. It is possible to display from MQTT the definition of a link, a variable, an event, a command, or a rule. Send from MQTT:

    • mqttio=1 to set interactive MQTT
    • cal=1 to define cal variable
    • cal? to get the definition of cal variable

and you get on MQTT:

    • -- Variables cal = true

Note: max length of a definition is 80 chars

Smick v.9.28.77

  1. Optimized execution of the reset command.
  2. Added new config parameter sos to define SOS event. The SOS event is verified at each start and if it does not run autostart. It is used to prevent a sketch containing the sleep command no longer be interrupted. The default event is A0>600. To make it true you need to connect PIN A0 with the 3.3V PIN. If your sketch uses PIN A0, you must define the sos event on an unused PIN. You can use one of the following events:
    • D0 or D8; in this case you have to connect PIN D0 or PIN D8 with the 3.3V PIN
    • !D1, !D2, !D3, !D4, !D5, !D6, !D7; In this case you have to connect the PIN you selected with the GND PIN.
  3. Added new config parameter otaupd to define the period, in minutes, of the firmware update request. Set otaupd=0 to disable the firmware update.
  4. Added new command ota to require the firmware update.
  5. Modified the config parameter ntpupd to define the period, in minutes, of the calendar update request to the NTP server. Set ntpupd=0 to disable the calendar update.
  6. Added new operator ':' (activate) to active all definitions with a given pattern. An event generates when it becomes true (that is, it was false and now it is true). EventName: is used to generate the event EventName when it is true (i.e. if it is true at the moment when EventName: is run).

Smick v.8.27.75

1. External event is generated even if disabled!

2. Introduction of two new parameters:

    • val containing the result of the last evaluated expression
    • Eval containing true if an expression was evaluated.

If the command is an expression to be evaluated (i.e. Sec + 3), the result is stored in the val register and set Eval=true.

Example of use.

These two registers are used to define such rules:

Eval -> led = val

to set led with a value received from mqttin or serial channel.

] 0

The LED goes off.

] 1

The LED lights up

3. Added new registry 'mqttio' to set up MQTT channel interaction.

If mqttio = 0 (default), when evaluating an expression via mqttin channel

> Sec+2

the result is not returned on mqttout, but only on serial.

If mqttio = 1, when evaluating an expression via mqttin channel

> Sec+2
< 79

the result is returned to mqttout.

4. For commands '?', '\', '+', '-' the pattern may contain as a suffix:

    • '->' to select only the rules
    • '- = [' to select only commands
    • '::' to select only the links
    • '=' to select only variables and events.

5. Modified the result of the 'help' command:

] help
For any information see the web page http://smick.tk

Smick v.7.27.74

  1. Default message format is csv
  2. Replaced the type configuration parameter with device to be replaced manually in the configuration files on the archive.
  3. Added the new command ls synonymous with dir.
  4. Added the new command rm synonymous with del.
  5. Added the new command type synonymous with cat.
  6. Added the new command help.