Is this a bug???

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
krambriw
Posts: 46
Joined: 03 Apr 2013 18:14

Is this a bug???

Post by krambriw »

Hi,
I have a Universal Sensor - Fibaro (FGBS321) connected as device 6. Instance 3 is a SensorMultilevel (I measure temperature with a DS18B20 on this 1-wire input.

When I run

http://192.168.10.248:8083/ZWaveAPI/Run ... level.data

I get correctly

{"name":"devices.6.instances.3.commandClasses.49.data","type":"NoneType","value":null,"updateTime":1365168077,"invalidateTime":1365168076,"version":{"name":"version","type":"int","value":0,"updateTime":1365168080,"invalidateTime":1365168076},"security":{"name":"security","type":"bool","value":false,"updateTime":1365168077,"invalidateTime":1365168076},"interviewDone":{"name":"interviewDone","type":"bool","value":true,"updateTime":1365168081,"invalidateTime":1365168076},"interviewCounter":{"name":"interviewCounter","type":"int","value":9,"updateTime":1365168080,"invalidateTime":1365168076},"1":{"name":"1","type":"NoneType","value":null,"updateTime":1365231625,"invalidateTime":1365230552,"sensorTypeString":{"name":"sensorTypeString","type":"str","value":"Temperature","updateTime":1365168081,"invalidateTime":1365168080},"val":{"name":"val","type":"float","value":23.059999465942383,"updateTime":1365231625,"invalidateTime":1365168080},"deviceScale":{"name":"deviceScale","type":"int","value":0,"updateTime":1365231625,"invalidateTime":1365168080},"scale":{"name":"scale","type":"int","value":0,"updateTime":1365231625,"invalidateTime":1365168080},"scaleString":{"name":"scaleString","type":"str","value":"°C","updateTime":1365231625,"invalidateTime":1365168080}}}

But I think the response is missing a right bracket ( } ) in the line

{"name":"1","type":"NoneType","value":null,"updateTime":1365231625,"invalidateTime":1365230552,

It should have been

{"name":"1","type":"NoneType","value":null,"updateTime":1365231625,"invalidateTime":1365230552},

As it is now, it does not work to run

http://192.168.10.248:8083/ZWaveAPI/Run ... .val.value

Best regarrds, Walter
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

I don't see any problem in

Post by PoltoS »

I don't see any problem in the code you have posted. It is correctly parsed by JavaScript console in my browser.
krambriw
Posts: 46
Joined: 03 Apr 2013 18:14

Well, I still see the problem

Post by krambriw »

Well, I still see the problem. If you look carefully, you clearly see that there is a " } " bracket missing compared to the other structures (or dictionaries as they will be understood by python).
I do not how you tested but I used Chrome to open the url's.
If it will help, I will make a python script that will demonstrate the issue.
What part is responsible for generating the structure? Is it my device, Razberry or Z-Way SW?

Best regards,Walter
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Dear Walter, there is no

Post by PoltoS »

Dear Walter, there is no problem in this structure:

{"name":"1","type":"NoneType","value":null,"updateTime":1365231625,"invalidateTime":1365230552,

is correct without }, since behind it there is "sensroType" : {}, ... }

Note, that "sensorType" and other elements are placed INSIDE "1" element. So, this is totally OK.
Post Reply