I am quite new of the system I installed on a pi the software v2.3.4; then I installed a few devices (temperature sensors, switches, etc)
and configured rooms.
All works fine, but, I have some trouble when I try to access via http to devices. I created a virtual thermostat and
my understanding was that by accessing the URL
http://IP:8083/OpenRemote/ThermostatLev ... tDevice_40
where ThermostatDevice_40 is the device ID I should be able to read the temperature, but in firefox nothing show up
If I do
wget http://IP:8083/OpenRemote/ThermostatLev ... tDevice_40
the results is a 404 Not Found; chrome also give page not found.
My goal is actually to both read and set temperature levels programmatically so that I can change the temperature level during the day.
Did I wrongly interpreted the documentation of the OpenRemote app? Is there something wrong I am doing?
Did I miss some details?
Any help will be appreciated.
http access via web browser and OpenRemote
Re: http access via web browser and OpenRemote
Make sure to enable the OpenRemote module from the list of Apps
Re: http access via web browser and OpenRemote
Thanks for the hint! Things are better still quite not working and I am wondering if it is a code problem as now I got a server error:
curl -v -u admin:admin http://IP:8083/OpenRemote/ThermostatLev ... tDevice_40
gives
* Trying IP ...
* TCP_NODELAY set
* Connected to IP port 8083 (#0)
* Server auth using Basic with user 'admin'
> GET /OpenRemote/ThermostatLevel/ThermostatDevice_40 HTTP/1.1
> Host: IP:8083
> Authorization: Basic YWRtaW46VHJ1dGEzMmNtIQ==
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Server: Mongoose/6.4
< Content-Length: 70
< Connection: close
<
* Curl_http_done: called premature == 0
* Closing connection 0
Uncaught TypeError: Cannot read property 'ThermostatMode' of undefined
If I try to acess a switch something similar happens. I added autoload:true in the module json conf file but it did not help.
Any hint?
thanks
curl -v -u admin:admin http://IP:8083/OpenRemote/ThermostatLev ... tDevice_40
gives
* Trying IP ...
* TCP_NODELAY set
* Connected to IP port 8083 (#0)
* Server auth using Basic with user 'admin'
> GET /OpenRemote/ThermostatLevel/ThermostatDevice_40 HTTP/1.1
> Host: IP:8083
> Authorization: Basic YWRtaW46VHJ1dGEzMmNtIQ==
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Server: Mongoose/6.4
< Content-Length: 70
< Connection: close
<
* Curl_http_done: called premature == 0
* Closing connection 0
Uncaught TypeError: Cannot read property 'ThermostatMode' of undefined
If I try to acess a switch something similar happens. I added autoload:true in the module json conf file but it did not help.
Any hint?
thanks
Re: http access via web browser and OpenRemote
That code was maintained by Pieter Zanstra. May be a deep look in the code is required
Re: http access via web browser and OpenRemote
By chance is there any other easy way to read/write from outside the z-server device parameters?
thanks
thanks
Re: http access via web browser and OpenRemote
Sure! Use the standard HTTP API. The one our UI uses