Input API - limitations

Can the inputs API documentation be updated to tell us the sensor name length limit and the character restrictions please.

I recently made a HA integration to send ocotpus cosy data from the ocotpus API to emoncms instead of using a bunch of messy ha templates and yaml mess and ran into this issue.

1 Like

@TrystanLea

1 Like

I’d suggest raising a GitHub Issue as well.

1 Like

If you can point me to the page I’ll do a request! :+1:

I think I’ve found out the allowed characters just not the length limit.

Somewhere in here :slight_smile: I don’t know where though!

emoncms/emoncms: Web-app for processing, logging and visualising energy, temperature and other environmental data

I think I found it in here:

Modules/input/Views/input_api.php‎

I did a PR (well claude did)

1 Like

Document input name constraints in API documentation by swwilshub · Pull Request #1969 · emoncms/emoncms

@TrystanLea

1 Like

Thanks!

Looks like the PR adds constraints to the code in addition to documenting them. Or is github just highlighting the diff incorrectly, Il have to dig into that.

It’s Claude adding a 64 character limit..I didn’t realise it’s hard coded for the .org but looks to be unlimited(?) for other emoncms installs, it would be handy to have the error be more specific that invalid syntax though.

1 Like