[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 

Blynk RSS feed
Forum Index » tcMenu Remote API
Author Message
dsap4004


Joined: Apr 26, 2019
Messages: 21
Offline
Just wondering if anyone has synced this tool up with blynk app before. I would like to have the boolean menu item know when outputs are on or off. Right now I have touch controls separate from the menu that send the state back to the app if they change but I'm not sure where I'm supposed to put my tie ins from the blynk app to tell the menu that the app has turned on or off an output. Can tcmenu just monitor a local variable. I really don't want the blynk app to control the tcmenu I like it having direct control of the outputs. Thanks in advance for any suggestions.
davetcc


Joined: Jan 19, 2019
Messages: 218
Offline
Hi there, thanks for posting the message.

We'll probably not write a custom driver for blynk just at the moment, as we are presently working on our own desktop and mobile apps, home automation integration, and integration with third-party IoT internet-based control systems.

The first iteration of this is already available (although currently very basic) as the tcMenu Controller desktop https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/tcmenu-remote-connection-arduino-desktop/ that can be installed alongside the designer application. You just either include either serial or network-based control into your design using the code generator. See the colorTftEthernet32 and remoteControlSerial examples. I've tested serial and network capabilities extensively using both 8 bit and 32 bit boards, further, it can be used with WIZNET (Ethenet2) and ENC28J60 (UipEthernet). I'm actually in the process of getting it working on ESP8266 boards now.

Further, there is a fully open source Java API that you can use yourself to control a tcMenu board. https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/tcmenu-java-api-to-arduino-remote-control/

However, to use this library with tcMenu should be simple enough, you'd just wire whatever notification you get on an item changing into the menu item. For example, lets say we got a notification from this library to method onNetworkChange() and we had a menu called menuMyBool and a global variable that has been updated called globalBoolValue:

// example of call back method
void onNetworkChange() {
    // here we update the menu item, this is all that is needed.
    menuMyBool.setBoolean(globalBoolValue);
}
dsap4004


Joined: Apr 26, 2019
Messages: 21
Offline
Wow I'm looking forward to see what you guys come out with. This is a first iteration of my project and new tools are always a plus. I didn't realize you had such an easy function I could use to monitor a variable like that. I know exactly where I'll use that in my program . Thanks a lot.
dsap4004


Joined: Apr 26, 2019
Messages: 21
Offline
Is there a way to use the setBoolean modifier without firing off the call back function? Would be a nice option to have in some custom cases. Let's say you want to have another system directly control an I/O point and you want to set your menu to reflect the change. In that case it would be nice to be able to update the menu item without the call back going off.
davetcc


Joined: Jan 19, 2019
Messages: 218
Offline
It should be possible. Probably a silent version of the setters that don’t perform the callback. I can see that being generally quite useful.

Please raise an issue against TcMenuLib for that. It’s a very small change and can probably go in the next version.

https://github.com/davetcc/tcMenuLib/issues
 
Forum Index » tcMenu Remote API
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer