Remote control

Post Reply
szakal_a
Posts: 13
Joined: 04 Jun 2016, 11:37

Remote control

Post by szakal_a »

Dear Experts,

I have the complete system at home well configured for my current needs.
There is an ethernet interfce with Tibbo module and some nodes with nuttons, relays, dimmers, LED controllers etc.
I tried to find a forum where I can get some information for the further steps to make the system possible to remote control.
Unfortunately I am not really familiar with SW programming, but I know some basics.
I have read all the documentation but I have to tell you I can not really understand what is Tibbo module stands for exactly.
My guess is to be able to control the system from www, but I am not sure.
I have tried to translate the HomeGenie forum and HomeAssistant, but I am not really sure what should I chose. All the thing what I would like to do is to be able to control my home remotely with my smartphone. From home or from anywhere (this is the point I guess where Tibbo can help me). Is that matters that I have no permanent IP address from my service provider?
I see the example SW here I can see the traffic on CAN. I think I should use that data for programming.
Is there anybody who could help me to create a program step by step for a relay control to be able to understand the things how they are working?
Thanks in advance for your patient explanation. :)
Regards
Attila
Bartek
Posts: 326
Joined: 14 Jul 2011, 19:36
Location: Wrocław
Contact:

Re: Remote control

Post by Bartek »

I'm not sure what are You asking for :). What is Your goal, what are You trying to achieve? You have mentioned about Tibbo modules, CAN and HG/HA systems.
szakal_a
Posts: 13
Joined: 04 Jun 2016, 11:37

Re: Remote control

Post by szakal_a »

Hello Bartek,

Only thing what I would like to build is a mobile phone application where I can control my units through the Internet.
I mean relays, dimmers, LEDs.
Thanks in advance
Attila
Bartek
Posts: 326
Joined: 14 Jul 2011, 19:36
Location: Wrocław
Contact:

Re: Remote control

Post by Bartek »

I wrote such app for Windows phone, but dedicated to use inside WLAN with Hapcan. You can try using OpenHab2 or HomeAssistant, but I don't trust apps that store very private data in the cloud ;) - so I can't tell You anything more about that.
szakal_a
Posts: 13
Joined: 04 Jun 2016, 11:37

Re: Remote control

Post by szakal_a »

Hi Bartek,

Thank you for your reply. Yes, same thing here. It seems not really a big deal to send a string via inside WLAN to control the lights, but from outside internet looks a bit difficult for me.
I saw a Polish conversation about the HomeGenie including several sheet of programming code, but for me as a beginner in coding seems so difficult even in translations. :(
Is there anybody else who has some experience in making a mobile software for this HapCan system?
Thank you
Attila
szakal_a
Posts: 13
Joined: 04 Jun 2016, 11:37

Re: Remote control

Post by szakal_a »

Hello Everyone,

Unfortunately still no answer :(
I have found this topic, but I have to tell, it seems too difficult for me without programming skill.
http://hapcan.com/forum/viewtopic.php?f ... =homegenie
I have my HapCan system at home, works good offline, but I really would like to control my lights through my smartphone after a year.
Please advice me a topic where I can easily understand those basic topics what are needed for basic application.

I really don't know why did I bought the Tibbo module, etc...
Please try to help me to make a "one button" smartphone application to control a relay.
Thanks in advance
Attila
Bartek
Posts: 326
Joined: 14 Jul 2011, 19:36
Location: Wrocław
Contact:

Re: Remote control

Post by Bartek »

I didn't made any Internet connection to my hapcan, so I can't guide You in this area.
Grzegorz
Posts: 12
Joined: 04 Jul 2016, 19:09

Re: Remote control

Post by Grzegorz »

szakal_a wrote:It seems not really a big deal to send a string via inside WLAN to control the lights, but from outside internet looks a bit difficult for me.
Did you try that? Thats a good starting point (I mean, do it on your own, not through some ready app/service). You will learn what for exactly tibbo is for:)
szakal_a wrote:I have read all the documentation but I have to tell you I can not really understand what is Tibbo module stands for exactly.
My guess is to be able to control the system from www, but I am not sure.
Tibbo has nothing to do with internet or www, it just allows you to connect to your ethernet module (and then sends/read bytes of data from CAN directly, exactly like you see it in monitor in hapcan programmer).

Accessing from internet / webpage / phone is building on top of that connection. Webpage served by tibbo is just a convenient configuration tool (ie how many concurrent connections allow, ports, etc)
szakal_a wrote:I really don't know why did I bought the Tibbo module, etc...
Without it, you would not be able to use hapcan programmer and in turn, program your devices to switch lights, etc (unless you also have rs232 module). After configuring that (assuming no further changes will be needed), is not needed unless you want to exchange messages with your CAN ie from phone.
szakal_a wrote:Please try to help me to make a "one button" smartphone application to control a relay.
Did you try to do it from your (W)LAN? Then, acessing from internet, is generic question how do you want to expose/access your inner network? And you have multiple possibilities (3 exposed options below require public ip, preferably static):

- expose ethernet module (just joking, dont do that)
- expose webserver that have webpage that works with ethernet module or some endpoint (ie restful api, which can be used by phone app directly)
- expose some integration software hosted locally (openhab, home assistant or whatever, for example: https://home-assistant.io/docs/configuration/remote/) or take a look at ImperiHome/MyDomoAtHome
- use integration software hosted in cloud, then you need something within your LAN to connect to cloud to ask for commands. For example, from myopenhab.org: "Features of the openHAB Cloud service: Remote Access: It allows remote access to local openHAB instances without having to expose ports to the Internet or to require a complex VPN setup."
- similar to above hosted integration software, just pay for web hosting/virtual server yourself and deploy exposed integration software there (then local app reading from ethernet module would forward that through ssh)
- play with hosted processing chains, for example there was already mentioned node-red somewhere in the forum. You can use hosted node-red (fred) and/or hosted MQTT (cloudmqtt/thingstud.io/many more) in some scenarios:
a) local node-red communicating with hosted MQTT. your phone app would read/write (and interpret) commands to MQTT. Then you can use node-red to visually program logic and translate to hapcan messages.
b) hosted node-red and hosted MQTT where your local app is simply pushing/reading hapcan messages on one channel of MQTT and node-red is processing that into data for phone app on another channel
c) hosted MQTT where instead of node-red you create local app that communicates with hapcan and translates that into messages for phone (or just push and phone interprets that)
- multiple other ways (send/read tweets/mails from some technical account;) as there are a lot of new tools raising (check dioty.co - seems to have mobile app working on top of mqtt so half of the job is done, just feed messages from hapcan to mqtt; other solution could be Supla, which provides mobile app + full source code and works on pi so you can emulate hapcan)

