|
ESP_IOT v2.5
IOT ESP Coding
|
#include "../../Defines.h"#include <stdio.h>

Go to the source code of this file.
Functions | |
| boolean | ATOM_processSemanticMarker (char *semanticMarker, char *lastSemanticMarker) |
| boolean ATOM_processSemanticMarker | ( | char * | semanticMarker, |
| char * | lastSemanticMarker | ||
| ) |
process the semantic marker (maybe from a click or a scan) If a SMART button, it will tack on username, password and optionally scannedDevice 12.15.23 Added passing lastSemanticMarker .. this is for the /scannedDevice to recursively call itself (so parms are substituded)
process the semantic marker (maybe from a click or a scan) If a SMART button, it will tack on username, password and optionally scannedDevice 12.15.23 return TRUE if this is a new SemanticMarker to save in _lastSemanticMarker return FALSE if this is a transient SM so don't override _lastSemanticMarker (eg. /scannedDevice, WIFI, credentials) Added passing lastSemanticMarker .. this is for the /scannedDevice to recursively call itself (so parms are substituded)
NOTE: The _lastSemanticMarker will be replaced with this semanticMarker .. unless
scannedDevice is a special that is only for the scaner. Syntax: https://SemanticMarker.org/bot/scannedDevice/{deviceName}{?queryParms} if {deviceName} == "_none" then it empties it.. NOTE: 12.16.23 The scannedDevice is a temporal feature. It will not replace the last scanned SemanticMarker, instead it will be used to set the ScannedDevice (or none) That way the longPress can still be used to re-invoke the lastSemanticMarker (such as the feed) without having to re-scan it. BUT: we will send this on the MQTT network just so others can hear it and decide what to do Such as the remote Abilities monitor sees if the user scanned the device first etc.. FUTURE: decide on a remote ScannedDevice feature.. maybe called that: remoteScannedDevice which will be an MQTT message (so a remote handler can set the device..)
per issue #286, syntax has been extended to include arguments /scannedDevice/DeviceName?kind=AtomSocket&status=socket&valKind=onoff HERE we just need to search for the "?" and that will be the device name.
use the _copyLastSemanticMarker as a placeholder..
TODO: send MQTT message is it {"scannedDevice",device} TODO: implement the remoteScannedDevice MQTT message (or is {set:remoteScannedDevice, val:device} or {device:D, set:remoteScannedDevice, val:device} – only to specified device (in the multicast world)
this is 2 in one. So call ourself but using the lastSemanticMarker
1.7.24 (snow in mountains and down low .. ski monday)
per issue #286, syntax has been extended to include arguments /scannedGroup/GroupName?kind=AtomSocket&status=socket&valKind=onoff HERE we just need to search for the "?" and that will be the Group name.
see if any arguments (which we aren't using yet ..)
save the group name (withoiut topic path) for use in the smrun below
TODO.. parse this, create a JSON { "ssid" then call processJSONMessageMQTT ..
NOTE: the idea of sending this around is kinda catch 22. How can I tell you the SSID if you aren't connected to the internet.. 1.1.24 NOTE: these can be in any order.. so start with semanticMarker each time..
start over 1.1.24
!put together into JSON. case sensitive..
8.16.25 MQTT
Set the credentials for the WIFI using this format
./bot/credentials?ssid=X&ssidpass=Y....
currently 9.28.23 no reason for feeder to decode base64 messages. That could change if a stored procedure.. 12.30.23 .. changing to query parameters
parse .. creating JSON and send it onto the parseJSON
1.1.24 support setJSON as well.. ./bot/setJSON?ssid=X&ssidpass=Y.... currently 9.28.23 no reason for feeder to decode base64 messages. That could change if a stored procedure.. 12.30.23 .. changing to query parameters
parse .. creating JSON and send it onto the parseJSON
see if connected to a BLE device..
8.16.25 BLE CLIENT send a BLE feed command as we are connected
perform ACK too 8.16.25 MQTT
send WIFI feed to only the device decoded..
this should work ..
8.16.25 MQTT
feed always (done after the code below..)
feed always (done after the code below..)
feed always (done after the code below..)
feed always (done after the code below..)
1.7.24 if non null then valid group topic eg. /usersP/group/GROUP_NAME
TODO: syntax for an /optimize?uuid=x&flow=y&cmd=feed The MQTT is much faster.. Lets only use MQTT for the 'device' specified (to see this difference)
this will be a cache of commands to try.. cmd:feed, cmddevice,feed,device
dev: <dev>, cmd: feed cmd: feed
1.7.24 For now only SMART buttons will use the GROUP feature (and only if local) not the smrun
try a call.. call 'smrun' with URL query parameters, like username/password/device /bot/smrun?uuid=x&flownum=y&username=X&password=y&device=z HERE .. we add the Username, Password and Device name.. parameters
this is the cached (in code) SMART buton for feed. @See https://SemanticMarker.org/bot/smart?uuid=QHmwUurxC3&flow=1674517131429
this will be a cache of commands to try.. cmd:feed, cmddevice,feed,device
dev: <dev>, cmd: feed cmd: feed
this is the cached (in code) SMART buton for toggle socket power. @See https://SemanticMarker.org/bot/smart?uuid=QHmwUurxC3&flow=1703806697279
SMART_ToggleSocket_Device
this is the togglesocket command (versus turn on/off) https://iDogWatch.com/bot/cmddevice/USERNAME/PASSWORD/DEVICE_1/togglesocket this will be a cache of commands to try.. cmd:feed, cmddevice,feed,device
dev: <dev>, cmd: feed cmd: feed
only here if not optimized
NOTE: this assumes smartIndex has parameters like: " /smart?uuid=x&flownum=y" WITHOUT the smart/ it's smart?uuid...
tack on the raw group name, not the groupTopic which is full path: usersP/group/NAME
REST is not working, so now sending to TOMCAT on KnowledgeShark.me:8080 (as HTTP not HTTPS)
right now it shows smart of smflowinfo ..
8.16.25 MQTT
3.25.24 try the http to tomcat, then it sends https to node-red
already an /smrun so call is..
3.25.24 try the http to tomcat, then it sends https to node-red
Definition at line 35 of file ATOM_SM.cpp.

