Comments (1)
Maybe the example is misleading a bit. In a Shelly the transport is not related to the notification mechanism. One may have MQTT and oubound WebSocket channels open and publish notifications over them. Or receive RPC requests. One can communicate directly with a script by calling the Script.Eval
method if he knows which script id the script has.
To directly communicate with the device you can add an http endpoint handler in a script or subscribe for an MQTT topic:
- https://shelly-api-docs.shelly.cloud/gen2/Scripts/ShellyScriptLanguageFeatures#httpserverregisterendpoint
- https://shelly-api-docs.shelly.cloud/gen2/Scripts/ShellyScriptLanguageFeatures#mqttsubscribe
from shelly-script-examples.
Related Issues (20)
- ble-ruuvi.js - Give error if bluetooth is off HOT 1
- sendMessage doesn't retry
- [Shelly plus 2pm] Script to prevent 2 output in the same time ( Vent control ) HOT 1
- Pass user data for Script.Start HOT 3
- Cover.stop is not working when invoked from a BT event
- Need example for BLU motion triggering switch without cloud HOT 1
- Wifi provisioning with mini device HOT 1
- WIFI provisioning script - error encountered HOT 4
- ble-shelly-btn-gateway-for-other-devices.js not working
- please check and fix. HOT 1
- Domoticz out mqtt from switch
- Solar gains and Heat pump yearly consumption
- Sorting devices in power meter
- n-way-dimmer.js password protected devices? HOT 1
- ble-pasv-mqtt-gw.js : Add interval send message mqtt
- ble-pasv-mqtt-gw.js not correctly reporting negative temperatures for xiaomi devices HOT 2
- ble-pasv-mqtt-gw.js - Add other measures of XIAOMI MIFLORA HOT 3
- ble-events-handler.js - change mac to adress? HOT 1
- ble-shelly-dw.js does not do anything HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shelly-script-examples.