Prospective new user coming from Domoticz

Can you send a normal http:// request like 192.168.1.11:8090/json.htm?type=command&param=getlightswitches that you can then turn switches on/off/dim etc

Without the need to log on etc. I have an app on my phone that currently just sends these http requests and need to know if this would work out of the box on HA.

Yes, can be done mutiple ways, either REST switch or command line with appropriate shell command on HA host (like curl).

You want to call http webhook? Remember ,i don’t think GET is supported, so ypir app needs to use PUT

Still trying to understand this from the links as they talk about turning it on but not how to use it.
So from a single line http:// I can turn a switch on?
I can’t use scripts or more code etc it literally needs to be a one liner http:// request

I found this and it talks about using node red etc, is this still the case?
Home Assistant API - Turn On/Off Light via simple (HTTP) command from other device - Home Assistant Community (home-assistant.io)

For example I can use http://192.168.1.11:8090/json.htm?type=command&param=switchlight&idx=99&switchcmd=On and it’ll switch a light on with idx 99, idx 99 is the internal reference to each device in domoticz, I think this is entity in HA?

1 Like

As I said, both RESTful switch or Command Line switch can be used to call URLs. To get the command’s result (the new switch state), some templating may be required.

But - who’s providing that URL, is it ESPHome, ESPEasy or something similar? I could imagine, that there is already an integration for that type of “device”.

Why do you need your app to do these kind of actions?
Is it part of an automation in the app?
I’m quite sure whatever the reason is there will be a good solution without using the app.

The phone app is roomie remote and it controls everything via the phone(s) including ,TV, Amp, Kodi, Tivo all outside of Domoticz and does this really well, I don’t want to move away from this app. What it does do for the lighting is a http:// one liner that turns on x light or y dimmer or what’s called a ‘Scene’ in Domoticz so several lights at once. i’ve set this up as basic buttons in the app that run the http:// command and it works really well.

I don’t want to move away from Domoticz to HA unless this simple ability exists really.

If roomie can control a Roku over network, then you could use the emulated Roku integration for this purpose.
I’ve never used roomie, but I use a similar solution with my harmony remote to control lighting scenes.

It’s a good app but quite locked down so if I added a “Roku” device which it supports I suspect it’ll give a standard stop/start/play etc interface not customisable.

You made me think but I dunno perhaps run the homekit bridge and add homekit to the app perhaps, that might be a bit more customisable as in lights etc

If you only take a half step then you will never get further than that.

Instead of trying to hold on to what you got, come in with an open mind and try HA as it is.
You can have it running next to your existing stuff until you feel comfortable to switch, but use HA as it is and don’t try and keep what you have, I’m sure no of what you do can be done with HA natively and using the HA app.

Don’t get me wrong there’s so much more that I’ve looked at and HA is capable of taking on that my system runs now and would port over with some work but I don’t want to re-engineer the phone app because I know it can’t be done as I’ve tried in the past.

I might look at the solution to emulate something in HA that Roomie remote can talk to natively. Homekit might be the answer, I just need the lighting part really.

That is not what I meant.
I meant use Home Assistant app.
If it’s only lights you need then you can either add them as widgets on the phone home screen or automate them so that they turn on and off when you are home or not.

Yeah but when you’re trying to keep the other half and kids happy with having to break out of the app to change the lights :slight_smile:

I still think what M0wlheld said with the RESTAPI might be possible, I just need get my head around it, there’s people in other threads that look to be using 1 liner http requests to turn lights on etc Usage of REST API with access tokens? - Configuration - Home Assistant Community (home-assistant.io)

I don’t really need feed back I can do that elsewhere.

BTW I already have loads of automations for when I’m home, moving about etc but these are just the easy one off are I need that light on push a button in the app etc.

i do a lot of HTTP calls to HA from aother apps, it works, its a webhook
its the same process as with IFTTT, it calls a HA HTTP url, with offcourse authentication (bearer)

Can you give me an example http request please?

This it with nabucasa for example

https://www.nabucasa.com/config/webhooks/#triggering-automation-with-a-webhook

Or without

Really need an extra box to play with this alongside each other :slight_smile:

Having now migrated to HASS, I’ve where needed used the webhook facility as part of an automation.
An example being a lookup of my phone mac address across two routers in a mesh to discover if I’m home or not, this sends a curl command back.