Skip to content

Blockly

Jean-Michel DECORET edited this page Jul 6, 2016 · 2 revisions

Summary

Manage devices

Events

Actions

Manage date and time

Get a device value

The following block get a device value.

Only the device selection is required.

The block type automatically change to match chose device.

Example for boolean

Example for numeric value

Back to summary

Set a device value

The following block set a device value.

Only the device selection and the value are required.

When chosing a device, the block adapt itself and plug a compatible block.

Example for a boolean

Example for a numeric value

Special case for events

In some case, device are action commandable. In such a case, the block change its title

Back to summary

Wait for events

Block which allow to wait for one or many events to occur.

An event can be one of the following types:

  • on a device data apparition : for example, waiting for the next temperature from my living room
  • on a device data apparition on a condition : for example, waiting for the next temperature greater than 35°C from my living room
  • on a data type apparition : for example, waiting for the next temperature data (from any of all my devices)
  • on a data type apparition on a condition : for example, waiting for the next temperature data greater than 35°C (from any of all my devices)
  • on a specific date and time : for example : do something every tuesday at 10h42 AM
  • every minutes

Block behavior

When one of configured event occurs, then the block apply associated actions, then ends.

In most of cases, its is recommanded to put block into an infinite loop.

Block configuration

This is to use the gear/cog icon to edit block behavior. From the opening graphical interface, events can be chosen.

The block can be modulated to wait several events simultaneously.

Example : block configuration

Result after configuration

It is also possible to obtain information about the event being processed.

This is accomplished using the block "Event information":

It could get:

  • the device name (usefull when a data type is triggered to know which device is event source)
  • the exact value which trigerred the event

Complete example

Back to summary

Event information

Obtain information about the current event.

This helps to know which equipment/data triggered the event; as well as its value.

Example Here is a script that created the text "The battery level of Weather Station Oregon is low (4%)'

Back to summary

Sleep

Make the script gogin to sleep for a specific duration.

Example : wait for 10 seconds

The unit is configurable and allow to wait for some

  • seconds
  • minutes
  • hours
  • days

Back to summary

Log

Log a text dat. The content is stored into the log file associated to the current script.

Back to summary

Notify

Notification somebody

The notification methods are provided by plugins. So dependending on the installation, notification methods can change. This could be an email, a SMS,...

Back to summary

Date and time

Block which define a date and a time.

Back to summary

Date

Block which define only a date.

Back to summary

Hour

Block which define only a time.

Back to summary

Week day

Block which define a week day.

Back to summary

Every day

Block which define any day of the week. (usefull with block "Wait for events")

Back to summary

Today

Block which define the actual day

Back to summary

Now

Block which define the actual time

Back to summary

Sunrise

Block which allow to get the sunrise (for current day only)

Back to summary

Sunset

Block which allow to get the sunset (for current day only)

Back to summary

Duration

Block which allow to define a duration.

Back to summary

Date and time arithmetics

Realizes arithmetic operations within dates and time.

Back to summary

Extract information

Extract a part of a date/time

It is possible to extract:

  • the date without time
  • the complete time (format HH:MM)
  • the year
  • the month
  • the day
  • the hour
  • the minutes
  • the weekday

Back to summary

Clone this wiki locally