We have an extensive library of various bOS configuration examples. Select your heating pump, AC, TV or almost any other device and import it to your smart building configuration. We also encourage all system integrators and DIYs to add their own examples to ComfortClick library.
Integration of Shelly devices using HTTP and Basic drivers, data reading and settings adjustment.
Author: Artem Kuteynikov
In this example three different Shelly devices are integrated into bOS. Shelly 1L Relay, Shelly Door/Window sensor and Humidity and temperature sensor. Each of the devices should be switched to Wi-Fi Client mode according to Shelly API documentation.
A “Listener” (Basic, TCP server) is chosen to register HTTP requests from devices. For definition of device which request is being parsing in current moment a “DeviceID” object is established. It receives ID of device communicating.
“Action_url_text” saves Action messages from devices which had been configured. Values for each action and each device are configured to be unique, so “Data_source_definition” program won`t affect this object.
All other variables get corresponding values (state of window sensor, temperatures, humidity, brightness etc)
“Data_source_definition” program assigns values from Listener variables to target variables depending on the current device ID. For proper program functioning respective device IDs should be set manually in program settings field.
HTTP device is used to configure and get status of each device. A Status command gets actual information regarding device condition (battery charge, device temperature, WiFi signal, power consumption…) As battery powered devices sleep most of the time, command would function only in Wake Up periods. This command can be omitted, if no data from “/status” endpoint is supposed to be utilized, it won`t affect target data reading (temperature, humidity, brightness, state of door sensor).
A Control command in “Shelly1L_relay” is used to control status of relay. “Status control” program adjusts value of “Relay_control” variable depending on output state (relay can be controlled via devices physical input, program receives values from “Action_url_text” and synchronizes variable`s values if necessary)
Configuration folder contains commands to set Action URLs, settings (in “/settings”, “/settings/actions” endpoints). Any setting can be adjusted and sent to device, there`s also command for reading settings. Battery powered sensors should be activated manually before configuration. Commands could be activated from bOS Configurator. For convenience most of commands and variables named in a manner presented in Shelly API documentation
April 08, 2023
wich parameter do i have to change to fit correctly to my shelly devices ?
thanks a lot,
February 23, 2023
Does this integration work also for shelly gen 2?
Thank you very much
Please login to post a comment.