logo elektroda
logo elektroda
X
logo elektroda

Commercialisation of a WiFi plug-in on the ESP8266 - what features would be of interest?

lukaszrzepinski 6981 70
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 15646329
    lukaszrzepinski
    Level 10  
    A colleague found a discounted Orvibo for £10 as the cheapest solution, on ebay, no VAT, no certificate and you're clinging to that £30 (the pound isn't going for £3 as far as I remember)

    There are not even such offers in the wholesale in factories, not to mention retail where it is with VAT
    On Allegro I see such naked plug-ins from the legal shop with Android application for 149zl
    Nevertheless, I agree that the price for "wifi" is too high because there is no special difference between RF and ESP. They are raising their margins on this.


    My solution works on MQTT - the firmware takes care of checksums etc. because it is 2 levels higher protocol
  • ADVERTISEMENT
  • #32 15646392
    Anonymous
    Anonymous  
  • #34 15646425
    TvWidget
    Level 38  
    DarekMich wrote:
    UDP itself is dangerous in principle. These packets have no verification etc

    At the IP packet level, both TCP and UDP have the same level of security.
    In UDP there are two checksums for the header and the overall packet.

    DarekMich wrote:
    In switching on even a 40W radiator you can burn down the house, now what happens if you don't switch it off in time (after all it's only UDP).

    The solution must be secure in any foreseeable situation.
    A WiFi network can stop working for a great many reasons.
  • #35 15646506
    lukaszrzepinski
    Level 10  
    indeed it must be safe - but why doesn't anyone pick on the 20zl electrical socket timers that have been in the shops for years? :)
  • #36 15646646
    DarekMich
    Level 15  
    TvWidget wrote:
    DarekMich wrote:
    UDP itself is dangerous in principle. These packets have no verification etc

    At the IP packet level, both TCP and UDP have the same level of security.
    In UDP there are two checksums for the header and the total packet.

    DarekMich wrote:
    In switching on even a 40W heater you can burn down the house, now what happens if you don't switch it off in time (after all, it's only UDP).
    The solution must be secure in every possible way
    The solution must be secure in any foreseeable situation.
    A WiFi network can stop working for a great many reasons.


    It is worth reading at least 1 answer from an internet search engine:
    Link

    Most interesting quote:
    Quote:
    UDP is faster because there is no error-checking for packets.

    Quote:
    There is no guarantee that the messages or packets sent would reach at all.

    Quote:
    No Acknowledgment

    Quote:
    No handshake (connectionless protocol)


    apropos of these checksums:
    Quote:
    UDP does error checking, but no recovery options.
    in TCP even if a message arrives incomplete or garbled it can still be read correctly.

    I don't want to cause unnecessary arguments, but in the end it is the designer who is responsible for any malfunction of the device and the damage he causes when it turns out that it could have been avoided at hardware or software level.

    i was referring to the 13A socket itself, for example sparking, i.e. the temperature that is transferred from the relay to the "pins" themselves, and I have already seen several 32A sockets damaged because of this, so 13A is not at all more robust.

    As for the Polish, it is indeed a bit of a tricky situation, I unnecessarily gave as an example :)
  • ADVERTISEMENT
  • #37 15646666
    Anonymous
    Anonymous  
  • #38 15646688
    lukaszrzepinski
    Level 10  
    Has Darek ever watched a film on a laptop on wifi? Did it produce any black squares due to missing packets?
    A highly academic discussion :)
  • #39 15646696
    DarekMich
    Level 15  
    lukaszrzepinski wrote:
    Has Darek ever watched a movie on his laptop on wifi? Did it produce any black squares due to missing packets?
    A strongly academic discussion :)


    Because it is a transmission using TCP :)
    I guess that's it for the only possible comment :)
  • #40 15646718
    michalko12
    MCUs specialist
    DarekMich wrote:
    in TCP even if the message arrives incomplete or garbled it can still be read correctly.

    Whatever it is supposed to mean...
  • #41 15646732
    DarekMich
    Level 15  
    I meant e.g. at least by resending it. I did not add, my oversight - too much of a mental shortcut :)
    Back to the discussion.

    We already have such a great working device plugged in between our socket and the plug/cable of the heater and in the socket next to it we plug in, for example, a CE charger - (read: china export). Some of these devices can effectively "dull" such an ESP (in extreme cases, of course). the device may fail to receive the on/off command and various things may happen.

    Personally, I wouldn't implement it with UDP at all for this very reason, I'm not trying to convince everyone around how bad it is to use UDP, it's just a solution with a different purpose than TCP, where the security and safety of transmission is no longer so important. in the case of connecting devices affecting our to be or not to be, I would stay away from UDP.
  • #42 15646757
    lukaszrzepinski
    Level 10  
    one of the factories when I made a mini 'tender' wrote back offended that they do not use such cheap controllers as ESP.... here the deciding factor was that only one factory (and it was a small one) agreed to open the hardware and program it with the software you send them; others required orders of at least 10,000 units
  • #43 15646767
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • #44 15646800
    DarekMich
    Level 15  
    I would know that in such a case it is both the sender's agreement as to who sent the message and whether it arrived is just as important.Doing delivery verification with UDP is also a bit pointless as it is more than one message involved in the message and keeping track of this is more work than leaving it to the hardware layer. Anyway, it's all about security in communication with such devices.

    Lukasz, by the way, it is strange that they refuse. A tender is like a tender. The customer pays and demands specifications. They take the money and do it your way. Just a curiosity.
  • #45 15646899
    Anonymous
    Anonymous  
  • #46 15646933
    DarekMich
    Level 15  
    Piotrus_999 wrote:
    DarekMich wrote:
    Important.doing delivery verification using UDP also a bit pointless

    I understand (according to you) that in the case of a TCP connection, confirmation from the application that the message has been received and understood by it is unnecessary. Very interesting

    DarekMich wrote:
    Lukasz your way it is strange that they refuse. A tender is like a tender. The customer pays and asks for specifications. They take the money and do as you wish. Just a curiosity.

    He wants them to give him their product on a platter. It's unlikely anyone will do that.
    If he designs his own and wants to make it, that's a different matter.


    There is no denying that sending a driver >receiver message in this case is a 2 way communication. In essence tcp is the only additional layer of security whether the message is actually received/delivered. The author will anyway have to develop his own transmission protocol and ways to verify its consistency and authenticity. The whole must have the possibility of expansion to be unique so that it goes about what pairing etc. (e.g. said can also have what we Because he thought of it). And safe so that the son of the neighbour does not want to play tricks on us (without going further). For myself to make such a device I require relative safety, but already to make it as for sale the bar strongly goes up. I am not going to prove a point more right than another, because that is the way I go. Everyone likes to do things according to their own experience and convictions. I would not do it on the UDP my argument has already given why.

    Wouldn't it be better to control theCZ signal on the power wires? Usually such a thing stops at the meter itself, we have already laid signal wires. A difficult eavesdropping situation. The transmission should of course be encrypted anyway and the devices paired accordingly. Just a suggestion (for obvious reasons, application only within a single household)



    I apologise for the tails and potential errors (I am writing from a mobile phone)
  • #47 15646962
    lukaszrzepinski
    Level 10  
    The MQTT broker on this controller operates on TCP.
    The ESP8266 supports both TCP and UDP.

    Here is the Lua documentation: http://www.nodemcu.com/docs/net-module/ - as you can see, we can choose the transmission method.

    MQTT, on the other hand, only works over TCP and that over SSH.

    As far as security is concerned, it must of course be taken care of. On the other hand, there are commercially available 220v sockets controlled by a 433MHz signal, which are hackable from a few dozen metres and have no security. The frame is simply the socket ID + command. The hacking of Nex sockets or other sockets can be found in the Arduino tutorials.
  • #48 15647014
    Anonymous
    Anonymous  
  • #49 15647050
    lukaszrzepinski
    Level 10  
    the application layer is of course necessary: after all, the plug-in has to report, remember its status, last command and decide what to do when there is no communication with the server

    it was from Arduino that I escaped :) my first project was self-built in a plug-in only it didn't meet the standards
    I can have the circuit designed: but who will do it for me? If I commission the design, it is more expensive than connecting to an existing production series
  • ADVERTISEMENT
  • #50 15647061
    Anonymous
    Anonymous  
  • #51 15647071
    lukaszrzepinski
    Level 10  
    money can be found as you say :) I also have customers willing (even for simple switching)
    I just have a black hole in the knowledge about the production, is there a production plant that will make everything: i.e. the housing plus the electronics will assemble it all together in quantities of 1000 pieces
  • #52 15647119
    Anonymous
    Anonymous  
  • #53 15647148
    lukaszrzepinski
    Level 10  
    Thank you.
    As far as logistics and production organisation are concerned, there are no minor problems at the software level.
    So far, everything is running on OpenHab, and to the internet via the OpenHab cloud. While it is allowed to upload to OpenHab hardware, the cloud has no guarantee and I will probably have to use another.
    Developing a neat plug and play system is not easy either. Of course, the plug-ins do not know in advance which wifi to connect to, so I have to develop a neat configurator.
    In the Tellstick system everything searches itself nicely and the plug-ins report themselves to the main computer, but in the Tellstick it runs on 433Mhz.
  • #54 15647161
    Anonymous
    Anonymous  
  • #55 15647163
    TvWidget
    Level 38  
    lukaszrzepinski wrote:

    On the Tellstick system everything searches nicely by itself and the plug-ins report themselves to the main computer, but on the Tellstick it runs on 433Mhz.

    Plugins, after all, can report their presence using the SSDP protocol.
  • #56 15647220
    lukaszrzepinski
    Level 10  
    and yet it was worthwhile to create a thread :) as a person creates in isolation, he often does not know what he does not know, and so I already have many clues
  • #57 15648091
    Jado_one
    Level 22  
    Piotrus_999 wrote:
    I have such more decent ones made by myself (with current measurement) connected to several sockets - cooker and where we connect the iron + a few others (e.g. heating mats in my wife's terrariums). But I'm only interested in the possibility to switch it off if someone forgets and leaves it on (I can see the power consumption)


    Oh that's right - this already makes some more utility sense. It can be used to measure power consumption, consumption, graphs (if this interests someone and changes something in his life ;-) ).

    I wonder if in this way it would be possible to detect, for example, the beginnings of spoilage manifested by an increase in the power consumption of the device above the standard values. With constant monitoring you could probably catch something like that (but it probably happens once per....).

    By the way - did your colleague implement the power measurement on a current transformer or one of the specialised ICs?
    I've tried on the subject in the past, I even bought some transformers, but in the meantime I'm working on other, more urgent and necessary projects - maybe one day the time will come for a socket project with power measurement?

    Actually, such a socket system could be good for a service entitled. "Residential power consumption analysis". You go to the customer, switch on all the sockets with the power consumption, then tell him to use the flat normally for a while (a day, a week?), and then you have a detailed record of what eats up his electricity the most. Once this analysis has been carried out, you can recommend replacing the most energy-intensive appliances with better ones or, if necessary, making adjustments (e.g. reducing the brightness of the TV screen).
    Then we unplug all the sockets and go to the next customer's house, because what's the point of continuously measuring consumption when you already know how much ;-)
    And not only does the customer have to pay us for such measurement and analysis, he also has to throw away the good (though perhaps slightly power-hungry appliances) and buy new ones with a better energy rating :-)
    Will he be happy? ;-)
  • #58 15648125
    Anonymous
    Anonymous  
  • #59 15648146
    freebsd
    Level 42  
    Jado_one wrote:
    Oh that's right - this already has some more utility sense. It can be used to measure power consumption, consumption, graphs (if it interests someone and makes a difference in his life ).
    See: Voltcraft Cost Control meter (Cost Control 3000)
    http://www.conrad.pl/Licznik-koszt%C3%B3w-Cos...amp;pi=125464&ci=SHOP_AREA_260528_1114014
    What's there to say: £149 including VAT. Includes:
    1 x Cost Control 3000 energy consumption meter
    2 x radio socket
    1 x radio lighting controller
    1 x remote control
    Batteries
    Operating instructions.


    Or else: VOLTCRAFT energy cost meter SEM-3600BT-FR
    http://www.conrad.pl/Miernik-koszt%C3%B3w-ene...mp;pi=1009526&ci=SHOP_AREA_260528_1114014
ADVERTISEMENT