Jump to content
C4 Forums | Control4

niallel

c4Forums Member
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

niallel's Achievements

  1. I think it happens using an app notification service. I can't remember which one now, but I did a packet capture to my phone and there was data from an IP address that I wasn't able to identify (no reverse dns for it, and but I didn't dig further as to looking who owned the address). Secondly, it definitely comes from the internet, not from the controller. I verified this by blocking inbound internet to the phone just before I switched a light on - there is no status update in the app.
  2. Hmmm, I just tried it without the driver and it updated the status on home assistant. After looking I was referring to the wrong homeassistant driver, the right one is hass-control4. This does use pycontrol4, the reason it updates the status on home assistant is that home assistance polls the devices every CONF_SCAN_INTERVAL. So C4 doesn't send the update via an API, you need to poll to find out when changes happen. So it's going to put an additional load on the director. If there is another way of it sending the info (apart from listening to the SOAP on port 5020) it would be good to know.
  3. I think it's just reverse engineering. It would be nice if they released an officially supported API.
  4. I think if you take a look you will see that even though the same person wrote pycontrol4 and homeassistant-control4 they are different. https://github.com/lawtancool/homeassistant-control4 requires you to use a driver loaded on control4 for the communication.
  5. PyControl4 is just a lightweight wrapper for the Web API, you can use any language to make the http requests. Basically you authenticate using your my.control4.com account, then get a token, you then use this to get a token for the director. Then you can send any command you want to the director. Easiest way to work out what happens is to run a proxy like burp or zap, setup your phone to proxy requests through it, then just run the app and see all the requests on the proxy. As I said the downside is that you don't see the status changes coming back, with a sniffer you can see they come through the os notification mechanism which is going to be really hard (maybe impossible) to emulate.There is a websocket interface on the controller (using socket.io format) which does send these, but you need to authenticate to it with the root password, which is easy on 3.1.0, but with the changes for this in later versions its going to be quite a bit of work to get around.
  6. It's basically the API that the mobile apps use, you can trigger anything the mobile apps can do. However there is no real time feedback of changes to the system. For example if someone turns a light on you won't be told via the API. It seems that the feedback the apps get is by a different system. I was a day into writing a desktop app to control my system until I hit the problem of either having to poll every couple of seconds while the app was in the foreground or not getting the status updated. If anyone knows how to receive the events feed I'd love to know.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.