uni-meter icon indicating copy to clipboard operation
uni-meter copied to clipboard

Question: Would the Shelly App find the virtual device in the same LAN?

Open tmb80c opened this issue 1 year ago • 15 comments

Hi,

great work. My plan is to link a SolarEdge EM which provides values through TCP modbus with the Anker Solarbank AC (if I get it right then th is at the moment not yet supported).

I'm trying the docker version of uni-meter under Truenas Scale (have to find a way to assign an IP to the docker so that I can map/expose the port 80). Once configured correctly should the official Shelly App find this virtual Shelly EM in the same network or is the implementation to limited for the official APP?

Thanks

tmb80c avatar Mar 05 '25 15:03 tmb80c

The scan of the Shelly App will find the virtual Shelly, but you can not add it to the App/Cloud. For that to work additional functions would have to be implemented.

For the Shelly to be discoverable, it is not sufficient just to expose the Port 80. Also the avahi daemon on Port 5353 has to be exposed. Dependening on your configuration either the avahi daemon within the docker container or the avahi daemon of the guest system could be used.

Regarding the Solar Edge EM: I alread have one Modbus device included in the uni-meter. If you can provide me the register information of the Solar Edge Device, it is perhaps not to difficult to add a Solar Edge SM as input ...

sdeigm avatar Mar 05 '25 17:03 sdeigm

Regarding the Solar Edge EM: I alread have one Modbus device included in the uni-meter. If you can provide me the register information of the Solar Edge Device, it is perhaps not to difficult to add a Solar Edge SM as input ...

Solaredge implemented the SunSpec Protocol.

Codes are published here, please search "SolarEdge Inverters - SunSpec Logging - Technical Note"

tmb80c avatar Mar 05 '25 17:03 tmb80c

The scan of the Shelly App will find the virtual Shelly,

yes I see it now (had to give the container it's own IP)

For the Shelly to be discoverable, it is not sufficient just to expose the Port 80. Also the avahi daemon on Port 5353 has to be exposed. Dependening on your configuration either the avahi daemon within the docker container or the avahi daemon of the guest system could be used.

I exposed ports 80 and 1010. 5353 was not necessary, looks like my guest provided the avahi daemon

So now I know that docker should work in my env. Now I need to figure out how to access the Solaredge EM

tmb80c avatar Mar 06 '25 07:03 tmb80c

Question: Would the Anker Solarbank be able to use the virtual Shelly? AFAIK, Anker tries to register the device through the Shelly cloud. Is there already a positive or negative confirmation whether the uni meter can be used with the Solarbank?

thomluther avatar Mar 10 '25 21:03 thomluther

I’m able to register the uni-meter docker with the Shelly Cloud.

Then in the Anker App I could also add the uni-meter (enable device control).

My uni-meter is off-line since my physical powermeter (Solaredge Modbus) is not yet supported in uni-meter. So I can’t test further but would be happy to volunteer.

Image Image Image

tmb80c avatar Mar 11 '25 07:03 tmb80c

Ok, interesting, that you can register the device within the Shelly Cloud. I wasn't aware that this already works. I am just wondering if this "offline" is really related to the uni-meter not receiving any data from the Solaredge device. I fear that it is more related to the uni-meter not sending any data up into the cloud.

Anyhow I will provide a first version which hopefully can at least read some data localy from the Solaredge device using the interface description you provided above.

sdeigm avatar Mar 11 '25 10:03 sdeigm

Is this helpful: "Device Information" for the uni-meter in the Shelly App looks like this (see screenshot). Interesting that it does not provide the IP address (Device-IP/Geräte-IP).

Image

Geräte-IP).

tmb80c avatar Mar 11 '25 10:03 tmb80c

Ok, interesting, that you can register the device within the Shelly Cloud. I wasn't aware that this already works. I am just wondering if this "offline" is really related to the uni-meter not receiving any data from the Solaredge device. I fear that it is more related to the uni-meter not sending any data up into the cloud.

AFAIK, the Anker should communicate with the Shelly locally, if in the same LAN. Let's cross the fingers that the Anker reads the Shelly EM and then the Anker SB communicates to the cloud from where the APP receives the data.

Anyhow I will provide a first version which hopefully can at least read some data localy from the Solaredge device using the interface description you provided above.

Cool!

tmb80c avatar Mar 11 '25 10:03 tmb80c

Hello, just a hint from my side....maybe it is helpful

The shelly muss be configured for "cloud = true" befor you can add the device to the App. I did a short test with the uni-meter and on shelly dimmer device.

Maybe you can add the cloud configuration to your configuration file. So as i understand your code, you have hard-coded this or? ("cloud":{"enabled":false,"connected":false},)

so I think when I see whats in the output from "http:///status" - the information is not vaild for the app

letsrock303 avatar Mar 16 '25 10:03 letsrock303

I have prepared a new uni-meter test version uni-meter-1.1.2-CLOUD.tgz as github package as well as docker container sdeigm/uni-meter:1.1.2-CLOUD.

That version successfully answers all requests send out be the Shelly App when scanning the local network and adding a Shelly. Anyhow it ends with the screenshot @tmb80c added above: the uni-meter IP address is not known in the cloud. That must be information that is send by the shelly when reporting its state to the cloud. That interface is nowhere documented as far as I know and its not possible to trace that communication using for instance wireshark since it is SSL communication.

So if the Zendure device needs this information from the Shelly cloud, then I think we are stuck. Anyhow I still think/hope that it is not necessary to provide the information in the cloud. In one of the issues here there was already a trace where the Zendure device contacted the Shelly. So perhaps you all try again to connect the Zendure device with the shelly.

@letsrock303: the new version also provides the cloud status as {"cloud": {"enabled":true, "connected":true}}.

sdeigm avatar Mar 18 '25 07:03 sdeigm

Anyhow I will provide a first version which hopefully can at least read some data localy from the Solaredge device using the interface description you provided above.

I'm going to open an separate issue for this request.

tmb80c avatar Mar 18 '25 11:03 tmb80c

APSystem just did an update of their app changing the bind process. Now they ask for a shelly account, it seems it is the same feature as tmb80c describes. I will test that once shelly cloud is integradetd&working

MuellBin2 avatar Mar 18 '25 19:03 MuellBin2

Hm, I think that is bad new since I am not able to update the device's data in the Shelly cloud. So the APSystem App will not be able to get the IP address of the virtual shelly from the cloud data.

sdeigm avatar Mar 20 '25 04:03 sdeigm

APSystem just did an update of their app changing the bind process. Now they ask for a shelly account, it seems it is the same feature as tmb80c describes. I will test that once shelly cloud is integradetd&working

Take a look here #80 if you just like to bind the emulated device again

kamilkosek avatar Mar 24 '25 14:03 kamilkosek

Closing this with the final outcome: Shelly App finds the device, but it will always stay "offline" since it is not possible to send data from the virtual Shelly into the cloud.

sdeigm avatar Apr 13 '25 05:04 sdeigm