Is their integration talking to the cloud API or is it local polling from the device’s API?
Appears to grab a token and device info from their cloud
Yeah, I just got the integration from PT Devices support along with an API token. How unfortunate, I think I’m going to continue to pursue development of a local polling integration. I don’t want another cloud-reliant integration here, especially for a device that exposes a local API.
I never saw a complete local solution for the lora units in this thread, so here is mine for posterity using the modern rest and template integrations and pure json. It only needs your max reading value, which isn’t available anywhere from the device that I am aware of.
It could be done raw in just the rest entry, but I preferred the customization abilities using the template.
rest:
resource: http://XXX.XXX.XXX.XXX/get_sensors
scan_interval: 300
sensor:
- name: "ptlevel"
value_template: '{{ ((value_json[0]["1"] | float - (value_json[0]["z"] | float)) / (*YOUR MAX VALUE HERE*| float - (value_json[0]["z"] | float)) * 100) }}'
template:
- sensor:
- name: Your Tank Name Here
unit_of_measurement: "%"
state: "{{ states('sensor.ptlevel') | float | round(0) }}"
state_class: "measurement"
I’m running the beta here now, too (thanks for the heads up, @Cucumber1106).
It’s comprehensive and I love to see it. Huge thanks and credit to ParemTech for valuing and pursuing a Home Assistant integration.
I plan to run this alongside my local API stuff. I use my PTLevel devices to track outdoor water cisterns. The times where I’m most concerned with level and potential leaks are also when my Internet is most vulnerable. No cloud-only solution is going to fully meet my needs.
Agreed! For those of us in rural areas…this is crtical! I can send a message via backup SMS…but I don’t want a cloud connection for actually getting the base information to do so…gotta be local-only!