Jump to content
Shelly IoT Innovation Challenge started! ×

Getting 3EM power once a second. The easy way!


Pepeeee

Recommended Posts

I have been geting shelly 3EM power over HTTP for some years now. I do need only total power signed value. The http request returns the whole bulky status or i have to make 3 separate emeter requests for the phases. This is lots of traffic to get one 16bit integer. 

Is there a simpler way? One "total power" request with one answer? Does not need to be http. 

What is the 3EM update rate? Can i get new values every second?

I dont mind upgrading to pro version should that be necessary.

Link to comment
Share on other sites

OK, think i can run a script if i buy the pro version.

http://192.168.178.107/script/1/open


function Open(request, response)
 {
   print('Executing function open');
   let switchStatus = Shelly.getComponentStatus("switch:0");
   response.body = JSON.stringify(switchStatus.apower);
   response.code = 200;
   response.send('test');
 }
 
 HTTPServer.registerEndpoint('open', Open)
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...