Notifications
Clear all

Wirelessly transport serial data stream via WIFI LAN  

Page 3 / 5

franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

@byron

The Amazon return was easy and free.  When I found a Shelly 1 ad, I noticed that it specifies Android ios - this doesn't preclude http commands from Windows 10 PC does it?

Frank


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 479
 
Posted by: @franktbrady

I noticed that it specifies Android ios

The Adroid and ios mention in the ad is referring to the Shelly App that gives you yet another way to control your relay.  So to switch your Shelly1 relay on and off your can use the following methods.

1. The shelly App on your Adroid or ios device (though in effect this will send http commands)

2. sending commands over http.  (and you will do this from VB)

3. sending commands using mqtt

4. wiring up a manual switch to the shelly1

And for completeness, though in effect you will be using http, you can send voice commands through amazon echo or google voice.  For the voice control you would need to connect your shelly to the shelly cloud web site.

This post was modified 2 months ago by byron

ReplyQuote
franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

@byron

ok - got it.  I will get some help from local friends on Windows 10 PC wifi setup for the shelly 1.

Thanks again


ReplyQuote
franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

@byron

I returned the wrong shelly - amazon is pretty good - free and UPS does all the packaging free.

When I browsed the Shelly 1 price I realized that I would be spending 8 x $20.50 to go with Shelly. Also, the Shelly 1 is designed for insertion into wall switch junction boxes - no surface mount options.  I could get two surface mounting Sunoff Basic r2 wifi remote switch 4 packs for $50.  They permit 12vdc operating power.

Of course, I need to verify that the user interface is a http command (like the shelly) and I'm having difficulty verifying that.

How did you find the http command documentation for the shelly?

Frank

 

 


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 479
 

@franktbrady 

Those prices seem bit high and you could probably do better, but they are more expensive than the sonoff.   I have a couple of sonoff's but I have not used them yet.  I may be wrong but I think the sonoffs only work out the box if you connect them to the sonoff cloud and I dont like connecting my home devices over the internet.   The sonoff's can be re-flashed with alternative software that one downloads and then they can be used locally.  However I have not done this as yet so I cant go into details but a google will give you examples.  But I'm sure the sonoffs will prove a very good solution at a reasonable price.  I put the sonoffs to one side when I learned about the shelly1 which was a better fit for my requirements (ease of using mqtt).

I think I found the Shelly1 http commands in the doc's I linked to.

Another though is that the shelly's have an ESP8266 chip inside, so if you are into electronics you could use this as the basis of your own home brewed solution to connect via wifi and use its pins to signal to relays that can be triggered with 3.3v.  The ESP32 probably even better and to see if you want to go down that path then you should peruse the DronbotWorksop youtube video that introduces how to use this chip - link below.

I guess it comes down how much money to spend to have an easier life 😀.  Alternative is getting down and dirty with a more complicated solution which may mean getting up to speed with electronics and either C++ or micropython programming on the ESP32 or getting some sonoffs and re-flashing them. 

I need to see whats involved in playing with the sonoffs anyway so I will do a little research but this may take me a week or 2 before I get to it and be in a position to advise you in any detail.  

PS - re surface mount - for 12 volts the shelly's can be mounted with a blob of glue or put into a 'fridge' type of plastic container. (not for mains voltage of course)

This post was modified 2 months ago by byron

ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 479
 

@franktbrady

a quick follow up from my previous post as a quick google soon found what I was after.  See the link below

https://www.instructables.com/Control-Sonoff-From-Raspberry-Pi/

This article go over flashing the sonoff and then using python on a raspberry pi to send http messages.  I guess the interesting bit for you is the fact that you can sent the sonoff http messages which you could send from your Visual Basic program instead of a python program.

The link above shows the commands that could by sent via a browser and I copy these below. You can see the commands are very similar to the http commands one would send to the Shelly1.

e.g.:

Copy http://192.168.1.42/control?cmd=event,T1 in the browser address line and press Enter. You should hear the Sonoff relay clicking (the switch is now on) and see an OK confirmation in the browser.

Copy http://192.168.1.42/control?cmd=event,T0 in the browser address line and press Enter. You should hear the Sonoff relay clicking (the switch is now off) and see an OK confirmation in the browser.

Take note of what is required to flash the sonoff as shown in the article.

Good luck with your project.


ReplyQuote
franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

@byron

What outstanding replies! There are so many pros and cons - I'm going to weigh them carefully before I make the next buy.  It's another sonoff con if you are correct that the sonoff's must be re-flashed with alternative software to default to local wifi.  I tried to register for the sonoff user forum today so I can verify things, but it rejected my attempts.  I emailed their support group asking why.  Thank you again for the wealth of information.

Frank 


ReplyQuote
franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

@byron

Hi byron smeeagn

I have a shelly 1

I adjusted the jumper for 12v operation

I connected a 12v pwr supply + lead to the "N" terminal and - lead to the "L" terminal of shelly 1

I downloaded the shelly cloud app to my windows 10 PC via the BlueStacks android emulator.

I also downloaded the app to my sons cell phone.

Neither of the app installations detect the shelly device.

I did not do anything to the windows 10 PC settings interface because I know WIFI is turned on and working properly because we have smart tv and cell phones that use it.

Do you know what I might do next or know of a source for info?

tx

