Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64pe and Home Automation
#1
Has anyone integrated QB64 with home automation controllers such as Hubitat, Home Assistant, etc?

I am wanting to use QB64 as the heart of home automation using a touch panel because I can get exactly what I want instead of using what they have.  I can also integrate other external programs that they currently are not allowing access to.
Reply
#2
I've never used those services but I imagine one could use their APIs quite easily. It's not too hard to set up in Windows but might be difficult in Linux, depending on API type.
The noticing will continue
Reply
#3
Did a bit of research and yes, you can control the Hubitat with QB64.  In case if anyone else comes across this need, here are the basics.

On your Hubitat you will need to load/enable the built-in app, Maker API.
Generate a new token (shown in examples at bottom of page).
Add the devices that you want to be controlled.

Now simply talk to the device via http.  Below is an example of the code to turn on a Zen74 Zwave module:

Code: (Select All)

Common Shared success As _Integer64
'turn device on (case sensitive)
url$ = "HTTP:http://192.168.1.176/apps/api/66/devices/8/on?access_token=65f3afe6-2281-4346-9cdb-437a55136103"

'turn device off (case sensitive)
'url$ = "HTTP:http://192.168.1.176/apps/api/66/devices/8/off?access_token=65f3afe6-2281-4346-9cdb-437a55136103"


success = _OpenClient(url$)

' success or not?
If success = 0 Then
    Print "Failed to connect to the website."
Else
    Print "Connected: "; _ConnectionAddress$(success)
End If

Close #success



For me this is huge. This gives me the ability to do so much more since I can have QB64 running other tasks or even tasks that the Hubitat was not designed for. Hoping to have a touchscreen running all sorts of things soon !!!
Reply
#4
I am using HA API's from QB64pe to export data
45y and 2M lines of MBASIC>BASICA>QBASIC>QBX>QB64 experience
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QB64PE Excel-type spreadsheet supporting formulas and QB64PE macros? madscijr 33 1,388 01-30-2026, 12:28 AM
Last Post: madscijr
  Welcome home Michael! SMcNeill 8 1,406 02-15-2024, 12:17 AM
Last Post: Pete

Forum Jump:


Users browsing this thread: 1 Guest(s)