You are not logged in.
Pages: 1
Topic closed
Hi,
Is there any information/ example code available on how to use http request? My idea is to control a z wave device with http.
Thanks
Offline
You can use the EPC block to call wget. Our GitHub repository contains examples on using the EPC function block.
Alternatively, you can check whether your Z-Wave device has a serial gateway/API. In that case, you might be able to control it using the REXLANG function block instead of the HTTP request.
Can you post here more information about the device?
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
I am using a UZB1 stick - zwave.me
http://razberry.z-wave.me/docs/zwayDev.pdf
Offline
Thanks for the update. There is no serial API available for your device. Using JSON API and the EPC block is the only solution at the moment.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Ok thanks.
Offline
I am dealing with HTTP requests again and to be honest I do not have a lot of experience in this. I will receive the following request "GET /200ESTOP1ActiveHTTP/1.1\r\n\n" from a controller (Client) - see attached.
I want to use the EPC block to convert this into something useful - see attached. Please advice.
Offline
Hi Hendrik,
as far as I understand, the zWay acts as a server, which provides data to clients. You should be issuing HTTP GET commands. Try reading the data from RPi command line first. Something like this should work
wget http://YOURIP:8083/ZWaveAPI/Data/* -O -
where you need to use the IP of your RPi and replace the * with any meaningful path (I have no experience with zWave, sorry).
Once you are able to retrieve the data from command line, you can use the EPC block to do this job for you.
Jaroslav
PS This will be much easier in the new version of REX, but still you need to know how to retrieve the data from command line.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
I am working on a different project/ different controller (not Zway). I requested more info from controller manufacture but no luck. The controller will be on the same subnet with static IP
Offline
Hi,
I was calling a few Tkinter scripts from Unipi cmd and it worked fine, but when I call it from the EPC block there is no response. I have used the EPC block before and had no issues.
Not sure what the issue could be?
Offline
Hi Hendrik,
please start a new topic and describe your current problem. Unless you provide sufficient information, it's hard to help. What Tkinter scripts are you trying to call, what is the purpose and what is the output of the script(s)? How do you call the script from command line? Are there any parameters? If possible, upload the scripts and REX source files...
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Pages: 1
Topic closed