Comments (2)
There are two kind of devices now: sensors and actuators
Sensors places to "input"
Actuators placed to "items"
Item parameters:
#define I_TYPE 0 //Type of item
#define I_ARG 1 //Chanel-type depended argument or array of arguments (pin, address etc)
#define I_VAL 2 //Latest preset (int or array of presets)
#define I_CMD 3 //Latest CMD received
#define I_EXT 4 //Chanell-depended extension - array
So this format is extendable for adding new types of actuator
input template:
"pin": { "T":"N", "emit":"MQTT emit topic", item:"out_item", "scmd": "ON,OFF,TOGGLE,INCREASE,DECREASE or value", "rcmd": "ON,OFF,TOGGLE,INCREASE,DECREASE or value", "rcmd":"repeat_command" }
T is bitmask from values:
#define IN_ACTIVE_HIGH 2 // High level = PUSHED/ CLOSED/ ON othervise :Low Level
#define IN_ANALOG 64 // Analog input (for further use)
#define IN_RE 32 // Rotary Encoder (for further use)
#define IN_PUSH_ON 0 // PUSH - ON, Release - OFF (overrided by pcmd/rcmd) - DEFAULT
#define IN_PUSH_TOGGLE 1 // Every physicall push toggle logical switch on/off (for further use)
Here some extension needed to threat "generic sensors" like DHT, BMP, NRF24, and even timers
from lighthub.
Lazyhome.ru LightHub controller 12a4cd9 _2018-06-09
from lighthub.
Related Issues (17)
- Need to disarm WDT on Mega before any DNS related operations and check DNS timeout to be less 15s for DUE HOT 1
- WDT reset didn’t turning off outputs - TODO - add output initialization after loading Config from NVRAM HOT 1
- MQTT credentials and config URI - to be stored in NVRAM and configured from CLI HOT 1
- DUE - large config saving to FLASH causes WDT triggering HOT 1
- NO_LINK is not defined compilation problem HOT 1
- Strange behavior on restart if lan is not initialized HOT 5
- develop - compilation error HOT 2
- Syslog not working in Mega+WIZ5100 HOT 2
- library DmxDue USART0_Handler redefinition HOT 4
- NVRAM storage (config, ip, etc) is not working for ESP32 HOT 1
- No initial set of target temp for thermostat HOT 1
- ESP32 - wrong size /config.bin while GET on API
- ESP8266 config.json 100 bytes truncation while save
- feature request : ads1115, mcp4725, mcp23017 as output .... feature request HOT 1
- Support of 1w ds18b20 direct connection, DHT22, BMP280 support, analog Inputs HOT 3
- Global code refactoring, code reformat HOT 3
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 lighthub.