Update switch from XML (Frontier)

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
woods
Posts: 8
Joined: Friday 30 October 2015 17:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Update switch from XML (Frontier)

Post by woods »

Hi all,

first of all I would like to thank you all for creating this community. It's really helpful for us so called 'noobs'.

I have a radio (Pinell SuperSound II) that communicates through Frontier.

As of now I can switch the radio on/off, select volume, change channels and so forth. Everything is done through http requests. For example:

Code: Select all

http://192.168.1.150/fsapi/SET/netRemote.sys.power?pin=1234&value=1
turns on my radio. This is done through http req field in the switch config.

Goal
Updating the virtual switch based on information through XML (this is a new field for me, I apologize if I use the wrong terms). I simply want Domoticz to update the switch status if the radio physically get's powered on.

What I know so far

The following http request:

Code: Select all

http://192.168.1.150/fsapi/GET/netRemote.sys.power?pin=1234
gives the following information:

Code: Select all

<fsapiResponse>
<status>FS_OK</status>
<value>
<u8>1</u8>
</value>
</fsapiResponse>
.extraClassAspect {-webkit-transform: scaleX(1.35)!important;}.extraClassCrop {-webkit-transform: scale(1.35)!important;}
The "<u8>1</u8>" part shows if the radio is powered on (1) or not (0). I would like Domoticz to check this status every minute or something. Is this possible somehow?

I found some documentation for OpenHab if this could be useful for someone: https://github.com/openhab/openhab1-add ... io-Binding


Thanks

Regards

Version: 3.8153
Raspberry Pi 2
Hue, Z-wave, RF
eddieb
Posts: 279
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Update switch from XML (Frontier)

Post by eddieb »

Hi,
did you ever get this working ?
I have this medion audio player which is regognized as a Frontier Silicon device also.
sending
http://<IP>/fsapi/LIST_GET_NEXT/netRemote.sys.caps.validModes/-1?pin=1234&maxItems=65536
gives me a nice XML and it seems controllable.
Would be nice if we got support for this kind of devices somehow like in OpenHab

Eddie
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Update switch from XML (Frontier)

Post by waaren »

eddieb wrote: Sunday 19 January 2020 10:49 I have this medion audio player which is regognized as a Frontier Silicon device also.
sending http://<IP>/fsapi/LIST_GET_NEXT/netRemote.sys.caps.validModes/-1?pin=1234&maxItems=65536 gives me a nice XML and it seems controllable.
Would be nice if we got support for this kind of devices somehow.
The issue here is not so much to send this API call and interpret the XML that comes back. The real question that needs answering is how to trigger this API call. If the audio player could 'ask' domoticz to do, you would be halfway there. If not,- you would need some kind of polling mechanism. Either in domoticz 'hardware' modules or using a script. (Python, dzVents or other). Setting the polling frequency is then important in terms of performance / response.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
eddieb
Posts: 279
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Update switch from XML (Frontier)

Post by eddieb »

Hi waaren,
tnx for your reply. Nice that I catched your attention 8-)
Perhaps you have any suggestions to get this working ?
Eddie
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Update switch from XML (Frontier)

Post by waaren »

eddieb wrote: Sunday 19 January 2020 11:10 Perhaps you have any suggestions to get this working ?
Sure, if you can send me the xml you receive back from your audio system, -the required frequency and what you want to do with it, I can try to come with a dzVents based polling approach.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
eddieb
Posts: 279
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Update switch from XML (Frontier)

Post by eddieb »

waaren,

the xml only shows the possible selections on the command I sent.
It does not give the current status and/or the possible changes.
It is possible to chang volume and other things. That must be done with some other call. Need to dive into that ...

Code: Select all

<fsapiResponse>
<status>FS_OK</status>
<item key="0">
<field name="id">
<c8_array>IR</c8_array>
</field>
<field name="selectable">
<u8>1</u8>
</field>
<field name="label">
<c8_array>Internetradio</c8_array>
</field>
<field name="streamable">
<u8>1</u8>
</field>
<field name="modetype">
<u8>0</u8>
</field>
</item>
<item key="1">
<field name="id">
<c8_array>Spotify</c8_array>
</field>
<field name="selectable">
<u8>1</u8>
</field>
<field name="label">
<c8_array>Spotify</c8_array>
</field>
<field name="streamable">
<u8>1</u8>
</field>
<field name="modetype">
<u8>0</u8>
</field>
</item>
<item key="2">
<field name="id">
<c8_array>DMR</c8_array>
</field>
<field name="selectable">
<u8>0</u8>
</field>
<field name="label">
<c8_array>DMR</c8_array>
</field>
<field name="streamable">
<u8>1</u8>
</field>
<field name="modetype">
<u8>0</u8>
</field>
</item>
<item key="3">
<field name="id">
<c8_array>MP</c8_array>
</field>
<field name="selectable">
<u8>1</u8>
</field>
<field name="label">
<c8_array>Muziekspeler</c8_array>
</field>
<field name="streamable">
<u8>1</u8>
</field>
<field name="modetype">
<u8>1</u8>
</field>
</item>
<item key="4">
<field name="id">
<c8_array>DAB</c8_array>
</field>
<field name="selectable">
<u8>1</u8>
</field>
<field name="label">
<c8_array>DAB</c8_array>
</field>
<field name="streamable">
<u8>1</u8>
</field>
<field name="modetype">
<u8>0</u8>
</field>
</item>
<item key="5">
<field name="id">
<c8_array>FM</c8_array>
</field>
<field name="selectable">
<u8>1</u8>
</field>
<field name="label">
<c8_array>FM</c8_array>
</field>
<field name="streamable">
<u8>1</u8>
</field>
<field name="modetype">
<u8>0</u8>
</field>
</item>
<item key="6">
<field name="id">
<c8_array>AUXIN</c8_array>
</field>
<field name="selectable">
<u8>1</u8>
</field>
<field name="label">
<c8_array>AUX in</c8_array>
</field>
<field name="streamable">
<u8>0</u8>
</field>
<field name="modetype">
<u8>0</u8>
</field>
</item>
<listend/>
</fsapiResponse>
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
eddieb
Posts: 279
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Update switch from XML (Frontier)

Post by eddieb »

RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest