Release 2023.01

@spockfish , could you do the same for Airplay?

Best regards, Simon.

Hey Harry,

I’ve finally got around to trying to use Home Assistant to query the API using RESTful. I’ve had no success at all, but I struggle with Home Assistant documentation at the best of times. Did you ever try hitting the API using HA?

Thanks,
James

No. Lack of time, and honestly some fear of Python :wink:

I hear you (although I’m not even trying python, just the config.yaml method). It’s creating a sensor but it never populates.

All good. Will investigate further when time permits.

Although I’m no expert - but I do support the HA / roon integration!

I’ve only done very simple stuff with the rest API (sending binary sensor data between HA instances, sending some simple command line data on backup state into HA), but happy to help if I can. I think the tricky thing for me was getting the permissions / token sorted.

And @spockfish very happy to try and help if I can.

Thanks @GregD. You and Harry have single-handedly turned my pretty broken Roon setup (mostly dependent upon a bunch of chromecast audios) into a fully functioning house system (that’s still a hodge-podge of some half decent stuff and some appalling stuff all held together with HA :slight_smile:)

The issue I’ve had so far (which I’m sure is user error) is that using a single RESTful Sensor just gives me errors converting to the right data-type. I then tried to RESTful (which makes more sense to pull multiple datasets and claims to extract the json attributes automatically) and I just get a single empty sensor. AFAIK there are no permissions/tokens when dealing with the ropieee API, it’s just a URL endpoint.

1 Like

Good to hear we’ve helped.

What are you trying to get from Ropieee to HA?

Can you post your code?

My plan was to create sensors for all my different ropieee’s showing the below.

/api/get_system_info_v1

  • Temperature (board_temperature)
  • Uptime (uptime)

/api/get_state_v1

  • Update Available (update_available)

/api/get_version_v1

  • Version

Currently was starting with temperature and have tried numerous variations of the below.

sensor:
 - platform: rest
   resource: http:/x.x.x.x:8080/api/get_system_info_v1
   name: rpiStudy_temp
   json_attributes: board_temperature
rest:
 - resource: http:/x.x.x.x:8080/api/get_system_info_v1
   scan_interval: 60
   sensor:
    - name: rpiStudy

This sort of HA stuff always takes a bit of experimentation. Make sure you check in the logs (you’re probably getting some sort of error), and the development tools template display can be helpful).

The tricky part of was turning the ropiee temperature into a float (Harry returns a string so I needed to parse this).

Anyhow here is my result…


rest:
  - resource: "http://192.168.x.x:8080/api/get_system_info_v1"
    scan_interval: 15    
    sensor:
      - name: "Ropieee AES temperature"
        value_template: "{{ float((value_json['board_temperature']).split('℃')[0])}}"
        device_class: temperature
        unit_of_measurement: "°C"


  - resource: "http://192.168.x.x:8080/api/get_system_info_v1"
    scan_interval: 15
    sensor:
      - name: "Ropieee Tuner temperature"
        value_template: "{{ float((value_json['board_temperature']).split('℃')[0])}}"
        device_class: temperature
        unit_of_measurement: "°C"
1 Like

Not sure it’s useful - but quite fun…

1 Like

Thanks Greg!

The temp sensor is now working fine, as is my uptime sensor! :partying_face:

1 Like

Interesting how much the temperature changes when I’m listening to music (Study… the others I only just created sensors)
image

1 Like