Data Format of Selector Switch has changed in build build 16046

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
meal
Posts: 103
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Data Format of Selector Switch has changed in build build 16046

Post by meal »

Hello

Just to inform that the Data Format of Selector Switch has changed in build build 16046 when executing
http://Domoticz_IP:Domoticz_Port/json.htm?type=command&param=getdevices&rid=DEVICE_ID

Prior it was "Data" : "Set Level: 10 %" ==> Data = Level

Now it is "Data" : "Alive" ==> Data = Name

BR
meal
FlyingDomotic
Posts: 303
Joined: Saturday 27 February 2016 0:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by FlyingDomotic »

Nice script killer ;-)
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by waltervl »

I checked the latest commits but could not find a reason why this would have happened. From what version did you update?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
meal
Posts: 103
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by meal »

Hello
From the build 16030
BR
meal
meal
Posts: 103
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by meal »

Hello

The switch has been created with type 244 (switch), subtype 62 (selector switch). switchtype 18 (Selector)

BR
meal
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by waltervl »

Still dont see it changed. Field Data is some kind of multipurpose field. For getting selector status level from the json I use the Level and Name fields
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by waltervl »

Think I found it. It is there to get the level shown in the log...
https://github.com/domoticz/domoticz/pull/6077
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
meal
Posts: 103
Joined: Monday 04 March 2019 14:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: France
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by meal »

Hello

OK I see.

I will use Level instead of Data info in the JSON response.

BR
meal
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Data Format of Selector Switch has changed in build build 16046

Post by gizmocuz »

Exactly, you have to use level. And for presentation the Data field.
This was requested via a PR, and I agree it made sense to show the correct data
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest