bytespider / Meross

Investigating the Meross/Refoss MSS310 Smart Plug and getting these devices to communicate with our private MQTT brokers
112 stars 19 forks source link

Added option to not reconfigure wifi #75

Closed fuomag9 closed 9 months ago

fuomag9 commented 9 months ago

This fixes device such as MSS315, which fail to change the MQTT broker if wifi is reconfigured. https://github.com/bytespider/Meross/issues/72#issuecomment-1859218764 and myself have validated this to be working

M0NsTeRRR commented 9 months ago

No need to put a no-wifi flag. If there is no wifi option there is no wifi settings to change.

fuomag9 commented 9 months ago

No need to put a no-wifi flag. If there is no wifi option there is no wifi settings to change.

https://github.com/bytespider/Meross/blob/8d3c9e19720bcd573eab25558b589e4a9da9e64c/bin/meross-setup#L56 mandates wifi options tho, and there is a need to avoid the call to https://github.com/bytespider/Meross/blob/8d3c9e19720bcd573eab25558b589e4a9da9e64c/bin/meross-setup#L95 completely, as it will be called if random values are passed to the options

M0NsTeRRR commented 9 months ago

No need to put a no-wifi flag. If there is no wifi option there is no wifi settings to change.

https://github.com/bytespider/Meross/blob/8d3c9e19720bcd573eab25558b589e4a9da9e64c/bin/meross-setup#L56 mandates wifi options tho, and there is a need to avoid the call to https://github.com/bytespider/Meross/blob/8d3c9e19720bcd573eab25558b589e4a9da9e64c/bin/meross-setup#L95 completely, as it will be called if random values are passed to the options

Sure, but a refactor can handle this that's what I was trying to say 😁

fuomag9 commented 9 months ago

No need to put a no-wifi flag. If there is no wifi option there is no wifi settings to change.

https://github.com/bytespider/Meross/blob/8d3c9e19720bcd573eab25558b589e4a9da9e64c/bin/meross-setup#L56 mandates wifi options tho, and there is a need to avoid the call to https://github.com/bytespider/Meross/blob/8d3c9e19720bcd573eab25558b589e4a9da9e64c/bin/meross-setup#L95 completely, as it will be called if random values are passed to the options

Sure, but a refactor can handle this that's what I was trying to say 😁

That absolutely, my patch is "dirty" 🤣