Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Shelly 1 integration


klobi

Question

Hello to all,

 

i would like to integrate Shelly 1 to my HC2. Can anyone help me with LUA code.

 

Please login or register to see this link.

 

 

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

  • 0

local selfId = fibaro:getSelfId();
local ip = fibaro:get(selfId, "IPAddress")
local port = fibaro:getValue(selfId, "TCPPort")
local url = "/relay/0?turn=on"
local ws = Net.FHttp(ip, port)
local resp = ws:GET(url)
fibaro:debug(resp);

 

 

 

Please login or register to see this attachment.

Please login or register to see this attachment.

Link to comment
Share on other sites

  • 0
On 2/8/2019 at 8:24 PM, klobi said:

Hello to all,

 

i would like to integrate Shelly 1 to my HC2. Can anyone help me with LUA code.

 

Please login or register to see this link.

 

 

 

 

Link to comment
Share on other sites

  • 0

The shelly supports http. It really isn't much more than that, type some commands in the browser...

 

Edit: I mean, on "stock firmware", no need to flash alternative firmware. I probably fail to  understand the discussion here... It might be me...

Edited by petergebruers
Link to comment
Share on other sites

  • 0
40 minutes ago, petergebruers said:

The shelly supports http. It really isn't much more than that, type some commands in the browser...

 

Edit: I mean, on "stock firmware", no need to flash alternative firmware. I probably fail to  understand the discussion here... It might be me...

 

For me the discussion is what it has always been - sharing something in case somebody else find value...

 

For somebody new to the HC2, even 'running  a few simple http commands to a device ' can challenging.

A lot of users are now starting with Shelly or Sonoff (with our without Tasmota) due to cost and a lack of complexity and while it's not zwave and some would say 'don't touch' as it's not secure being only http but I think it's an excellent place for some one new to HA to get started...

 

Why Flash with Tasmota while the shelly1 supports http out of the box

It's simple, it allows me to use one method to interact with all my ESP8266 based devices, whether they are sonoff, shelly, wemos, Magichome, etc

 

 

Link to comment
Share on other sites

  • 0
16 minutes ago, AutoFrank said:

For me the discussion is what it has always been - sharing something in case somebody else find value...

Sure, like I said, it is me, not understanding...

 

16 minutes ago, AutoFrank said:

For somebody new to the HC2, even 'running  a few simple http commands to a device ' can challenging.

I agree, certainly in scenes because of the callback nature of the http client.

 

But I also wanted to say... If you come from Z-Wave you might not "see the obvious" with this device... I mean, you can do htttp://<ip of your device> and you have a full-fledged interface. And the REST api is in that document.

 

And probably users would like to behave it as a switch, but because user plugins are no longer available afaik this is impossible.

 

16 minutes ago, AutoFrank said:

A lot of users are now starting with Shelly or Sonoff (with our without Tasmota) due to cost and a lack of complexity and while it's not zwave and some would say 'don't touch' as it's not secure being only http but I think it's an excellent place for some one new to HA to get started...

I agree.

 

16 minutes ago, AutoFrank said:

Why Flash with Tasmota while the shelly1 supports http out of the box

It's simple, it allows me to use one method to interact with all my ESP8266 based devices, whether they are sonoff, shelly, wemos, Magichome, etc

Yes, but I saw Shelly support told, a while ago, you cannot flash back the stock firmware.. If this is still the case, that might be a slight drawback, it depends I think primarily on whether you want cloud functions or not. I don't know if it is possible to read out the original firmware. Just saying, that is something a user should investigate.

Edited by petergebruers
Link to comment
Share on other sites

  • 0

BTW in Belgium it is forbidden to modify a mains connected device, and flashing is a modification. Who guarantees that the new firmware has correct safety routines?

Link to comment
Share on other sites

  • 0
7 hours ago, petergebruers said:

And probably users would like to behave it as a switch, but because user plugins are no longer available afaik this is impossible

 

Do you mean that it can't look like a normal light switch in the fubaro app/web ui ?

Local regulations and desire to reload original fw, I leave those decisions to the user.... all grown ups here  :-)

 

Link to comment
Share on other sites

  • 0

Fibaro works great with shelly. VD does a job. 

And it acts like a switch. Don't need to change firmware.  

Link to comment
Share on other sites

  • 0
22 minutes ago, AutoFrank said:

Local regulations and desire to reload original fw, I leave those decisions to the user.... all grown ups here  :-)

It is not a matter of being a child or a grown up. And I am not underestimating anyone here.

 

The fact that you are not allowed to modify a device here, is non-negotiable and does not have anything to do with "I take my responsibility". It is forbidden. You are not allowed to drive more than 70 km/hour on most roads in Belgium. You could argue "but I know what I am doing when I drive 90 km/h" but it still is not allowed. It does not have anything to do with your skill level.

 

Please login or register to see this link.

 

The topic starter says (I quote): "Be carefull on your use case and what you do with them. I’m not sure if it’s my fault (because I have hacked it) or if I had a faulty sonoff device but mine has burned in my son’s room while I wasn’t at home"

 

This was both a hardware and a firmware mod.

 

This is the equivalent of saying "I drove 90 and had an accident, the limit was 70 but I am a good driver so it wasn't the (exceeding of the) speed limit".

Edited by petergebruers
Link to comment
Share on other sites

  • 0

Looks like I touched a nerve here @petergebruerswhich was not my intent .. but I stand by my comments and we'll have to agree to disagree on this one.

I am not advocating or promoting any course of action, I'm just providing information , users can choose to use or ignore it if they like ..

People need weigh up all factors for themselves (incl regs, etc) and make their own decisions... this is what I was referring to regarding "all grown ups here"

 

The mod you quoted was a major hw one and for me (and I only speak for me) a fw mod is a risk I am willing to live with. 

Link to comment
Share on other sites

  • 0
On 4/22/2019 at 9:40 PM, AutoFrank said:

Looks like I touched a nerve here @petergebruerswhich was not my intent ..

No, that was not intentional, I know that. The problem is this, I am an EE trained in "power electronics" and "electricity generation and distribution". Safety is very important when working with "high energy" systems. Also, you cannot expect me to say things that both go against my ethics and on top of that are forbidden (like so many things). If I were to say, "oh, that mod is nothing to worry about, it is OK", then people would judge me. You cannot expect a policeman to say "speeding is OK" on a public forum... That would be weird.

 

Besides, your FW mod might have disabled thermal protection, overload protection... I am not saying it does, but I know I do not have this problem when I stick with the factory installed firmware.

 

I have had a look at the source code of tasmota:

 

Please login or register to see this link.

 

"Fix Shelly 2.5 overtemp detection"

 

So, clearly, overtemp detection was broken on older Tasmota firmware.

 

Commit was 4 days ago... But the module is new, but then again do we know it is safe now?

Edited by petergebruers
Link to comment
Share on other sites

  • 0

My implementation for Shelly2/2.5. Work with all Shelly devices - stock firmware: 
Create VD and add: 

Please login or register to see this code.

Check status and consumption (temperature can be added too): 

Please login or register to see this code.

 

Edited by kmeta
More deitails
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 0
1 hour ago, WRYCHEL said:

Hello. Could someone send me a ready virtual device to operate Shelly1 on HC2?

 Here you go...

Add IP of your Shelly 1

 

Please login or register to see this attachment.

  • Like 1
Link to comment
Share on other sites

  • 0

any way to setup same Shelly1 in HCL (Home Center Lite)? I tried multiple options but didn't works 

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
Answer this question...

×   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...