Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64pe and Home Automation
#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


Messages In This Thread
QB64pe and Home Automation - by dano - 02-11-2026, 03:02 PM
RE: QB64pe and Home Automation - by dano - 02-12-2026, 02:27 PM
RE: QB64pe and Home Automation - by mdijkens - 02-12-2026, 02:27 PM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)