Frank


ReplyQuote
franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

byron,

this is a postscript to add information regarding my last post

I tried to address the shelly 1 via a web browser by entering the 192.168.33.1 into the web url window.  There is a delay of a few seconds and the browser says address not found (it prefaces the ip nos with http://.   I tried the same thing with the browser in my cell phone with same result.

According to the user guide, one can communicate directly with the device without using shelly cloud app.  So.....doesn't this mean that either:

* my cell web brower and pc web browser are not looking at wifi for the IP address?

* my shelly isn't powered up correctly

just FYI ... I would like to pursue the direct web communication before trying the shelly cloud app any further.

tx

frank


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 479
 

@franktbrady

Ok, first lets see if you can actually see the Access Point by seeing what wifi's are available to your computer.  On my mac computer I go to the place where I choose what wifi network to connect to.  It shows me, not surprisingly that I'm connected to my home network.  So I choose 'other networks' to see a list of all the wifi networks I can connect to.  You may well see a list that has your home network, but maybe some neighbours networks too and hopefully also a network called something like shelly1-35FA58 (the last bit will be your shelly's serial number).  So you choose to connect to your Shelly Network ( the Shelly's Access Point).  Then you should be able to configure your Shelly with the details of your home network - your SSID and Password.  

Only then can you proceed with the other tasks of getting your apps to see the Shelly.

I copy the below from the installation instructions which are printed in rather small text on the instructions in the box containing the Shelly, but you can read them from the docs I sent in previous emails.  As you see there are some addtional notes on what to do if you do not see the Shelly's SSID 

Device Inclusion

To add a new Shelly device, install it to the power grid fol- lowing the Installation Instructions included with the Device.

Step 1

After the installation of Shelly following the Instalation In- structions and the power is turned on, Shelly will create its own WiFi Access Point (AP).

own AP WiFi network with SSID like shelly1- 35FA58, please check if the Device is connected accordingly to the Instalation Instructions. If you still do not see an ac- tive WiFi network with SSID like shelly1-35FA58, or you want to add the Device to another Wi-Fi network, reset the Device. If the Device has been powered on, you have to restart by powering it off and on again. After turning the power on, you have one minute to press 5 consecutive times the button/ switch connected SW. You have to hear the Relay trigger it- self. After the trigger sound, Shelly should return to AP Mode. If not, please repeat or contact our customer support at: support@Shelly.cloud

Let me know how you get on with this first step.

 


ReplyQuote
franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

@byron

tks - the only numbers  I see are on the box:

B07G33LNDY   (BOLD)

107546113     (very small font)

So, is my SSID = "shelly1-B07G33LNDY" ?

I've googled "Add smart devices to wifi lan in windows 10" and it says Start > Network & Internet

Then select WiFi and ensure WiFi networking is set to ON.

But I don't see WiFi, it says I have an Ethernet Public network that is connected and speed is 111.95 GB.  So, apparently WiFi is not even shown as available on my PC let alone status info.

I know that my cell phone is on WiFi when I'm in the house and switches to public network when distance causes me to lose WiFi connection.

I also cannot find the shelly 1 when I use a browser on my cell phone - but I don't know if that browser is using the WiFi - this is really really confusing.

back to you as we say on the ham radio

Frank


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 479
 

@franktbrady

You will not find the shelly1 in your browser until you get your shelly1 connected to the same wifi your computer and cell phones are connected to.

Posted by: @franktbrady

I did not do anything to the windows 10 PC settings interface because I know WIFI is turned on and working properly because we have smart tv and cell phones that use it.

So at least your cell phone is using wifi.  Most computers, like your window 10 pc usually also have wifi abilities, but if not you will not be able to get your VB program to sent anything over wifi to your shelly or anything else.   If your computer does not have wifi then you can usually buy an additional board to provide the wifi. Your cell phone will certainly does have wifi and therefore has the ability to choose which wifi to connect to.  Is it an android or an iPhone?   

While you have a look at your cell phone I will fire up my window10 PC to remember where the settings are to connect to a wireless network.  


ReplyQuote
franktbrady
(@franktbrady)
Eminent Member
Joined: 2 months ago
Posts: 33
Topic starter  

@byron

My son is 'trying' to help me but I don't think he understands it either - he says I don't need to be able to see the WiFi network from my windows 10 tools.  I do think I should be able to use my cell phone web browser to talk to shelly device.  And I'm pretty sure that the shelly device isn't "seen" on the WiFi network by my phone.

Bottom line is that my pc windows 10 app MUST be able to talk to shelly 1.  If I need a WiFi adapter mother board or whatever, I'm going to have to do it.

Frank


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 479
 

@franktbrady

ha, I see my venerable old W10 pc does not have wifi, but the wifi network settings are in settings > network & Internet.

I dont use my W10 PC much and now its downloading a whole bunch of updates 🙂 so it was as well to switch it on.

Ignore my bit in my previous post about not being able to use your PC if it does not have a wifi btw, of course it can send an http message to your router which will transmit the wifi to your shelly.

 


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 2 years ago
Posts: 479
 

@franktbrady

Our posts crossed, and of course your son is correct.  And yes you should be able to set up the shelly by connecting to it from your cell phone.  Have you found the cell phone settings to choose the wifi connection?


ReplyQuote
Page 3 / 5