hi at all.
I’m trying to running the following call to get the channel status change
http://myopenhab.org/rest/events?topics=smarthome/channels/zwave:sensor_temperature/statuschanged
but i recive always this response:
HTTP ERROR 400
Problem accessing /rest/events. Reason:
Bad Request
i include Basic in the authorization.
I don’t understand where is the problem.
Thanks
opus
(Jürgen Baginski)
December 13, 2019, 1:34pm
2
Try it with something like:
https://home.myopenhab.org/rest/events
?
I tried this
https://home.myopenhab.org/rest/events?topics=smarthome/items/LucaUltraviolet/status
if i call in POST i receive HTTP 405 Method Not Allowed
in GET che call never End
I don’t understand if i call the url with correct header.
opus
(Jürgen Baginski)
December 13, 2019, 2:58pm
4
What are you trying to do?
Events do happen all the time, hence the never ending…
with this call in the postman:
[GET] https://myopenhab.org/rest/events?topics=marthome/item/LucaZwave/statechanged
the call never ending but i don’t see enything
If i call the url with POST
i receive HTTP 405 Method Not Allowed
i have tested in local bash i have the same resul
curl http://192.168.43.144:8080/rest/events?topics=smarthome/item/LucaZwave/statechanged
The call is pending but i don’t see anything.
i have read this https://www.openhab.org/docs/developer/utils/events.html
and this https://www.openhab.org/docs/configuration/restdocs.html
I don’t understand where I’m wrong
the sensor is ok, i see the state in the sitemap
opus
(Jürgen Baginski)
December 13, 2019, 3:45pm
6
Again,
WHAT are you trying to do?
Events are internal messages, when interacting with openhab a user should do that through items. They need to be linked to a channel of a thing, that link is utilising the eventbus for communication.
Are you trying to setup a new/different interface?
I need to receive change status from sensor with sse.
at every status change i need to update UI of my app (Temp) of trigger event (Button)
I have a 6 to 1 Z-wave sensor correctly recognized. After i created two item (first Linked temp sensor) end second linked to motion Sensor.
opus
(Jürgen Baginski)
December 13, 2019, 4:29pm
8
I don’t know what “sse” is!
If you need the information about state changes outside openHAB, I would start of with openHAB rules. They can be triggered by this events and do actions afterwards.
IMHO subscribing to the eventbus is more complex, more like writing an own app ( unless you have an app that can subscribe).