As a summary, you didnt get many answers because most people dont want to expose their locally hosted services and they dont use cloud based versions because they dont want to expose their private data, not to mention that one day your relay can switch without you switching it (regardless of how hard providers are saying they are secure)..
szakal_a
Posts: 13
Joined: 04 Jun 2016, 11:37

Re: Remote control

Post by szakal_a »

Dear Grzegorz,

I would like to say a great Thank You for the detailed and clear answer.
Did you try that? Thats a good starting point (I mean, do it on your own, not through some ready app/service). You will learn what for exactly tibbo is for:)
Not yet. I have downloaded the Tibbo SDK, but it was toomuch for me to understand without the basics.
Tibbo has nothing to do with internet or www, it just allows you to connect to your ethernet module (and then sends/read bytes of data from CAN directly, exactly like you see it in monitor in hapcan programmer).
It was a little bit confusing, because when I bought the Ethernet module it was an option to buy with or without Tibbo mudule the device. Therefore I thought it can work individually on local network and Tibbo gives some magic to the module as a step for IoT. But OK, I understand the security risk, and you are right. Control on local network must be enough for me.

For the rest I think it will take some time to understand what you wrote. I have registered now onto Supla, it seems could be a nice solution for me.
I will let you know my results if I can get some success :)
Thank you again for you answer.
Regards
Attila
Grzegorz
Posts: 12
Joined: 04 Jul 2016, 19:09

Re: Remote control

Post by Grzegorz »

Not yet. I have downloaded the Tibbo SDK, but it was toomuch for me to understand without the basics.
I was thinking about creating app switching relay on LAN - forget about Tibbo SDK for this. By "You will learn what for exactly tibbo is for" I used Tibbo name as replacer for ethernet module in general, as Tibbo is responsible for handling that communication, didnt know then yet there was eth module wo Tibbo
It was a little bit confusing, because when I bought the Ethernet module it was an option to buy with or without Tibbo mudule the device.
Ok, makes more sense now. Skip Tibbo SDK and forget about Tibbo when it comes to creating app that works with hapcan.
Yes, Tibbo was providing more features to the ethernet module, but these were not to provide magic for IoT. We would have to compare Tibbo to previous chip used in old ethernet module to say why Tibbo is better/was chosen. My guess is it allows more than one simultaneous connection and provides web interface so any changes (like port/ip setup) are easy (comparing to ie hardcoded port, so change would require recompiling firmware)
For the rest I think it will take some time to understand what you wrote
Just ask/pm me if smth is unclear, I may have used few mental shortcuts:)
OK, I understand the security risk, and you are right. Control on local network must be enough for me.
I dont want to discourage you, just be aware. There are many options and I listed just a few of them and all have their benefits and disadvantages. You can install Supla/OpenHab/whatever locally or use clouded service. But once some bug within it is found, for clouded service you just disconnect it and your local network should be safe (well, you can no longer use your app from outside). Bug on exposed locally hosted service may mean your network was compromised.

Answering again shortly your question about phone app to control relay - no one but you can decide which approach is right one in your case. Simplest approach may be also least safe. And once you decide it, you will know more specific questions or communities where to ask. Communicating with hapcan is pretty easy (again: thats why I advised you to create simple app to switch relay on LAN first) so if you want to go with Supla, you probably end up on their forum asking about best place to inject your code (and you could ask for such code to be injected here but from your
It seems not really a big deal to send a string via inside WLAN to control the lights
I understood that you can do that on your own)
I have registered now onto Supla, it seems could be a nice solution for me.
I will let you know my results if I can get some success :)
Actually, I had one weekend meeting with Supla around half year ago. My PoC was successful and i was able to toggle relay from phone locally (rpi hosted instance and WLAN connected phone). Ofc it was dirty quick hack and 'nice' solution requires much more time:) but if you are serious about your attempts, will have Supla up and running, feel free to pm me for smth to start with
Post Reply