Ok, sorry, i don’t know what could be wrong. Do you see any error message in your logs?
Also, do you have a Pulse Pro or a Pulse One?
I got it working. Thanks
My API access quit working this morning without any changes to configuration. The Pulse device still shows data but even logging into the API area of the website gives:
" Application Error
If you are the application administrator, you can access the diagnostic resources."
Anyone know what’s going on?
Hey! This might be an issue with some of our recent updates related to the API. I’ve given the engineering team a heads up and they’ll be looking into and getting this resolved ASAP!
Appreciate the heads up. Apologies for any inconvenience!
Thank you for the update!
Hello, the public API is back online now. The main app was not affected.
I’m sorry for the troubles and unexpected downtime.
I noticed there have been a few server downtime events with this API…
with that said, how safe are we to use this for growroom automations?
Obviously it would be bad to rely on this for environment automations if it might be going down from time to time… Just a thought I had
Also is there anyone experienced here who could help me troubleshoot and get this setup better?
I have 2 devices and I’m currently getting one sensor value from each device that I’m using for automations, and I even managed to pull multiple sensor values from each device (but I think I they were using mltiple API calls), but I cannot for the life of me figure out how to get multiple sensor values from each device using only 1 API call per device. I tried so many tweaks to the yaml and tried using AI to troubleshoot, but no dice.
Any help apreciated
Hi Oli, can you please provide some more info on the downtime events?
We can boast an uptime statistic of 99.9% and strive to ensure reliability.
Very small bursts of downtime can happen during app update, but other than that - incidents are uncommon. Not every month at least.
In any case, i think any automation should trigger from the latest reading.
In the rare occurrence of downtime, an automation should wait for new data and trigger after it comes in.
So your biggest risk would be a mildly late automation.
We currently don’t have an endpoint that provides data from multiple devices.
I would suggest joining data from multiple sensors via some sort of script.
However, our does do something like this in the Zones section.
Zones are not currently included in our public api as there hasn’t been any demand so far.
We can add that in though. later on
Hey. So I was just going by the few comments earlier in this thread about downtime. It seems like just a few isolated incidents, but just wanted to check if it was something that was being prioritized… which it sounds like it is. Thanks!
So I don’t think I’m looking for one endpoint that returns data from multiple devices, rather just multiple sensor datapoints from one device. So to be able to return temp, humidity, vpd, and light readings from my pulse zero with one API call rather than many. Then I can just duplicate/edit that code to do the same thing for my pulse one with it’s own single API call. Ultimately meaning I am making 2 API calls - one to get all the sensor readouts from the zero, and one to get the readouts for the pulse one. With just 2 calls I should be able to get all the data I want, but I can’t make the code work.
I am fairly new to this, so pls excuse any incorrect verbage.
hm, I think there may be some confusion going on here.
Let me see if i can help.
Maybe you are misunderstanding how we use the term datapoint?
By datapoint we mean a reading by a pulse device. A pulse device writes a new datapoint into our database every minute.
A datapoint includes all the parameters your device reads (Light, Temp, Vpd, etc).
Multiple datapoints means a series of readings across a certain period of time.
You can use the “recent-data” endpoint for this.
If you’d like to get device data over a certain period of time - use Our “/devices/{deviceId}/data-range” endpoint.
Let me know if this was helpful and if there are any other questions.
Best, Greg
Thanks Greg, yes it’s always challenging trying to communicate this stuff to programmers when you are not a programmer yourself or familiar with the vernacular. so yes that’s helpful to know, although it does not get me much closer to my goal.
@guidagalattica are u still around and able to assist ?
- platform: rest
resource: https://api.pulsegrow.com/devices/19283/recent-data
method: GET
value_template: '{{ value_json["vpd"] | round(2) }}'
unique_id: pulseone_vpd
name: Pulse One VPD
unit_of_measurement: 'kPa'
scan_interval: 60
headers:
x-api-key: 8GZav6OAzm2lkkG8p8rDfnBB8hzn6u27SemF8yCLcTdq3
- platform: rest
resource: https://api.pulsegrow.com/devices/22235/recent-data
headers:
x-api-key: 8GZav6OAzm2lkkG8p8rDfnBB8hzn6u27SemF8yCLcTdq3
method: GET
scan_interval: 60
name: Pulse Zero Humidity
device_class: humidity
unique_id: pulsezero_humidity
value_template: '{{ value_json["humidityRh"] | round(1) }}'
unit_of_measurement: '%'
So above is the code I am currently running in my sensor.yaml file to return just one sensor value per each device.
When I try to pull multiple sensor values with one call using the given code below I get syntax errors. I tried creating the rest.yaml file too but no cigar. This is where I get stuck.
rest:
- resource: https://api.pulsegrow.com/devices/{{YOUR-DEVICE-ID}}/recent-data
headers:
x-api-key: {{YOUR-API-KEY}}
sensor:
- unique_id: pulsepro_vpd
name: "PulsePro VPD"
icon: mdi:cloud-refresh
unit_of_measurement: 'kPa'
value_template: '{{ value_json["vpd"] | round(2) }}'
- unique_id: pulsepro_temperature
name: "PulsePro Temperature"
device_class: temperature
unit_of_measurement: '°C'
value_template: '{{ value_json["temperatureC"] | round(2) }}'
- unique_id: pulsepro_humidity
name: "PulsePro Humidity"
device_class: humidity
unit_of_measurement: '%'
value_template: '{{ value_json["humidityRh"] | round(2) }}'
- unique_id: pulsepro_light
name: "PulsePro Light"
icon: mdi:wall-sconce-flat
unit_of_measurement: '%'
value_template: '{{ value_json["lightLux"] | round(2) }}'
- unique_id: pulsepro_pressure
name: "PulsePro Pressure"
device_class: pressure
unit_of_measurement: 'hPa'
value_template: '{{ (value_json["airPressure"] / 100) | round(1) }}'
- unique_id: pulsepro_co2
name: "PulsePro CO2"
device_class: carbon_dioxide
unit_of_measurement: 'ppm'
value_template: '{{ value_json["co2"] }}'
- unique_id: pulsepro_dew_point
name: "PulsePro Dew Point"
icon: mdi:thermometer-water
unit_of_measurement: '°C'
value_template: '{{ value_json["dpC"] }}'
- unique_id: pulsepro_signal_strength
name: "PulsePro Signal Strength"
device_class: signal_strength
unit_of_measurement: 'dB'
value_template: '{{ value_json["signalStrength"] }}'
binary_sensor:
- unique_id: pulsepro_pluggedin
name: "PulsePro Plugged In"
icon: mdi:power-plug
value_template: '{{ value_json["pluggedIn"] }}'
Hi, i don’t think it can be done because each URL has the device ID in it:
https://api.pulsegrow.com/devices/{{YOUR-DEVICE-ID}}/recent-data
so you need 1 call per device
^^^ This is what I’m trying to do
So I modified your code with my own device details /API key etc
rest:
- resource: https://api.pulsegrow.com/devices/{{*****}}/recent-data
headers:
x-api-key: {{**************************************************************}}
sensor:
- unique_id: pulsezero_vpd
name: "PulseZero VPD"
icon: mdi:cloud-refresh
unit_of_measurement: 'kPa'
value_template: '{{ value_json["vpd"] | round(2) }}'
- unique_id: pulsezero_temperature
name: "PulseZero Temperature"
device_class: temperature
unit_of_measurement: '°F’
value_template: '{{ value_json["temperatureF”] | round(2) }}'
- unique_id: pulsezero_humidity
name: "PulseZero Humidity"
device_class: humidity
unit_of_measurement: '%'
value_template: '{{ value_json["humidityRh"] | round(2) }}'
- unique_id: pulsezero_light
name: "PulseZero Light"
icon: mdi:wall-sconce-flat
unit_of_measurement: '%'
value_template: '{{ value_json["lightLux"] | round(2) }}'
I have tried adding that code to my configuration.yaml file with out success. I also tried adding it to my sensor.yaml file in place of the working (but limited) code that I already have without success. I also tried making a rest.yaml file and adding it there as per your instructions to drastically, but I must have missed something somewhere as I cannot make it work.
I also have this line in my configuration.yaml
sensor: !include sensor.yaml
Oh, sorry, i didn’t get it. All you need to do is remove the curly brackets:
WRONG (won’t work):
- resource: https://api.pulsegrow.com/devices/{{1234}}/recent-data
CORRECT:
and
WRONG (won’t work):
- x-api-key: {{AbC123}}
CORRECT:
- x-api-key: AbC123
Also, edit your last post and replace your real device-id and API key with some dummy text, or anyone will be able to fetch your info
So if I add this code
rest:
- resource: https://api.pulsegrow.com/devices/mydeviceID/recent-data
headers:
x-api-key: MyAPIkey
sensor:
- unique_id: pulsezero_vpd
name: "PulseZero VPD"
icon: mdi:cloud-refresh
unit_of_measurement: 'kPa'
value_template: '{{ value_json["vpd"] | round(2) }}'
- unique_id: pulsezero_temperature
name: "PulseZero Temperature"
device_class: temperature
unit_of_measurement: '°F’
value_template: '{{ value_json["temperatureF”] | round(2) }}'
- unique_id: pulsezero_humidity
name: "PulseZero Humidity"
device_class: humidity
unit_of_measurement: '%'
value_template: '{{ value_json["humidityRh"] | round(2) }}'
- unique_id: pulsezero_light
name: "PulseZero Light"
icon: mdi:wall-sconce-flat
unit_of_measurement: '%'
value_template: '{{ value_json["lightLux"] | round(2) }}'
to my sensor.yaml file I get this syntax error warning
"missed comma between flow collection entries (15:39)
12 | … name: “PulseZero Temperature”
13 | … device_class: temperature
14 | … unit_of_measurement: '°F’
15 | … value_template: ‘{{ value_json["temperatureF”] | round(2) }}’
-----------------------------------------^
16 | … unique_id: pulsezero_humidity
17 | … name: “PulseZero Humidity”"
If I remove the code from the sensor.yaml file… instead create a rest.yaml file and paste from the 2nd line as u told draztik
- resource: https://api.pulsegrow.com/devices/mydeviceID/recent-data
headers:
x-api-key: MyAPIkey
sensor:
- unique_id: pulsezero_vpd
name: "PulseZero VPD"
icon: mdi:cloud-refresh
unit_of_measurement: 'kPa'
value_template: '{{ value_json["vpd"] | round(2) }}'
- unique_id: pulsezero_temperature
name: "PulseZero Temperature"
device_class: temperature
unit_of_measurement: '°F’
value_template: '{{ value_json["temperatureF”] | round(2) }}'
- unique_id: pulsezero_humidity
name: "PulseZero Humidity"
device_class: humidity
unit_of_measurement: '%'
value_template: '{{ value_json["humidityRh"] | round(2) }}'
- unique_id: pulsezero_light
name: "PulseZero Light"
icon: mdi:wall-sconce-flat
unit_of_measurement: '%'
value_template: '{{ value_json["lightLux"] | round(2) }}'
whilst also adding
rest: !include rest.yaml
to my configuration.yaml file
I get syntax error
"bad indentation of a mapping entry (2:12)
1 | - resource: https://api.pulsegrow.com/devic …
2 | headers:
----------------^
3 | x-api-key: 8GZav6OAzm2lkkG8p8rDfnBB …
4 | sensor:"
As I said I am rather new to this and at this point have been banging my head against the wall for a while, so I’m probably overlooking something very obvious. I am very new to yaml, so I am not really familiar with indentation rules etc.