Open Matttribal opened 4 years ago
Try some homeautomation software like Homeseer, or some opensource. You can do then http requests to turn light on/off
Walter
Op 19 jun. 2020 om 18:59 heeft Matttribal notifications@github.com het volgende geschreven:
Hi I'm trying to figure out if there is a way to get a flashed (or un-flashed) Sonoff RF Bridge and HA-bridge to work together? Has anybody achieved this? Ideally the operation would be... RF door sensor triggers the Sonoff RF bridge, which would then (via wifi) send a command to HA-Bridge which would turn a light on. Thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks Walter, but im hoping not to run another software as i already run my home using ha-bridge so am hoping there is a way to integrate it into there. I think a flashed Sonoff RF Bridge can send out MQTT payload or a simple HTTP request (HTTP would be the preferred and easiest option). So maybe there is a way to directly trigger the lights on ha-bridge this way? Anybody know how?
There are several protocols to do that in Ha-bridge. I’m using http Json for connecting with my Homeseer. Ha-bridge is flexible with that. You you can check which protocol sonoff is using in the docs.
Regards, Walter
Op 19 jun. 2020 om 19:36 heeft Matttribal notifications@github.com het volgende geschreven:
Thanks Walter, but im hoping not to run another software as i already run my home using ha-bridge so am hoping there is a way to integrate it into there. I think a flashed Sonoff RF Bridge can send out MQTT payload. So maybe there is a way to directly trigger the lights on ha-bridge this way?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I need a way to trigger HA-bridge. What would be the http command for a device to trigger something in HA-bridge?? I assume you trigger by ID? Or does it have to be done with Json? If so how are you doing this? Thanks
For Homeseer im using this: Kitchenlight ON: http://192.168.1.51:8083/JSON?request=controldevicebyvalue&ref=579&value=255
Kitchenlight OFF: http://192.168.1.51:8083/JSON?request=controldevicebyvalue&ref=579&value=0
Thanks Walter, but that looks like commands that are sent FROM ha-bridge TO other devices. That's not what I'm looking for. I need a way to trigger HA-bridge.
@bwssytems Does HA-bridge accept any simple commands that I can put into another device that will trigger certain IDs in HA-bridge? Or to be used in a GUI button press.
I'm hoping for a simple HTTP request, something like http://192.168.0.10:80/api/lights/101/state/true
If so, are there multiple ways? What is the easiest way?
Thank you
It requires a PUT, works just like Phillips Hue, see here: https://github.com/bwssytems/ha-bridge#set-light-state
Thanks, audiofreak9. I'm keen to know if this is the only option?
Also, from the link you provided... The command asks for a "username". Is this the username I log into HA-bridge on (admin), or is it something else? I would like to test this PUT command from within HA-bridge. Is there a way to run a PUT command from HA-bridge? Thanks for your help!
This is currently the only way to trigger an HA-Bridge device, as it emulated the Phillips Hue API.
Username can be anything you want, HA-Bridge configures all usernames automatically. I use a single letter for simplicity.
Yes you can perform a PUT with a configured device in HA-Bridge to trigger another configured device, change the "Http Verb" to PUT.
Thanks! I'm not sure I'm getting the full command correct as its not working. I tried multiple things in the HTTP BODY but no job. See attached, any pointers? Thanks
@Matttribal Putting that into another ha-bridge device. I believe you are asking to put that request into the sonoff system, correct?
@bwssytems yes. But I’m guessing if an HTTP command does exist to trigger a HA-bridge device ID, that I can use it on the SONOFF or from within HA-Bridge (as per the the pic in my last post)? Am I along the right lines with that command pictured in my last post? Thanks.
You are asking along the correct lines. If you have the ha-bridge security on, you'll need to get a username from the system first. The team has instructions on how to do that as it explains the basics of the hue API it emulates.
Great, thanks! Any idea how I get the team to provide that info? Thanks
As I mentioned, it is in the readme at https://github.com/bwssytems/ha-bridge#create-user
@audiofreak9 please could you let me know where I'm going wrong with this PUT command?
I have created a user as per @bwssytems last comments but it still doesn't work. I have tried multiple things but I always get log issues
INFO Tracestate: Decode Json for url items: [{"item":"http://192.168.0.25/api/dea7635a59aa44e29be5b40afd9ecd90/lights/102/state/","type":"httpDevice","httpVerb":"PUT","httpBody":"\"on\": true"}]
WARN HTTP response code was not an expected successful response of between 200 - 299, the code was: HTTP/1.1 404 Not Found with the content of <<<
on another note do you know if "Bridge Reinitialize" can be triggered from a PUT command?
Many thanks!!
Looking quickly you need to set the Content Type, probably to multipart/form-data.
Thanks, but unfortunately not... unless I'm missing some sort of syntax. I'm beginning to think the PUT feature doesn't work
Hi I'm trying to figure out if there is a way to get a flashed (or un-flashed) Sonoff RF Bridge and HA-bridge to work together? Has anybody achieved this? Ideally the operation would be... RF door sensor triggers the Sonoff RF bridge, which would then (via wifi) send a command to HA-Bridge which would turn a light on. Thanks