This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Ohpainy's profile picture

Computercraft with whatsapp?

Started by Ohpainy, 17 April 2016 - 11:11 PM
Ohpainy #1
Posted 18 April 2016 - 01:11 AM
Hi all im a newbie @computercraft and and lua so i really dont know the limits what it can do and what not,

i saw someone using comutercraft with an Arduino to controll a lamp using a http_get request(no idea what that means)(https://www.youtube.com/watch?v=rTtvv0g1Ibs link to the video)

my question is , is it possible to make a computer connect to whatsapp mobile or using whatsapp-web so i could print messages on a monitor and answer them too

thanks for your time
TYKUHN2 #2
Posted 18 April 2016 - 01:35 AM
Anything is possible as long as it is:

A) HTTP Accessible or
B) You know how to make a webserver

(I don't know what Whatsapp is and will research it now!)
Edited on 17 April 2016 - 11:36 PM
Dragon53535 #3
Posted 18 April 2016 - 01:39 AM
The thing with HTTP is that it requires the computer in CC to actively search for a change in data. Only the CC computer can send/receive, the server cannot start a connection with the computer. Just putting out there so you know, HTTP would be someone else's forte.
Edited on 17 April 2016 - 11:39 PM
KingofGamesYami #4
Posted 18 April 2016 - 01:39 AM
No, because they don't support that. To interact with whatsapp, it appears you need the API installed. Obviously, the API is not written in Lua and probably uses things CC does not have access to (sockets). I'm by no means an expert in whatsapp or http, though.
TYKUHN2 #5
Posted 18 April 2016 - 02:03 AM
A PHP or similar server middle man can take in HTTP and output sockets making a protocol exchange sort of system. A timed re-connection can also detect a change in data. IIRC one ardunio use of CC used a PHP middle man for protocol exchange.
Edited on 18 April 2016 - 12:04 AM
Creator #6
Posted 18 April 2016 - 12:48 PM
He could post to a server, which exchages info with the Whatsapp servers. Kind of what TYKUHN2 said.
H4X0RZ #7
Posted 18 April 2016 - 03:23 PM
There once was a working implementation of the WA protocol (in PHP) but facebook will ban everyone using it now. I once used it as chat bot.
Edited on 18 April 2016 - 03:44 PM
Creator #8
Posted 18 April 2016 - 04:51 PM
Ban from where?
H4X0RZ #9
Posted 18 April 2016 - 05:45 PM
Ban from where?

WhatsApp. The number you used will loose the ability to be used for WA.
Ohpainy #10
Posted 20 April 2016 - 06:21 PM
Thanks a lot for your answers I understood half of it but I found a very easy solution there is a mod called webdisplays

Where u can simply browse and I tried WhatsApp Web which worked perfectly

Still thanks a lot for your help