Which link or ip do I have to call for the actions to happen?
for Heat, print, finish and off
Try this
ok, iām just too stupid for that
Iām new to openhab.
Basically within this webhook like binding you describe what should happen (whith some channels and items in openhab) when someone (other system ) make a http request to a specific url in openhab.
Assuming you have an openhab under address http://myopenhab or http://192.168.1.146 (ip of your openhab), and you have created a thing withing webhook binding exactly as you have shown - then your url to call is:
http://myopenhab/httplistener/PrusaPrinterā¦
or http://192.168.1.146/httplistener/PrusaPrinterā¦
if you enter this addess in webbrowser - this binding will be notified and process your request. How to process it and update your item - is described in those little snippets of code you pasted (like: finish channel will be upated using snipper āreturn req.parameters.finish[0]ā which means that should be updated with value of url paremeter āfinishā)
Example
following
curl http://myopenhab/httplistener/PrusaPrinter?heat=2&print=1&finish=3&off=yup
should update channel heat with value ā2ā, channel print with value ā1ā, channel finish with value 3 and off with value āyupā.
I hope this clarifies a little more for you
OK. Yes, that makes sense^^
Now I just need to know how to set it up in openhab.
the printer has these 4 functions what it should do
#1 Heat ā LED Red
#2 Print ā LED White
#3 Finish ā LED Green
#4 Off ā Plug Off
that means these 4 functions have to be called individually and linked to the objects?
http://192.168.192.7:8080/PrusaPrinter?Heat=
http://192.168.192.7:8080/PrusaPrinter?Print=
Http://192.168.192.7:8080/PrusaPrinter?Finish=
Http://192.168.192.7:8080/PrusaPrinter?Off=
As first step I would not do any rules, but rather add items to created channels and check if those items change values if you make requests to urlsā¦ If it work - configure webhoooks on your printer to use them when the printer changes its state. And then - check again if it is registered on your items in openhab.
yay its work =)
@Piotr_Bojko Is this still active ? Has the http listener binding made it to the official Openhab release 3.4 ?
No, I didnāt make it. I had some health issues I didnāt consider to influence my spare time
I will try to rethink how to deliver it to openhab base code and get back here.
Piotr, sorry to hear that. Hope youāre well and healthy again. There are priorities in life and an Openhab binding is indeed not one of them
Iāve rebased the code against openhab 4.0.0-SNAPSHOT.
I must do at least a simple docs to be part of the Add-ons | openHAB and read about code requirements for pull requests to openhab basecode.
You can also add it to the third-party marketplace by posting in the forum. That would enable you to do more testing before adding it to an official release.
Hi Piotr
I am searching a way to send information via https to OpenHAB.
Is this also supported in your ābindingā?
Thank you.
BR Sebastian
This binding is embedded in openhab and uses its tomcat/jetty to deploy its servlet. If your openhab instance is accessible via https then the binding also is accessible.
Binding works for me on OH4
Hi folks, for sure I will release the binding to the 3rd party marketplace. Previously I thought that I can manage to push it to the official bindings repository, but this is possible beyond my commitment.
As for now I struggle with my financial condition and other family things so this binding must wait a month or two for better times.
Confirming that this binding works under OHv4 means lots for me - thank you
Hi,
since Iāve updated to OH4 my door bell doesnāt bell.
I do not get any warnings or errors, so something seems to be wrong.
This is my thing:
Thing httplistener:HttpListener:klingel "Klingel Webhook" [
jsonConfig="{ channels : [{
'key': 'action',
'kind': 'STATE',
'state': 'req.parameters.action[0]'
}] }"
]
and this is my item:
Switch Klingel {channel="httplistener:HttpListener:klingel:action" }
Iāve also added a rule which should play the doorbell.mp3. The rule is working properly when I trigger it manually.
When I am now using Postman and send a GET Request to:
http://[myOpenhab]/httplistener/klingel?action=klingel
ā¦nothing happens.
Did I forget anything after upgrading to OH4?
@Piotr_Bojko: I am a software developer. Maybe I can help you bringing this binding to Marketplace. I think it is very useful but I am not so deeply inside the OH architecture.
Welcome to the openHAB community!
I also had problems after migration to oh4. I did a couple of actions but donāt know which of them are responsible that it is working now:
- enable inkompatible add-ons in MainUIās settings (Add-on Management)
- Fix Permissions (there is a menu item for this in openhabian-config)
- clean cache
- added a thing through openhabās restAPI
However, I am using triggers of this binding. Maybe also worth a try.
In any case after I migrated to v4 I was not able to see the binding anymore during adding a new thing in the āchoose bindingā dialog.
Can you check in karaf if the bundle is active?
Are you on JDK v17 and bullseye?